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

1472 lines
38 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 514,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 63,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 28,
"end": 30,
"ctxt": 0
},
"value": "T1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 33,
"end": 62,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 39,
"end": 50,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 39,
"end": 40,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 40,
"end": 49,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 42,
"end": 49,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 42,
"end": 44,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 42,
"end": 44,
"ctxt": 0
},
"value": "T1",
"optional": false
},
"typeParams": null
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 45,
"end": 48,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 45,
"end": 48,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
}
},
"typeParams": null
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 65,
"end": 141,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 70,
"end": 72,
"ctxt": 0
},
"value": "T2",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 72,
"end": 93,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 73,
"end": 92,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "K",
"optional": false
},
"constraint": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 83,
"end": 92,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 83,
"end": 86,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 83,
"end": 86,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
},
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 89,
"end": 92,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 89,
"end": 92,
"ctxt": 0
},
"value": "y",
"raw": "\"y\""
}
}
]
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 96,
"end": 141,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 102,
"end": 114,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 102,
"end": 103,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 103,
"end": 113,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 105,
"end": 113,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 105,
"end": 110,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 105,
"end": 107,
"ctxt": 0
},
"value": "T2",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 107,
"end": 110,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 108,
"end": 109,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 108,
"end": 109,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
}
]
}
},
"indexType": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 111,
"end": 112,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "K",
"optional": false
},
"typeParams": null
}
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 129,
"end": 139,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 130,
"end": 138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 132,
"end": 138,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 143,
"end": 167,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 155,
"end": 166,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 155,
"end": 157,
"ctxt": 0
},
"value": "x2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 157,
"end": 166,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 159,
"end": 166,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 159,
"end": 161,
"ctxt": 0
},
"value": "T2",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 161,
"end": 166,
"ctxt": 0
},
"params": [
{
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 162,
"end": 165,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 162,
"end": 165,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 168,
"end": 183,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
2022-02-04 14:17:42 +03:00
"start": 172,
"end": 182,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 172,
"end": 175,
"ctxt": 0
},
"value": "x2x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 178,
"end": 182,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 178,
"end": 180,
"ctxt": 0
},
"value": "x2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 181,
"end": 182,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 185,
"end": 233,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 195,
"end": 197,
"ctxt": 0
},
"value": "T3",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 197,
"end": 214,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 198,
"end": 213,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 198,
"end": 199,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 208,
"end": 213,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 208,
"end": 210,
"ctxt": 0
},
"value": "T3",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 210,
"end": 213,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 211,
"end": 212,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 211,
"end": 212,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
},
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
2022-02-04 14:17:42 +03:00
"start": 215,
"end": 233,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 221,
"end": 231,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 222,
"end": 230,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 224,
"end": 230,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 224,
"end": 225,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 224,
"end": 225,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 226,
"end": 229,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 226,
"end": 229,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 235,
"end": 297,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 245,
"end": 247,
"ctxt": 0
},
"value": "T4",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 247,
"end": 264,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 248,
"end": 263,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 248,
"end": 249,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 258,
"end": 263,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 258,
"end": 260,
"ctxt": 0
},
"value": "T4",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 260,
"end": 263,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 261,
"end": 262,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 261,
"end": 262,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
},
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
2022-02-04 14:17:42 +03:00
"start": 265,
"end": 297,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 271,
"end": 285,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 272,
"end": 284,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 274,
"end": 284,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 274,
"end": 279,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 274,
"end": 276,
"ctxt": 0
},
"value": "T4",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 276,
"end": 279,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 277,
"end": 278,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 280,
"end": 283,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 280,
"end": 283,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 305,
"end": 307,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 299,
"end": 337,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 314,
"end": 325,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 314,
"end": 315,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 315,
"end": 324,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 317,
"end": 324,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 317,
"end": 319,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 317,
"end": 319,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"typeParams": null
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 320,
"end": 323,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 320,
"end": 323,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 345,
"end": 347,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 339,
"end": 405,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 354,
"end": 367,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 354,
"end": 355,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 355,
"end": 366,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 357,
"end": 366,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsThisType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 357,
"end": 361,
"ctxt": 0
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 362,
"end": 365,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 362,
"end": 365,
"ctxt": 0
},
"value": "y",
"raw": "\"y\""
}
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 372,
"end": 385,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 372,
"end": 373,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 373,
"end": 384,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 375,
"end": 384,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsThisType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 375,
"end": 379,
"ctxt": 0
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 380,
"end": 383,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 380,
"end": 383,
"ctxt": 0
},
"value": "z",
"raw": "\"z\""
}
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 390,
"end": 403,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 390,
"end": 391,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 391,
"end": 402,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 393,
"end": 402,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsThisType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 393,
"end": 397,
"ctxt": 0
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 398,
"end": 401,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 398,
"end": 401,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsInterfaceDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 429,
"end": 466,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 439,
"end": 442,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
2022-02-04 14:17:42 +03:00
"start": 443,
"end": 466,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 449,
"end": 464,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 449,
"end": 454,
"ctxt": 0
},
"value": "hello",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 454,
"end": 463,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 456,
"end": 463,
"ctxt": 0
},
"kind": "boolean"
}
},
"typeParams": null
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 477,
"end": 480,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 468,
"end": 514,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 511,
"end": 514,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 480,
"end": 508,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 481,
"end": 507,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 481,
"end": 482,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 491,
"end": 507,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 491,
"end": 494,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 491,
"end": 494,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"typeParams": null
},
{
"type": "TsIndexedAccessType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 497,
"end": 507,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsTypeReference",
"span": {
2022-02-04 14:17:42 +03:00
"start": 497,
"end": 498,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 497,
"end": 498,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
"indexType": {
"type": "TsLiteralType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 499,
"end": 506,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 499,
"end": 506,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
}
}
]
},
"default": null
}
]
},
"returnType": null
}
],
"interpreter": null
}