{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSTypeLiteral", "members": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 11 } } }, "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 19 } } }, "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 20 } } }, { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 22 } } }, "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 30 } } }, "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 32 } } } ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 32 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 6 } } }, "init": null, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 6 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 33 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "TSTypeLiteral", "members": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 11 } } }, "typeAnnotation": { "type": "TSTypeQuery", "exprName": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 20 }, "end": { "line": 18, "column": 21 } } }, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 21 } } }, "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 22 } } }, { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 24 } } }, "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 18, "column": 26 }, "end": { "line": 18, "column": 32 } } }, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 34 } } } ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 34 } } }, "decorators": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "init": null, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } } ], "kind": "var", "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 35 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 2 } } }, "right": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 6 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 6 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 7 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 7 } } } TypeError: Type '{ a: { a: number; b: string; }; b: string; }' is not assignable to type '{ a: number; b: string; }'. [objectLiteralAssignability17.ts:19:1]