mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
88 lines
3.5 KiB
JSON
88 lines
3.5 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":66,"index":66}},
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":66,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":66,"index":66}},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":65,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":65,"index":65}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"foo"},
|
|
"name": "foo"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"start":13,"end":21,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":21,"index":21},"identifierName":"x"},
|
|
"name": "x",
|
|
"typeAnnotation": {
|
|
"type": "TypeAnnotation",
|
|
"start":14,"end":21,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":21,"index":21}},
|
|
"typeAnnotation": {
|
|
"type": "MixedTypeAnnotation",
|
|
"start":16,"end":21,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":21,"index":21}}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"predicate": {
|
|
"type": "InferredPredicate",
|
|
"start":24,"end":31,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":31,"index":31}}
|
|
},
|
|
"returnType": null,
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":32,"end":65,"loc":{"start":{"line":1,"column":32,"index":32},"end":{"line":1,"column":65,"index":65}},
|
|
"body": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"start":34,"end":63,"loc":{"start":{"line":1,"column":34,"index":34},"end":{"line":1,"column":63,"index":63}},
|
|
"argument": {
|
|
"type": "BinaryExpression",
|
|
"start":41,"end":62,"loc":{"start":{"line":1,"column":41,"index":41},"end":{"line":1,"column":62,"index":62}},
|
|
"left": {
|
|
"type": "UnaryExpression",
|
|
"start":41,"end":49,"loc":{"start":{"line":1,"column":41,"index":41},"end":{"line":1,"column":49,"index":49}},
|
|
"operator": "typeof",
|
|
"prefix": true,
|
|
"argument": {
|
|
"type": "Identifier",
|
|
"start":48,"end":49,"loc":{"start":{"line":1,"column":48,"index":48},"end":{"line":1,"column":49,"index":49},"identifierName":"x"},
|
|
"name": "x"
|
|
}
|
|
},
|
|
"operator": "===",
|
|
"right": {
|
|
"type": "StringLiteral",
|
|
"start":54,"end":62,"loc":{"start":{"line":1,"column":54,"index":54},"end":{"line":1,"column":62,"index":62}},
|
|
"extra": {
|
|
"rawValue": "string",
|
|
"raw": "\"string\""
|
|
},
|
|
"value": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
},
|
|
{
|
|
"type": "EmptyStatement",
|
|
"start":65,"end":66,"loc":{"start":{"line":1,"column":65,"index":65},"end":{"line":1,"column":66,"index":66}}
|
|
}
|
|
],
|
|
"directives": [],
|
|
"extra": {
|
|
"topLevelAwait": false
|
|
}
|
|
}
|
|
}
|