{ "type": "Program", "statements": [ { "type": "TSInterfaceDeclaration", "body": { "type": "TSInterfaceBody", "body": [ { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 14 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 15 } } }, { "type": "TSMethodSignature", "computed": false, "optional": false, "key": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 6 } } }, "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSAnyKeyword", "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 13 } } }, "decorators": [], "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 8 } } }, { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "TSAnyKeyword", "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 21 } } }, "decorators": [], "loc": { "start": { "line": 19, "column": 15 }, "end": { "line": 19, "column": 16 } } } ], "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 19, "column": 24 }, "end": { "line": 19, "column": 30 } } }, "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 31 } } }, { "type": "TSCallSignatureDeclaration", "params": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 20, "column": 15 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 7 } } }, { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "TSStringKeyword", "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 26 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 20, "column": 18 } } } ], "returnType": { "type": "TSBooleanKeyword", "loc": { "start": { "line": 20, "column": 29 }, "end": { "line": 20, "column": 36 } } }, "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 37 } } }, { "type": "TSConstructSignatureDeclaration", "params": [], "returnType": { "type": "TSStringKeyword", "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 18 } } }, "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 22, "column": 2 } } } ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 22, "column": 2 } } }, "id": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 12 } } }, "extends": [], "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 22, "column": 2 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 6 } } }, "init": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 24, "column": 9 }, "end": { "line": 24, "column": 10 } } }, "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 10 } } } ], "kind": "var", "loc": { "start": { "line": 24, "column": 1 }, "end": { "line": 24, "column": 11 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 25, "column": 1 } } } TypeError: a only refers to a type, but is being used as a value here. [interfaceUsedAsValue.ts:24:9]