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 d8ee411 commit f4a6fb7Copy full SHA for f4a6fb7
src/compiler/checker.ts
@@ -11040,7 +11040,7 @@ namespace ts {
11040
11041
function hasContextSensitiveReturnExpression(node: FunctionLikeDeclaration) {
11042
// TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value.
11043
- return !node.body || node.body.kind === SyntaxKind.Block ? false : isContextSensitive(node.body);
+ return !!node.body && node.body.kind !== SyntaxKind.Block && isContextSensitive(node.body);
11044
}
11045
11046
function isContextSensitiveFunctionOrObjectLiteralMethod(func: Node): func is FunctionExpression | ArrowFunction | MethodDeclaration {
0 commit comments