We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eac0738 commit ef60613Copy full SHA for ef60613
src/compiler/checker.ts
@@ -14251,7 +14251,7 @@ namespace ts {
14251
14252
function hasContextSensitiveReturnExpression(node: FunctionLikeDeclaration) {
14253
// TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value.
14254
- return !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== SyntaxKind.Block && isContextSensitive(node.body);
+ return !node.typeParameters && !getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== SyntaxKind.Block && isContextSensitive(node.body);
14255
}
14256
14257
function isContextSensitiveFunctionOrObjectLiteralMethod(func: Node): func is FunctionExpression | ArrowFunction | MethodDeclaration {
0 commit comments