mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
PR cleanup
This commit is contained in:
@@ -568,8 +568,6 @@ namespace ts {
|
||||
* is created if `value` was appended.
|
||||
* @param value The value to append to the array. If `value` is `undefined`, nothing is
|
||||
* appended.
|
||||
* @param copyOnWrite Indicates whether to return a fresh array rather than modify the
|
||||
* existing array.
|
||||
*/
|
||||
export function append<T>(to: T[] | undefined, value: T | undefined): T[] | undefined {
|
||||
if (value === undefined) return to;
|
||||
|
||||
@@ -883,19 +883,6 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function getAllLabeledStatements(node: LabeledStatement): { statement: Statement; labeledStatements: LabeledStatement[]; } {
|
||||
switch (node.statement.kind) {
|
||||
case SyntaxKind.LabeledStatement:
|
||||
const result = getAllLabeledStatements(<LabeledStatement>node.statement);
|
||||
if (result) {
|
||||
result.labeledStatements.push(node);
|
||||
}
|
||||
return result;
|
||||
default:
|
||||
return { statement: <IterationStatement>node.statement, labeledStatements: [node] };
|
||||
}
|
||||
}
|
||||
|
||||
export function isFunctionBlock(node: Node) {
|
||||
return node && node.kind === SyntaxKind.Block && isFunctionLike(node.parent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user