seq.d.ts
5.4 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
import _ = require("../index");
declare module "../index" {
// chain
interface LoDashStatic {
/**
* Creates a lodash object that wraps value with explicit method chaining enabled.
*
* @param value The value to wrap.
* @return Returns the new lodash wrapper instance.
*/
chain<TrapAny extends { __lodashAnyHack: any }>(value: TrapAny): CollectionChain<any> & FunctionChain<any> & ObjectChain<any> & PrimitiveChain<any> & StringChain;
/**
* @see _.chain
*/
chain<T extends null | undefined>(value: T): PrimitiveChain<T>;
/**
* @see _.chain
*/
chain(value: string): StringChain;
/**
* @see _.chain
*/
chain(value: string | null | undefined): StringNullableChain;
/**
* @see _.chain
*/
chain<T extends (...args: any[]) => any>(value: T): FunctionChain<T>;
/**
* @see _.chain
*/
chain<T = any>(value: List<T> | null | undefined): CollectionChain<T>;
/**
* @see _.chain
*/
chain<T extends object>(value: T | null | undefined): ObjectChain<T>;
/**
* @see _.chain
*/
chain<T>(value: T): PrimitiveChain<T>;
}
interface Collection<T> {
/**
* @see _.chain
*/
chain(): CollectionChain<T>;
}
interface String {
/**
* @see _.chain
*/
chain(): StringChain;
}
interface Object<T> {
/**
* @see _.chain
*/
chain(): ObjectChain<T>;
}
interface Primitive<T> {
/**
* @see _.chain
*/
chain(): PrimitiveChain<T>;
}
interface Function<T extends (...args: any) => any> {
/**
* @see _.chain
*/
chain(): FunctionChain<T>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.chain
*/
chain(): this;
}
// prototype.commit
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.commit
*/
commit(): this;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.commit
*/
commit(): this;
}
// prototype.plant
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.plant
*/
plant(value: unknown): this;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.plant
*/
plant(value: unknown): this;
}
// prototype.reverse
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.reverse
*/
reverse(): this;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.reverse
*/
reverse(): this;
}
// prototype.toJSON
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.toJSON
*/
toJSON(): TValue;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.toJSON
*/
toJSON(): TValue;
}
// prototype.toString
interface LoDashWrapper<TValue> {
/**
* @see _.toString
*/
toString(): string;
}
// prototype.value
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.value
*/
value(): TValue;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.value
*/
value(): TValue;
}
// prototype.valueOf
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.valueOf
*/
valueOf(): TValue;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.valueOf
*/
valueOf(): TValue;
}
// tap
interface LoDashStatic {
/**
* This method invokes interceptor and returns value. The interceptor is invoked with one
* argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations
* on intermediate results within the chain.
*
* @param value The value to provide to interceptor.
* @param interceptor The function to invoke.
* @return Returns value.
*/
tap<T>(value: T, interceptor: (value: T) => void): T;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.tap
*/
tap(interceptor: (value: TValue) => void): this;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.tap
*/
tap(interceptor: (value: TValue) => void): this;
}
// thru
interface LoDashStatic {
/**
* This method is like _.tap except that it returns the result of interceptor.
*
* @param value The value to provide to interceptor.
* @param interceptor The function to invoke.
* @return Returns the result of interceptor.
*/
thru<T, TResult>(value: T, interceptor: (value: T) => TResult): TResult;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.thru
*/
thru<TResult>(interceptor: (value: TValue) => TResult): ImpChain<TResult>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.thru
*/
thru<TResult>(interceptor: (value: TValue) => TResult): ExpChain<TResult>;
}
}