mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-25 16:07:52 -05:00
Always make a new jsxAttributes type, dont reuse emptyObjectType (#22810)
* Always make a new jsxAttributes type, dont reuse emptyObjectType * Break up conditional a bit
This commit is contained in:
@@ -15398,7 +15398,10 @@ namespace ts {
|
||||
if (hasSpreadAnyType) {
|
||||
return anyType;
|
||||
}
|
||||
return typeToIntersect && spread !== emptyObjectType ? getIntersectionType([typeToIntersect, spread]) : (typeToIntersect || spread);
|
||||
if (typeToIntersect && spread !== emptyObjectType) {
|
||||
return getIntersectionType([typeToIntersect, spread]);
|
||||
}
|
||||
return typeToIntersect || (spread === emptyObjectType ? createJsxAttributesType() : spread);
|
||||
|
||||
/**
|
||||
* Create anonymous type from given attributes symbol table.
|
||||
|
||||
Reference in New Issue
Block a user