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

690 lines
14 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 18,
"end": 369,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 18,
"end": 44,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 23,
"end": 26,
"ctxt": 0
},
"value": "T01",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 29,
"end": 43,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 29,
"end": 35,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 38,
"end": 43,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 45,
"end": 71,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 50,
"end": 53,
"ctxt": 0
},
"value": "T02",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 56,
"end": 70,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 56,
"end": 62,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 65,
"end": 70,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 72,
"end": 107,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 77,
"end": 80,
"ctxt": 0
},
"value": "T03",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 83,
"end": 106,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 83,
"end": 89,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 92,
"end": 98,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 101,
"end": 106,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 108,
"end": 143,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 113,
"end": 116,
"ctxt": 0
},
"value": "T04",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 119,
"end": 142,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 119,
"end": 125,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 128,
"end": 134,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 137,
"end": 142,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 144,
"end": 167,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 149,
"end": 152,
"ctxt": 0
},
"value": "T05",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 155,
"end": 166,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 155,
"end": 158,
"ctxt": 0
},
"kind": "any"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 161,
"end": 166,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 168,
"end": 191,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 173,
"end": 176,
"ctxt": 0
},
"value": "T06",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 179,
"end": 190,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 179,
"end": 182,
"ctxt": 0
},
"kind": "any"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 185,
"end": 190,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 192,
"end": 221,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 197,
"end": 200,
"ctxt": 0
},
"value": "T07",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 203,
"end": 220,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 203,
"end": 212,
"ctxt": 0
},
"kind": "undefined"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 215,
"end": 220,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 222,
"end": 251,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 227,
"end": 230,
"ctxt": 0
},
"value": "T08",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 233,
"end": 250,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 233,
"end": 242,
"ctxt": 0
},
"kind": "undefined"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 245,
"end": 250,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 252,
"end": 276,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 257,
"end": 260,
"ctxt": 0
},
"value": "T09",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 263,
"end": 275,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 263,
"end": 267,
"ctxt": 0
},
"kind": "null"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 270,
"end": 275,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 277,
"end": 301,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 282,
"end": 285,
"ctxt": 0
},
"value": "T10",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 288,
"end": 300,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 288,
"end": 292,
"ctxt": 0
},
"kind": "null"
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 295,
"end": 300,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 302,
"end": 335,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 307,
"end": 310,
"ctxt": 0
},
"value": "T11",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 313,
"end": 334,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 313,
"end": 326,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 315,
"end": 324,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 316,
"end": 324,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 318,
"end": 324,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 329,
"end": 334,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
2022-02-04 14:17:42 +03:00
"start": 336,
"end": 369,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 341,
"end": 344,
"ctxt": 0
},
"value": "T12",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 347,
"end": 368,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
2022-02-04 14:17:42 +03:00
"start": 347,
"end": 360,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
2022-02-04 14:17:42 +03:00
"start": 349,
"end": 358,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 349,
"end": 350,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 350,
"end": 358,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 352,
"end": 358,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
},
{
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 363,
"end": 368,
"ctxt": 0
},
"kind": "never"
}
]
}
}
],
"interpreter": null
}