{ "type": "Program", "statements": [ { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "GetName", "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 13 } } }, "typeAnnotation": { "type": "TSMappedType", "typeParameter": { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "p", "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 7 } } }, "constraint": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "Type", "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 15 } } }, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 15 } } }, "in": false, "out": false, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 15 } } }, "nameKeyType": { "type": "TSIndexedAccessType", "objectType": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "p", "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 20 } } }, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 21 } } }, "indexType": { "type": "TSLiteralType", "literal": { "type": "StringLiteral", "value": "name", "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 27 } } }, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 27 } } }, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 29 } } }, "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 18, "column": 32 }, "end": { "line": 18, "column": 38 } } }, "loc": { "start": { "line": 17, "column": 45 }, "end": { "line": 19, "column": 2 } } }, "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "Type", "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 18 } } }, "constraint": { "type": "TSTypeLiteral", "members": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "name", "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 32 } } }, "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 34 }, "end": { "line": 17, "column": 40 } } }, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 41 } } } ], "loc": { "start": { "line": 17, "column": 27 }, "end": { "line": 17, "column": 41 } } }, "in": false, "out": false, "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 42 } } } ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 42 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 20, "column": 5 } } }, { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "NameA", "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 11 } } }, "typeAnnotation": { "type": "TSTypeLiteral", "members": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "name", "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 19 } } }, "typeAnnotation": { "type": "TSLiteralType", "literal": { "type": "StringLiteral", "value": "A", "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 24 } } }, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 24 } } }, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 25 } } }, { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "kind", "loc": { "start": { "line": 20, "column": 26 }, "end": { "line": 20, "column": 30 } } }, "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 20, "column": 32 }, "end": { "line": 20, "column": 38 } } }, "loc": { "start": { "line": 20, "column": 26 }, "end": { "line": 20, "column": 39 } } } ], "loc": { "start": { "line": 20, "column": 14 }, "end": { "line": 20, "column": 39 } } }, "loc": { "start": { "line": 20, "column": 1 }, "end": { "line": 21, "column": 5 } } }, { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "NameB", "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 11 } } }, "typeAnnotation": { "type": "TSTypeLiteral", "members": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "name", "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 21, "column": 19 } } }, "typeAnnotation": { "type": "TSLiteralType", "literal": { "type": "StringLiteral", "value": "B", "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 24 } } }, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 24 } } }, "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 21, "column": 25 } } }, { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "kind", "loc": { "start": { "line": 21, "column": 26 }, "end": { "line": 21, "column": 30 } } }, "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 21, "column": 32 }, "end": { "line": 21, "column": 38 } } }, "loc": { "start": { "line": 21, "column": 26 }, "end": { "line": 21, "column": 39 } } } ], "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 39 } } }, "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 22, "column": 5 } } }, { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "NameC", "loc": { "start": { "line": 22, "column": 6 }, "end": { "line": 22, "column": 11 } } }, "typeAnnotation": { "type": "TSTypeLiteral", "members": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "name", "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 19 } } }, "typeAnnotation": { "type": "TSLiteralType", "literal": { "type": "StringLiteral", "value": "C", "loc": { "start": { "line": 22, "column": 21 }, "end": { "line": 22, "column": 24 } } }, "loc": { "start": { "line": 22, "column": 21 }, "end": { "line": 22, "column": 24 } } }, "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 25 } } }, { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "kind", "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 22, "column": 30 } } }, "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 22, "column": 32 }, "end": { "line": 22, "column": 38 } } }, "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 22, "column": 39 } } } ], "loc": { "start": { "line": 22, "column": 14 }, "end": { "line": 22, "column": 39 } } }, "loc": { "start": { "line": 22, "column": 1 }, "end": { "line": 23, "column": 5 } } }, { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "Name", "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 10 } } }, "typeAnnotation": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "GetName", "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 20 } } }, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "TSUnionType", "types": [ { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "NameA", "loc": { "start": { "line": 23, "column": 21 }, "end": { "line": 23, "column": 26 } } }, "loc": { "start": { "line": 23, "column": 21 }, "end": { "line": 23, "column": 26 } } }, { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "NameB", "loc": { "start": { "line": 23, "column": 29 }, "end": { "line": 23, "column": 34 } } }, "loc": { "start": { "line": 23, "column": 29 }, "end": { "line": 23, "column": 34 } } }, { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "NameC", "loc": { "start": { "line": 23, "column": 37 }, "end": { "line": 23, "column": 42 } } }, "loc": { "start": { "line": 23, "column": 37 }, "end": { "line": 23, "column": 42 } } } ], "loc": { "start": { "line": 23, "column": 21 }, "end": { "line": 23, "column": 42 } } } ], "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 23, "column": 43 } } }, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 20 } } }, "loc": { "start": { "line": 23, "column": 1 }, "end": { "line": 23, "column": 43 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 23, "column": 43 } } }