255 lines
5.9 KiB
JSON

{
"type": "File",
"start": 0,
"end": 66,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 66
}
},
"program": {
"type": "Program",
"start": 0,
"end": 66,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 66
}
},
"sourceType": "module",
"body": [
{
"type": "FunctionDeclaration",
"start": 0,
"end": 65,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 65
}
},
"id": {
"type": "Identifier",
"start": 9,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "foo"
},
"name": "foo"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 13,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 13
},
"end": {
"line": 1,
"column": 21
},
"identifierName": "x"
},
"name": "x",
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 14,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 21
}
},
"typeAnnotation": {
"type": "MixedTypeAnnotation",
"start": 16,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 21
}
}
}
}
}
],
"predicate": {
"type": "InferredPredicate",
"start": 24,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 31
}
}
},
"returnType": null,
"body": {
"type": "BlockStatement",
"start": 32,
"end": 65,
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 65
}
},
"body": [
{
"type": "ReturnStatement",
"start": 34,
"end": 63,
"loc": {
"start": {
"line": 1,
"column": 34
},
"end": {
"line": 1,
"column": 63
}
},
"argument": {
"type": "BinaryExpression",
"start": 41,
"end": 62,
"loc": {
"start": {
"line": 1,
"column": 41
},
"end": {
"line": 1,
"column": 62
}
},
"left": {
"type": "UnaryExpression",
"start": 41,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 41
},
"end": {
"line": 1,
"column": 49
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 48,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 48
},
"end": {
"line": 1,
"column": 49
},
"identifierName": "x"
},
"name": "x"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "===",
"right": {
"type": "StringLiteral",
"start": 54,
"end": 62,
"loc": {
"start": {
"line": 1,
"column": 54
},
"end": {
"line": 1,
"column": 62
}
},
"extra": {
"rawValue": "string",
"raw": "\"string\""
},
"value": "string"
}
}
}
],
"directives": []
}
},
{
"type": "EmptyStatement",
"start": 65,
"end": 66,
"loc": {
"start": {
"line": 1,
"column": 65
},
"end": {
"line": 1,
"column": 66
}
}
}
],
"directives": []
}
}