TypeScript/tests/cases/compiler/contextualSignature_objectLiteralMethodMayReturnNever.ts
Andy c6e4373403
In checkAndAggregateReturnExpressionTypes, treat MethodDeclaration in an object literal same as a FunctionExpression (#20052)
* In checkAndAggregateReturnExpressionTypes, treat MethodDeclaration in an object literal same as a FunctionExpression

* Add original test case
2018-01-05 12:34:01 -08:00

3 lines
91 B
TypeScript

interface I { m(): number; }
const o: I = { m() { throw new Error("not implemented"); } };