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

690 lines
14 KiB
JSON

{
"type": "Script",
"span": {
"start": 19,
"end": 370,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 19,
"end": 45,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 24,
"end": 27,
"ctxt": 0
},
"value": "T01",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 30,
"end": 44,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 30,
"end": 36,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 39,
"end": 44,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 46,
"end": 72,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"value": "T02",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 57,
"end": 71,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 57,
"end": 63,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 66,
"end": 71,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 73,
"end": 108,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": "T03",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 84,
"end": 107,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 84,
"end": 90,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 93,
"end": 99,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 102,
"end": 107,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 109,
"end": 144,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 114,
"end": 117,
"ctxt": 0
},
"value": "T04",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 120,
"end": 143,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 120,
"end": 126,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 129,
"end": 135,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 145,
"end": 168,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"value": "T05",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 156,
"end": 167,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 156,
"end": 159,
"ctxt": 0
},
"kind": "any"
},
{
"type": "TsKeywordType",
"span": {
"start": 162,
"end": 167,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 169,
"end": 192,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 174,
"end": 177,
"ctxt": 0
},
"value": "T06",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 180,
"end": 191,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 180,
"end": 183,
"ctxt": 0
},
"kind": "any"
},
{
"type": "TsKeywordType",
"span": {
"start": 186,
"end": 191,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 193,
"end": 222,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 198,
"end": 201,
"ctxt": 0
},
"value": "T07",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 204,
"end": 221,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 204,
"end": 213,
"ctxt": 0
},
"kind": "undefined"
},
{
"type": "TsKeywordType",
"span": {
"start": 216,
"end": 221,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 223,
"end": 252,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 228,
"end": 231,
"ctxt": 0
},
"value": "T08",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 234,
"end": 251,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 234,
"end": 243,
"ctxt": 0
},
"kind": "undefined"
},
{
"type": "TsKeywordType",
"span": {
"start": 246,
"end": 251,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 253,
"end": 277,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"value": "T09",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 264,
"end": 276,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 264,
"end": 268,
"ctxt": 0
},
"kind": "null"
},
{
"type": "TsKeywordType",
"span": {
"start": 271,
"end": 276,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 278,
"end": 302,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 283,
"end": 286,
"ctxt": 0
},
"value": "T10",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 289,
"end": 301,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 289,
"end": 293,
"ctxt": 0
},
"kind": "null"
},
{
"type": "TsKeywordType",
"span": {
"start": 296,
"end": 301,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 303,
"end": 336,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 308,
"end": 311,
"ctxt": 0
},
"value": "T11",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 314,
"end": 335,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 314,
"end": 327,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 316,
"end": 325,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 316,
"end": 317,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 317,
"end": 325,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 319,
"end": 325,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
},
{
"type": "TsKeywordType",
"span": {
"start": 330,
"end": 335,
"ctxt": 0
},
"kind": "never"
}
]
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 337,
"end": 370,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 342,
"end": 345,
"ctxt": 0
},
"value": "T12",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 348,
"end": 369,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 348,
"end": 361,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 350,
"end": 359,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 351,
"end": 359,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
},
{
"type": "TsKeywordType",
"span": {
"start": 364,
"end": 369,
"ctxt": 0
},
"kind": "never"
}
]
}
}
],
"interpreter": null
}