mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
546 lines
18 KiB
JSON
546 lines
18 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 45,
|
|
"end": 262,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 45,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 55,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 59,
|
|
"end": 108,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 75,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 66,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 68,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 90,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 81,
|
|
"end": 89,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 83,
|
|
"end": 89,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 106,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 96,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 98,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 110,
|
|
"end": 262,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 117,
|
|
"end": 262,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 123,
|
|
"end": 262,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 123,
|
|
"end": 126,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 129,
|
|
"end": 262,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "MethodProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 135,
|
|
"end": 136,
|
|
"ctxt": 0
|
|
},
|
|
"value": "m",
|
|
"optional": false
|
|
},
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 135,
|
|
"end": 260,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 152,
|
|
"end": 260,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 162,
|
|
"end": 190,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 166,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 166,
|
|
"end": 169,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "TsAsExpression",
|
|
"span": {
|
|
"start": 172,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "TsAsExpression",
|
|
"span": {
|
|
"start": 172,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 172,
|
|
"end": 176,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 180,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"members": []
|
|
}
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 199,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 206,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "&&",
|
|
"left": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 206,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "&&",
|
|
"left": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 206,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 206,
|
|
"end": 211,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 206,
|
|
"end": 209,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 210,
|
|
"end": 211,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 215,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 228,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 223,
|
|
"end": 226,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 227,
|
|
"end": 228,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 232,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 240,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 240,
|
|
"end": 245,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 240,
|
|
"end": 243,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 244,
|
|
"end": 245,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 249,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 138,
|
|
"end": 151,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypePredicate",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 151,
|
|
"ctxt": 0
|
|
},
|
|
"asserts": false,
|
|
"paramName": {
|
|
"type": "TsThisType",
|
|
"span": {
|
|
"start": 140,
|
|
"end": 144,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 148,
|
|
"end": 151,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 148,
|
|
"end": 151,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 148,
|
|
"end": 151,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|