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": 44,
|
|
"end": 261,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 54,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 58,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 74,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 64,
|
|
"end": 65,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 65,
|
|
"end": 73,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 67,
|
|
"end": 73,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 89,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 80,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 88,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 88,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 105,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 95,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 95,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 97,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "ExportDeclaration",
|
|
"span": {
|
|
"start": 109,
|
|
"end": 261,
|
|
"ctxt": 0
|
|
},
|
|
"declaration": {
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 116,
|
|
"end": 261,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 261,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 125,
|
|
"ctxt": 0
|
|
},
|
|
"value": "obj",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 128,
|
|
"end": 261,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "MethodProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 134,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"value": "m",
|
|
"optional": false
|
|
},
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 134,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 151,
|
|
"end": 259,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 161,
|
|
"end": 189,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 188,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 165,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "TsAsExpression",
|
|
"span": {
|
|
"start": 171,
|
|
"end": 188,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "TsAsExpression",
|
|
"span": {
|
|
"start": 171,
|
|
"end": 181,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "ThisExpression",
|
|
"span": {
|
|
"start": 171,
|
|
"end": 175,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 179,
|
|
"end": 181,
|
|
"ctxt": 0
|
|
},
|
|
"members": []
|
|
}
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 185,
|
|
"end": 188,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 185,
|
|
"end": 188,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 198,
|
|
"end": 253,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 252,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "&&",
|
|
"left": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 235,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "&&",
|
|
"left": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 218,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 208,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 210,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 214,
|
|
"end": 218,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 235,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 227,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 222,
|
|
"end": 225,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 227,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 231,
|
|
"end": 235,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 239,
|
|
"end": 252,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "!=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 239,
|
|
"end": 244,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 239,
|
|
"end": 242,
|
|
"ctxt": 0
|
|
},
|
|
"value": "dis",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 243,
|
|
"end": 244,
|
|
"ctxt": 0
|
|
},
|
|
"value": "c",
|
|
"optional": false
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "NullLiteral",
|
|
"span": {
|
|
"start": 248,
|
|
"end": 252,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 137,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypePredicate",
|
|
"span": {
|
|
"start": 139,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"asserts": false,
|
|
"paramName": {
|
|
"type": "TsThisType",
|
|
"span": {
|
|
"start": 139,
|
|
"end": 143,
|
|
"ctxt": 0
|
|
}
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 150,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Foo",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|