Skip to content

Commit 486dc91

Browse files
author
Kanchalai Tanglertsampan
committed
Change comment to jsdoc
1 parent 61f199e commit 486dc91

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/compiler/parser.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,16 @@ namespace ts {
4646
}
4747
}
4848

49-
// Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
50-
// stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
51-
// embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
52-
// a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
49+
/**
50+
* Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
51+
* stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
52+
* embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
53+
* a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
54+
*
55+
* @param node a given node to visit its children
56+
* @param cbNode a callback to be invoked for all child nodes
57+
* @param cbNodeArray a callback to be invoked for embedded array
58+
*/
5359
export function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T {
5460
if (!node) {
5561
return;

0 commit comments

Comments
 (0)