mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Explain writeSpreadType a little better
This commit is contained in:
parent
24300932cf
commit
a94fb2f5a3
@ -2338,6 +2338,8 @@ namespace ts {
|
||||
inObjectTypeLiteral = saveInObjectTypeLiteral;
|
||||
}
|
||||
if (type.right.symbol === container) {
|
||||
// if type.right was written as part of the spread type, don't surround with ...{ }.
|
||||
// this gives { a: number, ... T } instead of { ...{ a: number }, ...T }
|
||||
const saveInObjectTypeLiteral = inObjectTypeLiteral;
|
||||
inObjectTypeLiteral = true;
|
||||
writeObjectLiteralType(resolveStructuredTypeMembers(type.right));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user