UNPKG
@luband/jstools
Version:
latest (1.5.0)
1.5.0
1.1.4
1.1.3
1.1.0
1.0.0
前端工具包
@luband/jstools
/
array
/
deepSearch.d.ts
3 lines
(2 loc)
•
188 B
TypeScript
View Raw
1
2
3
export
type
ConditionFn
<T> =
(
data
: T
) =>
boolean
;
export
default
function
deepSearch<T =
any
>(
list
: T[] | T,
condition
:
object
|
ConditionFn
<T>,
childrenKey
?:
string
): [T |
null
, T[]];