mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Replace ternary expression
This commit is contained in:
parent
d8ee4116ef
commit
f4a6fb79da
@ -11040,7 +11040,7 @@ namespace ts {
|
||||
|
||||
function hasContextSensitiveReturnExpression(node: FunctionLikeDeclaration) {
|
||||
// TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value.
|
||||
return !node.body || node.body.kind === SyntaxKind.Block ? false : isContextSensitive(node.body);
|
||||
return !!node.body && node.body.kind !== SyntaxKind.Block && isContextSensitive(node.body);
|
||||
}
|
||||
|
||||
function isContextSensitiveFunctionOrObjectLiteralMethod(func: Node): func is FunctionExpression | ArrowFunction | MethodDeclaration {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user