mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
479 lines
10 KiB
JSON
479 lines
10 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 68,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 35,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Flags",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 41,
|
|
"end": 68,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsIndexSignature",
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"value": "name",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 48,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 50,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 59,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "boolean"
|
|
}
|
|
},
|
|
"readonly": false,
|
|
"static": false,
|
|
"span": {
|
|
"start": 43,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 69,
|
|
"end": 86,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 78,
|
|
"ctxt": 0
|
|
},
|
|
"value": "flags",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 78,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 85,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Flags",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 87,
|
|
"end": 95,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 87,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 87,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"value": "flags",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 93,
|
|
"end": 94,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 103,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 96,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"value": "flags",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 103,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 105,
|
|
"end": 138,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 105,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 105,
|
|
"end": 110,
|
|
"ctxt": 0
|
|
},
|
|
"value": "flags",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 111,
|
|
"end": 137,
|
|
"ctxt": 0
|
|
},
|
|
"value": "isNotNecessarilyNeverFalse",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 139,
|
|
"end": 161,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 139,
|
|
"end": 160,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 139,
|
|
"end": 144,
|
|
"ctxt": 0
|
|
},
|
|
"value": "flags",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 144,
|
|
"end": 160,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 145,
|
|
"end": 159,
|
|
"ctxt": 0
|
|
},
|
|
"value": "this is fine",
|
|
"raw": "'this is fine'"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 163,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 173,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Empty",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 179,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"body": []
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 183,
|
|
"end": 200,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 199,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 192,
|
|
"ctxt": 0
|
|
},
|
|
"value": "empty",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 192,
|
|
"end": 199,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 199,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 194,
|
|
"end": 199,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Empty",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 201,
|
|
"end": 212,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 201,
|
|
"end": 211,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 201,
|
|
"end": 206,
|
|
"ctxt": 0
|
|
},
|
|
"value": "empty",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 207,
|
|
"end": 211,
|
|
"ctxt": 0
|
|
},
|
|
"value": "nope",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 213,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 213,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 213,
|
|
"end": 218,
|
|
"ctxt": 0
|
|
},
|
|
"value": "empty",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Computed",
|
|
"span": {
|
|
"start": 218,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 219,
|
|
"end": 239,
|
|
"ctxt": 0
|
|
},
|
|
"value": "not allowed either",
|
|
"raw": "\"not allowed either\""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|