File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -24242,17 +24242,13 @@ namespace ts {
24242
24242
return !!(type.flags & TypeFlags.Instantiable && !maybeTypeOfKind(getBaseConstraintOrType(type), TypeFlags.Nullable));
24243
24243
}
24244
24244
24245
- function containsGenericType(type: Type): boolean {
24246
- return !!(type.flags & TypeFlags.Instantiable || type.flags & TypeFlags.UnionOrIntersection && some((type as UnionOrIntersectionType).types, containsGenericType));
24247
- }
24248
-
24249
24245
function hasNonBindingPatternContextualTypeWithNoGenericTypes(node: Node) {
24250
24246
// Computing the contextual type for a child of a JSX element involves resolving the type of the
24251
24247
// element's tag name, so we exclude that here to avoid circularities.
24252
24248
const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) &&
24253
24249
!((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) &&
24254
24250
getContextualType(node, ContextFlags.SkipBindingPatterns);
24255
- return contextualType && !someType( contextualType, containsGenericType );
24251
+ return contextualType && !(isGenericObjectType( contextualType) || isGenericIndexType(contextualType) );
24256
24252
}
24257
24253
24258
24254
function getNarrowableTypeForReference(type: Type, reference: Node, checkMode?: CheckMode) {
You can’t perform that action at this time.
0 commit comments