{
  "type": "Program",
  "statements": [
    {
      "type": "TSDeclareFunction",
      "function": {
        "type": "ScriptFunction",
        "id": {
          "type": "Identifier",
          "name": "foo",
          "loc": {
            "start": {
              "line": 17,
              "column": 10
            },
            "end": {
              "line": 17,
              "column": 13
            }
          }
        },
        "generator": false,
        "async": false,
        "expression": false,
        "params": [
          {
            "type": "ArrayPattern",
            "elements": [
              {
                "type": "Identifier",
                "name": "x",
                "loc": {
                  "start": {
                    "line": 17,
                    "column": 15
                  },
                  "end": {
                    "line": 17,
                    "column": 16
                  }
                }
              }
            ],
            "typeAnnotation": {
              "type": "TSTupleType",
              "elementTypes": [
                {
                  "type": "TSNumberKeyword",
                  "loc": {
                    "start": {
                      "line": 17,
                      "column": 20
                    },
                    "end": {
                      "line": 17,
                      "column": 26
                    }
                  }
                }
              ],
              "loc": {
                "start": {
                  "line": 17,
                  "column": 19
                },
                "end": {
                  "line": 17,
                  "column": 27
                }
              }
            },
            "optional": true,
            "loc": {
              "start": {
                "line": 17,
                "column": 14
              },
              "end": {
                "line": 17,
                "column": 17
              }
            }
          }
        ],
        "returnType": {
          "type": "TSNumberKeyword",
          "loc": {
            "start": {
              "line": 17,
              "column": 31
            },
            "end": {
              "line": 17,
              "column": 37
            }
          }
        },
        "loc": {
          "start": {
            "line": 17,
            "column": 1
          },
          "end": {
            "line": 17,
            "column": 38
          }
        }
      },
      "loc": {
        "start": {
          "line": 17,
          "column": 1
        },
        "end": {
          "line": 17,
          "column": 38
        }
      }
    },
    {
      "type": "FunctionDeclaration",
      "function": {
        "type": "ScriptFunction",
        "id": {
          "type": "Identifier",
          "name": "foo",
          "loc": {
            "start": {
              "line": 18,
              "column": 10
            },
            "end": {
              "line": 18,
              "column": 13
            }
          }
        },
        "generator": false,
        "async": false,
        "expression": false,
        "params": [
          {
            "type": "RestElement",
            "argument": {
              "type": "Identifier",
              "name": "a",
              "typeAnnotation": {
                "type": "TSArrayType",
                "elementType": {
                  "type": "TSAnyKeyword",
                  "loc": {
                    "start": {
                      "line": 18,
                      "column": 19
                    },
                    "end": {
                      "line": 18,
                      "column": 22
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 18,
                    "column": 19
                  },
                  "end": {
                    "line": 18,
                    "column": 24
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 18,
                  "column": 17
                },
                "end": {
                  "line": 18,
                  "column": 18
                }
              }
            },
            "loc": {
              "start": {
                "line": 18,
                "column": 14
              },
              "end": {
                "line": 18,
                "column": 18
              }
            }
          }
        ],
        "returnType": {
          "type": "TSAnyKeyword",
          "loc": {
            "start": {
              "line": 18,
              "column": 28
            },
            "end": {
              "line": 18,
              "column": 31
            }
          }
        },
        "body": {
          "type": "BlockStatement",
          "statements": [],
          "loc": {
            "start": {
              "line": 18,
              "column": 32
            },
            "end": {
              "line": 18,
              "column": 34
            }
          }
        },
        "loc": {
          "start": {
            "line": 18,
            "column": 1
          },
          "end": {
            "line": 18,
            "column": 34
          }
        }
      },
      "loc": {
        "start": {
          "line": 18,
          "column": 1
        },
        "end": {
          "line": 18,
          "column": 34
        }
      }
    }
  ],
  "loc": {
    "start": {
      "line": 1,
      "column": 1
    },
    "end": {
      "line": 18,
      "column": 34
    }
  }
}
