UNPKG
aomao_plugin-mind
Version:
latest (2.7.37)
2.7.37
2.7.34
2.7.33
脑图 Mind
github.com/yanmao-cc/am-editor/tree/main/plugins/plugin-mind
yanmao-cc/am-editor
aomao_plugin-mind
/
dist
/
component
/
editor
/
utils.d.ts
8 lines
(7 loc)
•
267 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
/** * depth first traverse, from root to leaves, children in inverse order * if the fn returns false, terminate the traverse */
export
declare
const
traverseTree
: <T
extends
{
children
?: T[] |
undefined
; }>
(
data
: T,
fn
: (param: T) =>
boolean
) =>
void
;