{
  "type": "Program",
  "statements": [
    {
      "type": "VariableDeclaration",
      "declarations": [
        {
          "type": "VariableDeclarator",
          "id": {
            "type": "Identifier",
            "name": "o",
            "decorators": [],
            "loc": {
              "start": {
                "line": 1,
                "column": 5
              },
              "end": {
                "line": 1,
                "column": 6
              }
            }
          },
          "init": {
            "type": "ObjectExpression",
            "properties": [
              {
                "type": "Property",
                "method": false,
                "shorthand": false,
                "computed": false,
                "key": {
                  "type": "Identifier",
                  "name": "a",
                  "decorators": [],
                  "loc": {
                    "start": {
                      "line": 2,
                      "column": 5
                    },
                    "end": {
                      "line": 2,
                      "column": 6
                    }
                  }
                },
                "value": {
                  "type": "NumberLiteral",
                  "value": 12,
                  "loc": {
                    "start": {
                      "line": 2,
                      "column": 8
                    },
                    "end": {
                      "line": 2,
                      "column": 10
                    }
                  }
                },
                "kind": "init",
                "loc": {
                  "start": {
                    "line": 2,
                    "column": 5
                  },
                  "end": {
                    "line": 2,
                    "column": 10
                  }
                }
              },
              {
                "type": "Property",
                "method": true,
                "shorthand": false,
                "computed": false,
                "key": {
                  "type": "Identifier",
                  "name": "b",
                  "decorators": [],
                  "loc": {
                    "start": {
                      "line": 3,
                      "column": 5
                    },
                    "end": {
                      "line": 3,
                      "column": 6
                    }
                  }
                },
                "value": {
                  "type": "FunctionExpression",
                  "function": {
                    "type": "ScriptFunction",
                    "id": null,
                    "generator": false,
                    "async": false,
                    "expression": false,
                    "params": [
                      {
                        "type": "Identifier",
                        "name": "a",
                        "typeAnnotation": {
                          "type": "TSNumberKeyword",
                          "loc": {
                            "start": {
                              "line": 3,
                              "column": 10
                            },
                            "end": {
                              "line": 3,
                              "column": 16
                            }
                          }
                        },
                        "decorators": [],
                        "loc": {
                          "start": {
                            "line": 3,
                            "column": 7
                          },
                          "end": {
                            "line": 3,
                            "column": 8
                          }
                        }
                      },
                      {
                        "type": "Identifier",
                        "name": "b",
                        "typeAnnotation": {
                          "type": "TSStringKeyword",
                          "loc": {
                            "start": {
                              "line": 3,
                              "column": 21
                            },
                            "end": {
                              "line": 3,
                              "column": 27
                            }
                          }
                        },
                        "decorators": [],
                        "loc": {
                          "start": {
                            "line": 3,
                            "column": 18
                          },
                          "end": {
                            "line": 3,
                            "column": 19
                          }
                        }
                      }
                    ],
                    "body": {
                      "type": "BlockStatement",
                      "statements": [
                        {
                          "type": "ReturnStatement",
                          "argument": {
                            "type": "StringLiteral",
                            "value": "",
                            "loc": {
                              "start": {
                                "line": 3,
                                "column": 38
                              },
                              "end": {
                                "line": 3,
                                "column": 43
                              }
                            }
                          },
                          "loc": {
                            "start": {
                              "line": 3,
                              "column": 31
                            },
                            "end": {
                              "line": 3,
                              "column": 44
                            }
                          }
                        }
                      ],
                      "loc": {
                        "start": {
                          "line": 3,
                          "column": 29
                        },
                        "end": {
                          "line": 3,
                          "column": 46
                        }
                      }
                    },
                    "loc": {
                      "start": {
                        "line": 3,
                        "column": 6
                      },
                      "end": {
                        "line": 3,
                        "column": 46
                      }
                    }
                  },
                  "loc": {
                    "start": {
                      "line": 3,
                      "column": 6
                    },
                    "end": {
                      "line": 3,
                      "column": 46
                    }
                  }
                },
                "kind": "init",
                "loc": {
                  "start": {
                    "line": 3,
                    "column": 5
                  },
                  "end": {
                    "line": 3,
                    "column": 46
                  }
                }
              }
            ],
            "loc": {
              "start": {
                "line": 1,
                "column": 9
              },
              "end": {
                "line": 4,
                "column": 2
              }
            }
          },
          "loc": {
            "start": {
              "line": 1,
              "column": 5
            },
            "end": {
              "line": 4,
              "column": 2
            }
          }
        }
      ],
      "kind": "var",
      "loc": {
        "start": {
          "line": 1,
          "column": 1
        },
        "end": {
          "line": 4,
          "column": 2
        }
      }
    },
    {
      "type": "TSTypeAliasDeclaration",
      "id": {
        "type": "Identifier",
        "name": "A",
        "decorators": [],
        "loc": {
          "start": {
            "line": 6,
            "column": 6
          },
          "end": {
            "line": 6,
            "column": 7
          }
        }
      },
      "typeAnnotation": {
        "type": "TSTypeLiteral",
        "members": [
          {
            "type": "TSPropertySignature",
            "computed": false,
            "optional": false,
            "readonly": false,
            "key": {
              "type": "Identifier",
              "name": "a",
              "decorators": [],
              "loc": {
                "start": {
                  "line": 6,
                  "column": 29
                },
                "end": {
                  "line": 6,
                  "column": 30
                }
              }
            },
            "typeAnnotation": {
              "type": "TSTypeReference",
              "typeName": {
                "type": "Identifier",
                "name": "T",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 6,
                    "column": 32
                  },
                  "end": {
                    "line": 6,
                    "column": 33
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 6,
                  "column": 32
                },
                "end": {
                  "line": 6,
                  "column": 33
                }
              }
            },
            "loc": {
              "start": {
                "line": 6,
                "column": 29
              },
              "end": {
                "line": 6,
                "column": 34
              }
            }
          },
          {
            "type": "TSPropertySignature",
            "computed": false,
            "optional": false,
            "readonly": false,
            "key": {
              "type": "Identifier",
              "name": "b",
              "decorators": [],
              "loc": {
                "start": {
                  "line": 6,
                  "column": 35
                },
                "end": {
                  "line": 6,
                  "column": 36
                }
              }
            },
            "typeAnnotation": {
              "type": "TSTypeReference",
              "typeName": {
                "type": "Identifier",
                "name": "B",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 6,
                    "column": 38
                  },
                  "end": {
                    "line": 6,
                    "column": 39
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 6,
                  "column": 38
                },
                "end": {
                  "line": 6,
                  "column": 39
                }
              }
            },
            "loc": {
              "start": {
                "line": 6,
                "column": 35
              },
              "end": {
                "line": 6,
                "column": 41
              }
            }
          }
        ],
        "loc": {
          "start": {
            "line": 6,
            "column": 27
          },
          "end": {
            "line": 6,
            "column": 41
          }
        }
      },
      "typeParameters": {
        "type": "TSTypeParameterDeclaration",
        "params": [
          {
            "type": "TSTypeParameter",
            "name": {
              "type": "Identifier",
              "name": "T",
              "decorators": [],
              "loc": {
                "start": {
                  "line": 6,
                  "column": 8
                },
                "end": {
                  "line": 6,
                  "column": 9
                }
              }
            },
            "loc": {
              "start": {
                "line": 6,
                "column": 8
              },
              "end": {
                "line": 6,
                "column": 10
              }
            }
          },
          {
            "type": "TSTypeParameter",
            "name": {
              "type": "Identifier",
              "name": "B",
              "decorators": [],
              "loc": {
                "start": {
                  "line": 6,
                  "column": 11
                },
                "end": {
                  "line": 6,
                  "column": 12
                }
              }
            },
            "default": {
              "type": "TSTypeQuery",
              "exprName": {
                "type": "Identifier",
                "name": "o",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 6,
                    "column": 22
                  },
                  "end": {
                    "line": 6,
                    "column": 23
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 6,
                  "column": 15
                },
                "end": {
                  "line": 6,
                  "column": 23
                }
              }
            },
            "loc": {
              "start": {
                "line": 6,
                "column": 11
              },
              "end": {
                "line": 6,
                "column": 24
              }
            }
          }
        ],
        "loc": {
          "start": {
            "line": 6,
            "column": 7
          },
          "end": {
            "line": 6,
            "column": 24
          }
        }
      },
      "loc": {
        "start": {
          "line": 6,
          "column": 1
        },
        "end": {
          "line": 6,
          "column": 42
        }
      }
    },
    {
      "type": "EmptyStatement",
      "loc": {
        "start": {
          "line": 6,
          "column": 41
        },
        "end": {
          "line": 6,
          "column": 42
        }
      }
    },
    {
      "type": "VariableDeclaration",
      "declarations": [
        {
          "type": "VariableDeclarator",
          "id": {
            "type": "Identifier",
            "name": "a",
            "typeAnnotation": {
              "type": "TSTypeReference",
              "typeName": {
                "type": "Identifier",
                "name": "A",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 7,
                    "column": 8
                  },
                  "end": {
                    "line": 7,
                    "column": 9
                  }
                }
              },
              "typeParameters": {
                "type": "TSTypeParameterInstantiation",
                "params": [
                  {
                    "type": "TSStringKeyword",
                    "loc": {
                      "start": {
                        "line": 7,
                        "column": 10
                      },
                      "end": {
                        "line": 7,
                        "column": 16
                      }
                    }
                  }
                ],
                "loc": {
                  "start": {
                    "line": 7,
                    "column": 8
                  },
                  "end": {
                    "line": 7,
                    "column": 17
                  }
                }
              },
              "loc": {
                "start": {
                  "line": 7,
                  "column": 8
                },
                "end": {
                  "line": 7,
                  "column": 9
                }
              }
            },
            "decorators": [],
            "loc": {
              "start": {
                "line": 7,
                "column": 5
              },
              "end": {
                "line": 7,
                "column": 6
              }
            }
          },
          "init": null,
          "loc": {
            "start": {
              "line": 7,
              "column": 5
            },
            "end": {
              "line": 7,
              "column": 6
            }
          }
        }
      ],
      "kind": "var",
      "loc": {
        "start": {
          "line": 7,
          "column": 1
        },
        "end": {
          "line": 7,
          "column": 18
        }
      }
    },
    {
      "type": "ExpressionStatement",
      "expression": {
        "type": "AssignmentExpression",
        "operator": "=",
        "left": {
          "type": "Identifier",
          "name": "a",
          "decorators": [],
          "loc": {
            "start": {
              "line": 9,
              "column": 1
            },
            "end": {
              "line": 9,
              "column": 2
            }
          }
        },
        "right": {
          "type": "ObjectExpression",
          "properties": [
            {
              "type": "Property",
              "method": false,
              "shorthand": false,
              "computed": false,
              "key": {
                "type": "Identifier",
                "name": "a",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 9,
                    "column": 7
                  },
                  "end": {
                    "line": 9,
                    "column": 8
                  }
                }
              },
              "value": {
                "type": "StringLiteral",
                "value": "",
                "loc": {
                  "start": {
                    "line": 9,
                    "column": 10
                  },
                  "end": {
                    "line": 9,
                    "column": 15
                  }
                }
              },
              "kind": "init",
              "loc": {
                "start": {
                  "line": 9,
                  "column": 7
                },
                "end": {
                  "line": 9,
                  "column": 15
                }
              }
            },
            {
              "type": "Property",
              "method": false,
              "shorthand": false,
              "computed": false,
              "key": {
                "type": "Identifier",
                "name": "b",
                "decorators": [],
                "loc": {
                  "start": {
                    "line": 9,
                    "column": 17
                  },
                  "end": {
                    "line": 9,
                    "column": 18
                  }
                }
              },
              "value": {
                "type": "NumberLiteral",
                "value": 5,
                "loc": {
                  "start": {
                    "line": 9,
                    "column": 20
                  },
                  "end": {
                    "line": 9,
                    "column": 21
                  }
                }
              },
              "kind": "init",
              "loc": {
                "start": {
                  "line": 9,
                  "column": 17
                },
                "end": {
                  "line": 9,
                  "column": 21
                }
              }
            }
          ],
          "loc": {
            "start": {
              "line": 9,
              "column": 5
            },
            "end": {
              "line": 9,
              "column": 23
            }
          }
        },
        "loc": {
          "start": {
            "line": 9,
            "column": 1
          },
          "end": {
            "line": 9,
            "column": 23
          }
        }
      },
      "loc": {
        "start": {
          "line": 9,
          "column": 1
        },
        "end": {
          "line": 9,
          "column": 24
        }
      }
    }
  ],
  "loc": {
    "start": {
      "line": 1,
      "column": 1
    },
    "end": {
      "line": 10,
      "column": 1
    }
  }
}
TypeError: Type 'number' is not assignable to type '{ a: number; b(a: number, b: string) => string; }'. [generic_type_alias_8.ts:9:17]
