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

413 lines
9.5 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 24,
"end": 354,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 24,
"end": 76,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 39,
"end": 46,
"ctxt": 0
},
"value": "*.foo",
"raw": "\"*.foo\""
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 47,
"end": 76,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 51,
"end": 74,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 55,
"end": 73,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 65,
"ctxt": 0
},
"value": "everywhere",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 65,
"end": 73,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 67,
"end": 73,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 102,
"end": 159,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 111,
"end": 121,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 111,
"end": 121,
"ctxt": 0
},
"value": "everywhere",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 123,
"end": 130,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 123,
"end": 130,
"ctxt": 0
},
"value": "onlyInA",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 132,
"end": 143,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 132,
"end": 143,
"ctxt": 0
},
"value": "alsoOnlyInA",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 151,
"end": 158,
"ctxt": 0
},
"value": "a.foo",
"raw": "\"a.foo\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 160,
"end": 209,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 175,
"end": 182,
"ctxt": 0
},
"value": "a.foo",
"raw": "\"a.foo\""
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 183,
"end": 209,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 187,
"end": 207,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 191,
"end": 206,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 191,
"end": 198,
"ctxt": 0
},
"value": "onlyInA",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 198,
"end": 206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 200,
"end": 206,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 234,
"end": 291,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 243,
"end": 253,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 243,
"end": 253,
"ctxt": 0
},
"value": "everywhere",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 255,
"end": 262,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 255,
"end": 262,
"ctxt": 0
},
"value": "onlyInA",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 264,
"end": 275,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 264,
"end": 275,
"ctxt": 0
},
"value": "alsoOnlyInA",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 283,
"end": 290,
"ctxt": 0
},
"value": "b.foo",
"raw": "\"b.foo\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 301,
"end": 354,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 316,
"end": 323,
"ctxt": 0
},
"value": "a.foo",
"raw": "\"a.foo\""
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 324,
"end": 354,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 328,
"end": 352,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 332,
"end": 351,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 332,
"end": 343,
"ctxt": 0
},
"value": "alsoOnlyInA",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 343,
"end": 351,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 345,
"end": 351,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
}
]
}
}
],
"interpreter": null
}