File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27601,7 +27601,7 @@ namespace ts {
27601
27601
// replaced with their constraints similar to the apparent type.
27602
27602
if (
27603
27603
inferenceContext &&
27604
- (contextFlags! & ContextFlags.Signature || maybeTypeOfKind(contextualType, TypeFlags.Conditional) || maybeTypeOfKind(contextualType, TypeFlags.IndexedAccess)) &&
27604
+ (contextFlags! & ContextFlags.Signature || maybeTypeOfKind(contextualType, TypeFlags.Conditional | TypeFlags.IndexedAccess)) &&
27605
27605
some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)
27606
27606
) {
27607
27607
// For contextual signatures we incorporate all inferences made so far, e.g. from return
@@ -33914,7 +33914,7 @@ namespace ts {
33914
33914
// Return true if type might be of the given kind. A union or intersection type might be of a given
33915
33915
// kind if at least one constituent type is of the given kind.
33916
33916
function maybeTypeOfKind(type: Type, kind: TypeFlags): boolean {
33917
- if (type.flags & kind) {
33917
+ if (( type.flags & kind) !== 0 ) {
33918
33918
return true;
33919
33919
}
33920
33920
if (type.flags & TypeFlags.UnionOrIntersection) {
You can’t perform that action at this time.
0 commit comments