-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTraversalController.d.ts
41 lines (31 loc) · 1.29 KB
/
TraversalController.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*!
* @author electricessence / https://github.com/electricessence/
* Licensing: MIT
*/
import EnumerableOrArrayLike from "../../System/Collections/EnumerableOrArrayLike";
import {Selector, SelectorWithIndex} from "../../System/FunctionTypes";
import ILinqBase from "./ILinqBase";
export type Descendants<T> = EnumerableOrArrayLike<T> | null | undefined;
export interface TraversalController<T>
{
depth(
descendantSelector:Selector<T, Descendants<T>>):ILinqBase<T>;
depth<TResult>(
descendantSelector:Selector<T, Descendants<T>>,
resultSelector:SelectorWithIndex<T, TResult>):ILinqBase<TResult>;
depth<TNode>(
descendantSelector:Selector<T | TNode, Descendants<T>>):ILinqBase<TNode>;
depth<TNode, TResult>(
descendantSelector:(element:T | TNode) => Descendants<T>,
resultSelector:SelectorWithIndex<T, TResult>):ILinqBase<TResult>;
breadth(
descendantSelector:Selector<T, Descendants<T>>):ILinqBase<T>;
breadth<TResult>(
descendantSelector:Selector<T, Descendants<T>>,
resultSelector:SelectorWithIndex<T, TResult>):ILinqBase<TResult>;
breadth<TNode>(
descendantSelector:Selector<T | TNode, Descendants<T>>):ILinqBase<TNode>;
breadth<TNode, TResult>(
descendantSelector:Selector<T | TNode, Descendants<T>>,
resultSelector:SelectorWithIndex<T, TResult>):ILinqBase<TResult>;
}