Skip to content

Commit 5c10764

Browse files
committed
Fix function name
1 parent f2e30f6 commit 5c10764

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,7 @@ namespace ts {
30983098
let type: Type;
30993099
if (pattern.kind === SyntaxKind.ObjectBindingPattern) {
31003100
if (declaration.dotDotDotToken) {
3101-
if (isInvalidValidSpreadType(parentType)) {
3101+
if (isInvalidSpreadType(parentType)) {
31023102
error(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types);
31033103
return unknownType;
31043104
}
@@ -11449,7 +11449,7 @@ namespace ts {
1144911449
typeFlags = 0;
1145011450
}
1145111451
const type = checkExpression((memberDecl as SpreadAssignment).expression);
11452-
if (!(type.flags & TypeFlags.Any) && isInvalidValidSpreadType(type)) {
11452+
if (!(type.flags & TypeFlags.Any) && isInvalidSpreadType(type)) {
1145311453
error(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types);
1145411454
return unknownType;
1145511455
}
@@ -11527,12 +11527,12 @@ namespace ts {
1152711527
}
1152811528
}
1152911529

11530-
function isInvalidValidSpreadType(type: Type): boolean {
11530+
function isInvalidSpreadType(type: Type): boolean {
1153111531
if (type.flags & TypeFlags.Object) {
1153211532
return isGenericMappedType(type);
1153311533
}
1153411534
else if (type.flags & TypeFlags.UnionOrIntersection) {
11535-
return forEach((<UnionOrIntersectionType>type).types, isInvalidValidSpreadType);
11535+
return forEach((<UnionOrIntersectionType>type).types, isInvalidSpreadType);
1153611536
}
1153711537
return true;
1153811538
}

0 commit comments

Comments
 (0)