{
  "type": "Program",
  "statements": [
    {
      "type": "VariableDeclaration",
      "declarations": [
        {
          "type": "VariableDeclarator",
          "id": {
            "type": "Identifier",
            "name": "a",
            "typeAnnotation": {
              "type": "TSImportType",
              "parameter": {
                "type": "TSLiteralType",
                "literal": {
                  "type": "StringLiteral",
                  "value": "tar",
                  "loc": {
                    "start": {
                      "line": 1,
                      "column": 15
                    },
                    "end": {
                      "line": 1,
                      "column": 20
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 1,
                    "column": 15
                  },
                  "end": {
                    "line": 1,
                    "column": 20
                  }
                }
              },
              "isTypeOf": false,
              "loc": {
                "start": {
                  "line": 1,
                  "column": 8
                },
                "end": {
                  "line": 1,
                  "column": 22
                }
              }
            },
            "decorators": [],
            "loc": {
              "start": {
                "line": 1,
                "column": 5
              },
              "end": {
                "line": 1,
                "column": 6
              }
            }
          },
          "init": null,
          "loc": {
            "start": {
              "line": 1,
              "column": 5
            },
            "end": {
              "line": 1,
              "column": 6
            }
          }
        }
      ],
      "kind": "var",
      "loc": {
        "start": {
          "line": 1,
          "column": 1
        },
        "end": {
          "line": 1,
          "column": 22
        }
      }
    },
    {
      "type": "TSInterfaceDeclaration",
      "body": {
        "type": "TSInterfaceBody",
        "body": [
          {
            "type": "TSMethodSignature",
            "computed": false,
            "optional": false,
            "key": {
              "type": "Identifier",
              "name": "k",
              "decorators": [],
              "loc": {
                "start": {
                  "line": 4,
                  "column": 5
                },
                "end": {
                  "line": 4,
                  "column": 6
                }
              }
            },
            "params": [],
            "typeAnnotation": {
              "type": "TSImportType",
              "parameter": {
                "type": "TSLiteralType",
                "literal": {
                  "type": "StringLiteral",
                  "value": "foo",
                  "loc": {
                    "start": {
                      "line": 4,
                      "column": 17
                    },
                    "end": {
                      "line": 4,
                      "column": 22
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 4,
                    "column": 17
                  },
                  "end": {
                    "line": 4,
                    "column": 22
                  }
                }
              },
              "qualifier": {
                "type": "Identifier",
                "name": "b",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 4,
                    "column": 24
                  },
                  "end": {
                    "line": 4,
                    "column": 25
                  }
                }
              },
              "isTypeOf": false,
              "loc": {
                "start": {
                  "line": 4,
                  "column": 10
                },
                "end": {
                  "line": 4,
                  "column": 26
                }
              }
            },
            "loc": {
              "start": {
                "line": 4,
                "column": 5
              },
              "end": {
                "line": 4,
                "column": 26
              }
            }
          },
          {
            "type": "TSIndexSignature",
            "parameters": {
              "type": "Identifier",
              "name": "x",
              "typeAnnotation": {
                "type": "TSNumberKeyword",
                "loc": {
                  "start": {
                    "line": 5,
                    "column": 9
                  },
                  "end": {
                    "line": 5,
                    "column": 15
                  }
                }
              },
              "decorators": [],
              "loc": {
                "start": {
                  "line": 5,
                  "column": 6
                },
                "end": {
                  "line": 5,
                  "column": 7
                }
              }
            },
            "typeAnnotation": {
              "type": "TSImportType",
              "parameter": {
                "type": "TSLiteralType",
                "literal": {
                  "type": "StringLiteral",
                  "value": "baz",
                  "loc": {
                    "start": {
                      "line": 5,
                      "column": 32
                    },
                    "end": {
                      "line": 5,
                      "column": 37
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 5,
                    "column": 32
                  },
                  "end": {
                    "line": 5,
                    "column": 37
                  }
                }
              },
              "qualifier": {
                "type": "Identifier",
                "name": "t",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 5,
                    "column": 39
                  },
                  "end": {
                    "line": 5,
                    "column": 40
                  }
                }
              },
              "isTypeOf": true,
              "loc": {
                "start": {
                  "line": 5,
                  "column": 18
                },
                "end": {
                  "line": 6,
                  "column": 2
                }
              }
            },
            "readonly": false,
            "loc": {
              "start": {
                "line": 5,
                "column": 5
              },
              "end": {
                "line": 6,
                "column": 2
              }
            }
          }
        ],
        "loc": {
          "start": {
            "line": 3,
            "column": 13
          },
          "end": {
            "line": 6,
            "column": 2
          }
        }
      },
      "id": {
        "type": "Identifier",
        "name": "B",
        "decorators": [],
        "loc": {
          "start": {
            "line": 3,
            "column": 11
          },
          "end": {
            "line": 3,
            "column": 12
          }
        }
      },
      "extends": [],
      "loc": {
        "start": {
          "line": 3,
          "column": 1
        },
        "end": {
          "line": 6,
          "column": 2
        }
      }
    },
    {
      "type": "FunctionDeclaration",
      "function": {
        "type": "ScriptFunction",
        "id": {
          "type": "Identifier",
          "name": "k",
          "decorators": [],
          "loc": {
            "start": {
              "line": 8,
              "column": 10
            },
            "end": {
              "line": 8,
              "column": 11
            }
          }
        },
        "generator": false,
        "async": false,
        "expression": false,
        "params": [
          {
            "type": "Identifier",
            "name": "a",
            "typeAnnotation": {
              "type": "TSImportType",
              "parameter": {
                "type": "TSLiteralType",
                "literal": {
                  "type": "StringLiteral",
                  "value": "bar",
                  "loc": {
                    "start": {
                      "line": 8,
                      "column": 22
                    },
                    "end": {
                      "line": 8,
                      "column": 27
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 8,
                    "column": 22
                  },
                  "end": {
                    "line": 8,
                    "column": 27
                  }
                }
              },
              "qualifier": {
                "type": "TSQualifiedName",
                "left": {
                  "type": "TSQualifiedName",
                  "left": {
                    "type": "Identifier",
                    "name": "r",
                    "decorators": [],
                    "loc": {
                      "start": {
                        "line": 8,
                        "column": 29
                      },
                      "end": {
                        "line": 8,
                        "column": 30
                      }
                    }
                  },
                  "right": {
                    "type": "Identifier",
                    "name": "t",
                    "decorators": [],
                    "loc": {
                      "start": {
                        "line": 8,
                        "column": 31
                      },
                      "end": {
                        "line": 8,
                        "column": 32
                      }
                    }
                  },
                  "loc": {
                    "start": {
                      "line": 8,
                      "column": 29
                    },
                    "end": {
                      "line": 8,
                      "column": 32
                    }
                  }
                },
                "right": {
                  "type": "Identifier",
                  "name": "e",
                  "decorators": [],
                  "loc": {
                    "start": {
                      "line": 8,
                      "column": 33
                    },
                    "end": {
                      "line": 8,
                      "column": 34
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 8,
                    "column": 29
                  },
                  "end": {
                    "line": 8,
                    "column": 35
                  }
                }
              },
              "isTypeOf": false,
              "loc": {
                "start": {
                  "line": 8,
                  "column": 15
                },
                "end": {
                  "line": 8,
                  "column": 35
                }
              }
            },
            "decorators": [],
            "loc": {
              "start": {
                "line": 8,
                "column": 12
              },
              "end": {
                "line": 8,
                "column": 13
              }
            }
          }
        ],
        "returnType": {
          "type": "TSImportType",
          "parameter": {
            "type": "TSLiteralType",
            "literal": {
              "type": "StringLiteral",
              "value": "foo",
              "loc": {
                "start": {
                  "line": 8,
                  "column": 44
                },
                "end": {
                  "line": 8,
                  "column": 49
                }
              }
            },
            "loc": {
              "start": {
                "line": 8,
                "column": 44
              },
              "end": {
                "line": 8,
                "column": 49
              }
            }
          },
          "typeParameters": {
            "type": "TSTypeParameterInstantiation",
            "params": [
              {
                "type": "TSFunctionType",
                "params": [
                  {
                    "type": "Identifier",
                    "name": "a",
                    "typeAnnotation": {
                      "type": "TSUnionType",
                      "types": [
                        {
                          "type": "TSNumberKeyword",
                          "loc": {
                            "start": {
                              "line": 8,
                              "column": 57
                            },
                            "end": {
                              "line": 8,
                              "column": 63
                            }
                          }
                        },
                        {
                          "type": "TSStringKeyword",
                          "loc": {
                            "start": {
                              "line": 8,
                              "column": 66
                            },
                            "end": {
                              "line": 8,
                              "column": 72
                            }
                          }
                        }
                      ],
                      "loc": {
                        "start": {
                          "line": 8,
                          "column": 57
                        },
                        "end": {
                          "line": 8,
                          "column": 72
                        }
                      }
                    },
                    "decorators": [],
                    "loc": {
                      "start": {
                        "line": 8,
                        "column": 55
                      },
                      "end": {
                        "line": 8,
                        "column": 56
                      }
                    }
                  },
                  {
                    "type": "Identifier",
                    "name": "b",
                    "typeAnnotation": {
                      "type": "TSImportType",
                      "parameter": {
                        "type": "TSLiteralType",
                        "literal": {
                          "type": "StringLiteral",
                          "value": "a",
                          "loc": {
                            "start": {
                              "line": 8,
                              "column": 91
                            },
                            "end": {
                              "line": 8,
                              "column": 94
                            }
                          }
                        },
                        "loc": {
                          "start": {
                            "line": 8,
                            "column": 91
                          },
                          "end": {
                            "line": 8,
                            "column": 94
                          }
                        }
                      },
                      "typeParameters": {
                        "type": "TSTypeParameterInstantiation",
                        "params": [
                          {
                            "type": "TSTupleType",
                            "elementTypes": [
                              {
                                "type": "TSNumberKeyword",
                                "loc": {
                                  "start": {
                                    "line": 8,
                                    "column": 97
                                  },
                                  "end": {
                                    "line": 8,
                                    "column": 104
                                  }
                                }
                              },
                              {
                                "type": "TSStringKeyword",
                                "loc": {
                                  "start": {
                                    "line": 8,
                                    "column": 105
                                  },
                                  "end": {
                                    "line": 8,
                                    "column": 112
                                  }
                                }
                              }
                            ],
                            "loc": {
                              "start": {
                                "line": 8,
                                "column": 96
                              },
                              "end": {
                                "line": 8,
                                "column": 112
                              }
                            }
                          },
                          {
                            "type": "TSTypeLiteral",
                            "members": [],
                            "loc": {
                              "start": {
                                "line": 8,
                                "column": 114
                              },
                              "end": {
                                "line": 8,
                                "column": 116
                              }
                            }
                          }
                        ],
                        "loc": {
                          "start": {
                            "line": 8,
                            "column": 95
                          },
                          "end": {
                            "line": 8,
                            "column": 117
                          }
                        }
                      },
                      "isTypeOf": true,
                      "loc": {
                        "start": {
                          "line": 8,
                          "column": 77
                        },
                        "end": {
                          "line": 8,
                          "column": 118
                        }
                      }
                    },
                    "decorators": [],
                    "loc": {
                      "start": {
                        "line": 8,
                        "column": 74
                      },
                      "end": {
                        "line": 8,
                        "column": 75
                      }
                    }
                  }
                ],
                "typeParameters": {
                  "type": "TSTypeParameterDeclaration",
                  "params": [
                    {
                      "type": "TSTypeParameter",
                      "name": {
                        "type": "Identifier",
                        "name": "A",
                        "decorators": [],
                        "loc": {
                          "start": {
                            "line": 8,
                            "column": 52
                          },
                          "end": {
                            "line": 8,
                            "column": 53
                          }
                        }
                      },
                      "loc": {
                        "start": {
                          "line": 8,
                          "column": 52
                        },
                        "end": {
                          "line": 8,
                          "column": 54
                        }
                      }
                    }
                  ],
                  "loc": {
                    "start": {
                      "line": 8,
                      "column": 51
                    },
                    "end": {
                      "line": 8,
                      "column": 54
                    }
                  }
                },
                "returnType": {
                  "type": "TSArrayType",
                  "elementType": {
                    "type": "TSNumberKeyword",
                    "loc": {
                      "start": {
                        "line": 8,
                        "column": 122
                      },
                      "end": {
                        "line": 8,
                        "column": 128
                      }
                    }
                  },
                  "loc": {
                    "start": {
                      "line": 8,
                      "column": 122
                    },
                    "end": {
                      "line": 8,
                      "column": 130
                    }
                  }
                },
                "loc": {
                  "start": {
                    "line": 8,
                    "column": 51
                  },
                  "end": {
                    "line": 8,
                    "column": 130
                  }
                }
              }
            ],
            "loc": {
              "start": {
                "line": 8,
                "column": 50
              },
              "end": {
                "line": 8,
                "column": 131
              }
            }
          },
          "isTypeOf": false,
          "loc": {
            "start": {
              "line": 8,
              "column": 37
            },
            "end": {
              "line": 8,
              "column": 133
            }
          }
        },
        "body": {
          "type": "BlockStatement",
          "statements": [],
          "loc": {
            "start": {
              "line": 8,
              "column": 132
            },
            "end": {
              "line": 10,
              "column": 2
            }
          }
        },
        "loc": {
          "start": {
            "line": 8,
            "column": 1
          },
          "end": {
            "line": 10,
            "column": 2
          }
        }
      },
      "loc": {
        "start": {
          "line": 8,
          "column": 1
        },
        "end": {
          "line": 10,
          "column": 2
        }
      }
    }
  ],
  "loc": {
    "start": {
      "line": 1,
      "column": 1
    },
    "end": {
      "line": 10,
      "column": 2
    }
  }
}
