File tree 1 file changed +3
-15
lines changed
1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -11539,21 +11539,9 @@ namespace ts {
11539
11539
}
11540
11540
11541
11541
function isValidSpreadType(type: Type): boolean {
11542
- if (type.flags & (TypeFlags.Any | TypeFlags.Null | TypeFlags.Undefined)) {
11543
- return true;
11544
- }
11545
- if (type.flags & TypeFlags.Object) {
11546
- return !isGenericMappedType(type);
11547
- }
11548
- else if (type.flags & TypeFlags.UnionOrIntersection) {
11549
- for (const t of (<UnionOrIntersectionType>type).types) {
11550
- if (!isValidSpreadType(t)) {
11551
- return false;
11552
- }
11553
- }
11554
- return true;
11555
- }
11556
- return false;
11542
+ return !!(type.flags & (TypeFlags.Any | TypeFlags.Null | TypeFlags.Undefined) ||
11543
+ type.flags & TypeFlags.Object && !isGenericMappedType(type) ||
11544
+ type.flags & TypeFlags.UnionOrIntersection && !forEach((<UnionOrIntersectionType>type).types, t => !isValidSpreadType(t)));
11557
11545
}
11558
11546
11559
11547
function checkJsxSelfClosingElement(node: JsxSelfClosingElement) {
You can’t perform that action at this time.
0 commit comments