You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiler/checker.ts
+22-3
Original file line number
Diff line number
Diff line change
@@ -23042,7 +23042,7 @@ namespace ts {
23042
23042
if (result) {
23043
23043
return result;
23044
23044
}
23045
-
if (!(contextFlags! & ContextFlags.SkipBindingPatterns) && isBindingPattern(declaration.name)) { // This is less a contextual type and more an implied shape - in some cases, this may be undesirable
23045
+
if (!(contextFlags! & ContextFlags.SkipBindingPatternsAndUnusedExpressions) && isBindingPattern(declaration.name)) { // This is less a contextual type and more an implied shape - in some cases, this may be undesirable
Copy file name to clipboardExpand all lines: src/compiler/types.ts
+1-1
Original file line number
Diff line number
Diff line change
@@ -4139,7 +4139,7 @@ namespace ts {
4139
4139
Signature=1<<0,// Obtaining contextual signature
4140
4140
NoConstraints=1<<1,// Don't obtain type variable constraints
4141
4141
Completions=1<<2,// Ignore inference to current node and parent nodes out to the containing call for completions
4142
-
SkipBindingPatterns=1<<3,// Ignore contextual types applied by binding patterns
4142
+
SkipBindingPatternsAndUnusedExpressions=1<<3,// Ignore contextual types applied by binding patterns and do not use `void` as the contextual type for unused expressions
4143
4143
}
4144
4144
4145
4145
// NOTE: If modifying this enum, must modify `TypeFormatFlags` too!
0 commit comments