mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 10:00:13 -06:00
Use 'append' helper more (#21125)
This commit is contained in:
parent
ddd8e759c1
commit
102368332e
@ -6603,10 +6603,7 @@ namespace ts {
|
||||
const start = scanner.getStartPos();
|
||||
let children: JSDocParameterTag[];
|
||||
while (child = tryParse(() => parseChildParameterOrPropertyTag(PropertyLikeParse.Parameter, name))) {
|
||||
if (!children) {
|
||||
children = [];
|
||||
}
|
||||
children.push(child);
|
||||
children = append(children, child);
|
||||
}
|
||||
if (children) {
|
||||
jsdocTypeLiteral = <JSDocTypeLiteral>createNode(SyntaxKind.JSDocTypeLiteral, start);
|
||||
@ -6723,10 +6720,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!jsdocTypeLiteral.jsDocPropertyTags) {
|
||||
jsdocTypeLiteral.jsDocPropertyTags = [] as MutableNodeArray<JSDocPropertyTag>;
|
||||
}
|
||||
(jsdocTypeLiteral.jsDocPropertyTags as MutableNodeArray<JSDocPropertyTag>).push(child);
|
||||
jsdocTypeLiteral.jsDocPropertyTags = append(jsdocTypeLiteral.jsDocPropertyTags as MutableNodeArray<JSDocPropertyTag>, child);
|
||||
}
|
||||
}
|
||||
if (jsdocTypeLiteral) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user