71b79a3cb2f5713fc284ae113f7ab770589a6a0d504a033325b8723767d64104257fc896c431228dec228b089ee64ba33153c38a56afaff2473d0e30843d15 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  1. import _ = require("../index");
  2. declare module "../index" {
  3. interface LoDashStatic {
  4. /**
  5. * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments
  6. * are provided to func when it’s invoked.
  7. *
  8. * @param func The function to attempt.
  9. * @return Returns the func result or error object.
  10. */
  11. attempt<TResult>(func: (...args: any[]) => TResult, ...args: any[]): TResult | Error;
  12. }
  13. interface LoDashImplicitWrapper<TValue> {
  14. /**
  15. * @see _.attempt
  16. */
  17. attempt<TResult>(...args: any[]): TResult | Error;
  18. }
  19. interface LoDashExplicitWrapper<TValue> {
  20. /**
  21. * @see _.attempt
  22. */
  23. attempt<TResult>(...args: any[]): ExpChain<TResult | Error>;
  24. }
  25. interface LoDashStatic {
  26. /**
  27. * Binds methods of an object to the object itself, overwriting the existing method. Method names may be
  28. * specified as individual arguments or as arrays of method names. If no method names are provided all
  29. * enumerable function properties, own and inherited, of object are bound.
  30. *
  31. * Note: This method does not set the "length" property of bound functions.
  32. *
  33. * @param object The object to bind and assign the bound methods to.
  34. * @param methodNames The object method names to bind, specified as individual method names or arrays of
  35. * method names.
  36. * @return Returns object.
  37. */
  38. bindAll<T>(object: T, ...methodNames: Array<Many<string>>): T;
  39. }
  40. interface LoDashImplicitWrapper<TValue> {
  41. /**
  42. * @see _.bindAll
  43. */
  44. bindAll(...methodNames: Array<Many<string>>): this;
  45. }
  46. interface LoDashExplicitWrapper<TValue> {
  47. /**
  48. * @see _.bindAll
  49. */
  50. bindAll(...methodNames: Array<Many<string>>): this;
  51. }
  52. interface LoDashStatic {
  53. /**
  54. * Creates a function that iterates over `pairs` and invokes the corresponding
  55. * function of the first predicate to return truthy. The predicate-function
  56. * pairs are invoked with the `this` binding and arguments of the created
  57. * function.
  58. *
  59. * @since 4.0.0
  60. * @category Util
  61. * @param pairs The predicate-function pairs.
  62. * @returns Returns the new composite function.
  63. * @example
  64. *
  65. * var func = _.cond([
  66. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  67. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  68. * [_.stubTrue, _.constant('no match')]
  69. * ]);
  70. *
  71. * func({ 'a': 1, 'b': 2 });
  72. * // => 'matches A'
  73. *
  74. * func({ 'a': 0, 'b': 1 });
  75. * // => 'matches B'
  76. *
  77. * func({ 'a': '1', 'b': '2' });
  78. * // => 'no match'
  79. */
  80. cond<R>(pairs: Array<CondPairNullary<R>>): () => R;
  81. cond<T, R>(pairs: Array<CondPairUnary<T, R>>): (Target: T) => R;
  82. }
  83. type ConformsPredicateObject<T> = {
  84. [P in keyof T]: T[P] extends (arg: infer A) => any ? A : any
  85. };
  86. interface LoDashStatic {
  87. /**
  88. * Creates a function that invokes the predicate properties of `source` with the corresponding
  89. * property values of a given object, returning true if all predicates return truthy, else false.
  90. */
  91. conforms<T>(source: ConformsPredicateObject<T>): (value: T) => boolean;
  92. }
  93. interface LoDashImplicitWrapper<TValue> {
  94. /**
  95. * @see _.conforms
  96. */
  97. conforms(): Function<(value: ConformsPredicateObject<TValue>) => boolean>;
  98. }
  99. interface LoDashExplicitWrapper<TValue> {
  100. /**
  101. * @see _.conforms
  102. */
  103. conforms(): FunctionChain<(value: ConformsPredicateObject<TValue>) => boolean>;
  104. }
  105. interface LoDashStatic {
  106. /**
  107. * Creates a function that returns value.
  108. *
  109. * @param value The value to return from the new function.
  110. * @return Returns the new function.
  111. */
  112. constant<T>(value: T): () => T;
  113. }
  114. interface LoDashImplicitWrapper<TValue> {
  115. /**
  116. * @see _.constant
  117. */
  118. constant(): Function<() => TValue>;
  119. }
  120. interface LoDashExplicitWrapper<TValue> {
  121. /**
  122. * @see _.constant
  123. */
  124. constant(): FunctionChain<() => TValue>;
  125. }
  126. interface LoDashStatic {
  127. /**
  128. * Checks `value` to determine whether a default value should be returned in
  129. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  130. * or `undefined`.
  131. *
  132. * @param value The value to check.
  133. * @param defaultValue The default value.
  134. * @returns Returns the resolved value.
  135. */
  136. defaultTo<T>(value: T | null | undefined, defaultValue: T): T;
  137. /**
  138. * @see _.defaultTo
  139. */
  140. defaultTo<T, TDefault>(value: T | null | undefined, defaultValue: TDefault): T | TDefault;
  141. }
  142. interface LoDashImplicitWrapper<TValue> {
  143. /**
  144. * @see _.defaultTo
  145. */
  146. defaultTo(defaultValue: TValue): TValue;
  147. /**
  148. * @see _.defaultTo
  149. */
  150. defaultTo<TDefault>(defaultValue: TDefault): TValue extends null | undefined ? TDefault : TValue | TDefault;
  151. }
  152. interface LoDashExplicitWrapper<TValue> {
  153. /**
  154. * @see _.defaultTo
  155. */
  156. defaultTo(defaultValue: TValue): ExpChain<TValue>;
  157. /**
  158. * @see _.defaultTo
  159. */
  160. defaultTo<TDefault>(defaultValue: TDefault): ExpChain<TValue extends null | undefined ? TDefault : TValue | TDefault>;
  161. }
  162. interface LoDashStatic {
  163. /**
  164. * Creates a function that returns the result of invoking the provided functions with the this binding of the
  165. * created function, where each successive invocation is supplied the return value of the previous.
  166. *
  167. * @param funcs Functions to invoke.
  168. * @return Returns the new function.
  169. */
  170. flow<A extends any[], R1, R2, R3, R4, R5, R6, R7>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (...args: A) => R7;
  171. /**
  172. * @see _.flow
  173. */
  174. flow<A extends any[], R1, R2, R3, R4, R5, R6, R7>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...func: Array<Many<(a: any) => any>>): (...args: A) => any;
  175. /**
  176. * @see _.flow
  177. */
  178. flow<A extends any[], R1, R2, R3, R4, R5, R6>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (...args: A) => R6;
  179. /**
  180. * @see _.flow
  181. */
  182. flow<A extends any[], R1, R2, R3, R4, R5>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (...args: A) => R5;
  183. /**
  184. * @see _.flow
  185. */
  186. flow<A extends any[], R1, R2, R3, R4>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (...args: A) => R4;
  187. /**
  188. * @see _.flow
  189. */
  190. flow<A extends any[], R1, R2, R3>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (...args: A) => R3;
  191. /**
  192. * @see _.flow
  193. */
  194. flow<A extends any[], R1, R2>(f1: (...args: A) => R1, f2: (a: R1) => R2): (...args: A) => R2;
  195. /**
  196. * @see _.flow
  197. */
  198. flow(...func: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;
  199. }
  200. interface Function<T extends (...arg: any) => any> {
  201. /**
  202. * @see _.flow
  203. */
  204. flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): Function<(...args: Parameters<T>) => R7>;
  205. /**
  206. * @see _.flow
  207. */
  208. flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...func: Array<Many<(a: any) => any>>): Function<(...args: Parameters<T>) => any>;
  209. /**
  210. * @see _.flow
  211. */
  212. flow<R2, R3, R4, R5, R6>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): Function<(...args: Parameters<T>) => R6>;
  213. /**
  214. * @see _.flow
  215. */
  216. flow<R2, R3, R4, R5>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): Function<(...args: Parameters<T>) => R5>;
  217. /**
  218. * @see _.flow
  219. */
  220. flow<R2, R3, R4>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): Function<(...args: Parameters<T>) => R4>;
  221. /**
  222. * @see _.flow
  223. */
  224. flow<R2, R3>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3): Function<(...args: Parameters<T>) => R3>;
  225. /**
  226. * @see _.flow
  227. */
  228. flow<R2>(f2: (a: ReturnType<T>) => R2): Function<(...args: Parameters<T>) => R2>;
  229. /**
  230. * @see _.flow
  231. */
  232. flow(...func: Array<Many<(...args: any[]) => any>>): Function<(...args: any[]) => any>;
  233. }
  234. interface FunctionChain<T> {
  235. /**
  236. * @see _.flow
  237. */
  238. flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): FunctionChain<(...args: Parameters<T>) => R7>;
  239. /**
  240. * @see _.flow
  241. */
  242. flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...func: Array<Many<(a: any) => any>>): FunctionChain<(...args: Parameters<T>) => any>;
  243. /**
  244. * @see _.flow
  245. */
  246. flow<R2, R3, R4, R5, R6>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): FunctionChain<(...args: Parameters<T>) => R6>;
  247. /**
  248. * @see _.flow
  249. */
  250. flow<R2, R3, R4, R5>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): FunctionChain<(...args: Parameters<T>) => R5>;
  251. /**
  252. * @see _.flow
  253. */
  254. flow<R2, R3, R4>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): FunctionChain<(...args: Parameters<T>) => R4>;
  255. /**
  256. * @see _.flow
  257. */
  258. flow<R2, R3>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3): FunctionChain<(...args: Parameters<T>) => R3>;
  259. /**
  260. * @see _.flow
  261. */
  262. flow<R2>(f2: (a: ReturnType<T>) => R2): FunctionChain<(...args: Parameters<T>) => R2>;
  263. /**
  264. * @see _.flow
  265. */
  266. flow(...func: Array<Many<(...args: any[]) => any>>): FunctionChain<(...args: any[]) => any>;
  267. }
  268. interface LoDashStatic {
  269. /**
  270. * This method is like _.flow except that it creates a function that invokes the provided functions from right
  271. * to left.
  272. *
  273. * @param funcs Functions to invoke.
  274. * @return Returns the new function.
  275. */
  276. flowRight<A extends any[], R1, R2, R3, R4, R5, R6, R7>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R7;
  277. /**
  278. * @see _.flowRight
  279. */
  280. flowRight<A extends any[], R1, R2, R3, R4, R5, R6>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R6;
  281. /**
  282. * @see _.flowRight
  283. */
  284. flowRight<A extends any[], R1, R2, R3, R4, R5>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R5;
  285. /**
  286. * @see _.flowRight
  287. */
  288. flowRight<A extends any[], R1, R2, R3, R4>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R4;
  289. /**
  290. * @see _.flowRight
  291. */
  292. flowRight<A extends any[], R1, R2, R3>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R3;
  293. /**
  294. * @see _.flowRight
  295. */
  296. flowRight<A extends any[], R1, R2>(f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R2;
  297. /**
  298. * @see _.flowRight
  299. */
  300. flowRight(...func: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;
  301. }
  302. interface Function<T> {
  303. /**
  304. * @see _.flowRight
  305. */
  306. flowRight<A extends any[], R1, R2, R3, R4, R5>(f6: (a: R5) => Parameters<T>["0"], f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
  307. /**
  308. * @see _.flowRight
  309. */
  310. flowRight<A extends any[], R1, R2, R3, R4>(f5: (a: R4) => Parameters<T>["0"], f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
  311. /**
  312. * @see _.flowRight
  313. */
  314. flowRight<A extends any[], R1, R2, R3>(f4: (a: R3) => Parameters<T>["0"], f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
  315. /**
  316. * @see _.flowRight
  317. */
  318. flowRight<A extends any[], R1, R2>(f3: (a: R2) => Parameters<T>["0"], f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
  319. /**
  320. * @see _.flowRight
  321. */
  322. flowRight<A extends any[], R1>(f2: (a: R1) => Parameters<T>["0"], f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
  323. /**
  324. * @see _.flowRight
  325. */
  326. flowRight<A extends any[]>(f1: (...args: A) => Parameters<T>["0"]): Function<(...args: A) => ReturnType<T>>;
  327. /**
  328. * @see _.flowRight
  329. */
  330. flowRight(...func: Array<Many<(...args: any[]) => any>>): Function<(...args: any[]) => any>;
  331. }
  332. interface FunctionChain<T> {
  333. /**
  334. * @see _.flowRight
  335. */
  336. flowRight<A extends any[], R1, R2, R3, R4, R5>(f6: (a: R5) => Parameters<T>["0"], f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
  337. /**
  338. * @see _.flowRight
  339. */
  340. flowRight<A extends any[], R1, R2, R3, R4>(f5: (a: R4) => Parameters<T>["0"], f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
  341. /**
  342. * @see _.flowRight
  343. */
  344. flowRight<A extends any[], R1, R2, R3>(f4: (a: R3) => Parameters<T>["0"], f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
  345. /**
  346. * @see _.flowRight
  347. */
  348. flowRight<A extends any[], R1, R2>(f3: (a: R2) => Parameters<T>["0"], f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
  349. /**
  350. * @see _.flowRight
  351. */
  352. flowRight<A extends any[], R1>(f2: (a: R1) => Parameters<T>["0"], f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
  353. /**
  354. * @see _.flowRight
  355. */
  356. flowRight<A extends any[]>(f1: (...args: A) => Parameters<T>["0"]): FunctionChain<(...args: A) => ReturnType<T>>;
  357. /**
  358. * @see _.flowRight
  359. */
  360. flowRight(...func: Array<Many<(...args: any[]) => any>>): FunctionChain<(...args: any[]) => any>;
  361. }
  362. interface LoDashStatic {
  363. /**
  364. * This method returns the first argument provided to it.
  365. *
  366. * @param value Any value.
  367. * @return Returns value.
  368. */
  369. identity<T>(value: T): T;
  370. /**
  371. * @see _.identity
  372. */
  373. identity(): undefined;
  374. }
  375. interface LoDashImplicitWrapper<TValue> {
  376. /**
  377. * @see _.identity
  378. */
  379. identity(): TValue;
  380. }
  381. interface LoDashExplicitWrapper<TValue> {
  382. /**
  383. * @see _.identity
  384. */
  385. identity(): this;
  386. }
  387. interface LoDashStatic {
  388. /**
  389. * Creates a function that invokes `func` with the arguments of the created
  390. * function. If `func` is a property name the created callback returns the
  391. * property value for a given element. If `func` is an object the created
  392. * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`.
  393. *
  394. * @category Util
  395. * @param [func=_.identity] The value to convert to a callback.
  396. * @returns Returns the callback.
  397. * @example
  398. *
  399. * var users = [
  400. * { 'user': 'barney', 'age': 36 },
  401. * { 'user': 'fred', 'age': 40 }
  402. * ];
  403. *
  404. * // create custom iteratee shorthands
  405. * _.iteratee = _.wrap(_.iteratee, function(callback, func) {
  406. * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func);
  407. * return !p ? callback(func) : function(object) {
  408. * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]);
  409. * };
  410. * });
  411. *
  412. * _.filter(users, 'age > 36');
  413. * // => [{ 'user': 'fred', 'age': 40 }]
  414. */
  415. iteratee<TFunction extends (...args: any[]) => any>(func: TFunction): TFunction;
  416. /**
  417. * @see _.iteratee
  418. */
  419. iteratee(func: symbol | number | string | object): (...args: any[]) => any;
  420. }
  421. interface Function<T extends (...args: any) => any> {
  422. /**
  423. * @see _.iteratee
  424. */
  425. iteratee(): Function<T>;
  426. }
  427. interface Collection<T> {
  428. /**
  429. * @see _.iteratee
  430. */
  431. iteratee(): Function<(o: object) => boolean>;
  432. }
  433. interface Object<T> {
  434. /**
  435. * @see _.iteratee
  436. */
  437. iteratee(): Function<(o: T) => boolean>;
  438. }
  439. interface String {
  440. /**
  441. * @see _.iteratee
  442. */
  443. iteratee(): Function<(o: object) => any>;
  444. }
  445. interface FunctionChain<T extends (...args: any) => any> {
  446. /**
  447. * @see _.iteratee
  448. */
  449. iteratee(): FunctionChain<T>;
  450. }
  451. interface CollectionChain<T> {
  452. /**
  453. * @see _.iteratee
  454. */
  455. iteratee(): FunctionChain<(o: object) => boolean>;
  456. }
  457. interface ObjectChain<T> {
  458. /**
  459. * @see _.iteratee
  460. */
  461. iteratee(): FunctionChain<(o: T) => boolean>;
  462. }
  463. interface StringChain {
  464. /**
  465. * @see _.iteratee
  466. */
  467. iteratee(): FunctionChain<(o: object) => any>;
  468. }
  469. interface StringNullableChain {
  470. /**
  471. * @see _.iteratee
  472. */
  473. iteratee(): FunctionChain<(o: object) => any>;
  474. }
  475. interface LoDashStatic {
  476. /**
  477. * Creates a function that performs a deep comparison between a given object and source, returning true if the
  478. * given object has equivalent property values, else false.
  479. *
  480. * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and
  481. * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own
  482. * or inherited property value see _.matchesProperty.
  483. *
  484. * @param source The object of property values to match.
  485. * @return Returns the new function.
  486. */
  487. matches<T>(source: T): (value: any) => boolean;
  488. /**
  489. * @see _.matches
  490. */
  491. matches<T, V>(source: T): (value: V) => boolean;
  492. }
  493. interface LoDashImplicitWrapper<TValue> {
  494. /**
  495. * @see _.matches
  496. */
  497. matches<V>(): Function<(value: V) => boolean>;
  498. }
  499. interface LoDashExplicitWrapper<TValue> {
  500. /**
  501. * @see _.matches
  502. */
  503. matches<V>(): FunctionChain<(value: V) => boolean>;
  504. }
  505. interface LoDashStatic {
  506. /**
  507. * Creates a function that compares the property value of path on a given object to value.
  508. *
  509. * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and
  510. * strings. Objects are compared by their own, not inherited, enumerable properties.
  511. *
  512. * @param path The path of the property to get.
  513. * @param srcValue The value to match.
  514. * @return Returns the new function.
  515. */
  516. matchesProperty<T>(path: PropertyPath, srcValue: T): (value: any) => boolean;
  517. /**
  518. * @see _.matchesProperty
  519. */
  520. matchesProperty<T, V>(path: PropertyPath, srcValue: T): (value: V) => boolean;
  521. }
  522. interface LoDashImplicitWrapper<TValue> {
  523. /**
  524. * @see _.matchesProperty
  525. */
  526. matchesProperty<SrcValue>(srcValue: SrcValue): Function<(value: any) => boolean>;
  527. /**
  528. * @see _.matchesProperty
  529. */
  530. matchesProperty<SrcValue, Value>(srcValue: SrcValue): Function<(value: Value) => boolean>;
  531. }
  532. interface LoDashExplicitWrapper<TValue> {
  533. /**
  534. * @see _.matchesProperty
  535. */
  536. matchesProperty<SrcValue>(srcValue: SrcValue): FunctionChain<(value: any) => boolean>;
  537. /**
  538. * @see _.matchesProperty
  539. */
  540. matchesProperty<SrcValue, Value>(srcValue: SrcValue): FunctionChain<(value: Value) => boolean>;
  541. }
  542. interface LoDashStatic {
  543. /**
  544. * Creates a function that invokes the method at path on a given object. Any additional arguments are provided
  545. * to the invoked method.
  546. *
  547. * @param path The path of the method to invoke.
  548. * @param args The arguments to invoke the method with.
  549. * @return Returns the new function.
  550. */
  551. method(path: PropertyPath, ...args: any[]): (object: any) => any;
  552. }
  553. interface LoDashImplicitWrapper<TValue> {
  554. /**
  555. * @see _.method
  556. */
  557. method(...args: any[]): Function<(object: any) => any>;
  558. }
  559. interface LoDashExplicitWrapper<TValue> {
  560. /**
  561. * @see _.method
  562. */
  563. method(...args: any[]): FunctionChain<(object: any) => any>;
  564. }
  565. interface LoDashStatic {
  566. /**
  567. * The opposite of _.method; this method creates a function that invokes the method at a given path on object.
  568. * Any additional arguments are provided to the invoked method.
  569. *
  570. * @param object The object to query.
  571. * @param args The arguments to invoke the method with.
  572. * @return Returns the new function.
  573. */
  574. methodOf(object: object, ...args: any[]): (path: PropertyPath) => any;
  575. }
  576. interface LoDashImplicitWrapper<TValue> {
  577. /**
  578. * @see _.methodOf
  579. */
  580. methodOf(...args: any[]): LoDashImplicitWrapper<(path: PropertyPath) => any>;
  581. }
  582. interface LoDashExplicitWrapper<TValue> {
  583. /**
  584. * @see _.methodOf
  585. */
  586. methodOf(...args: any[]): LoDashExplicitWrapper<(path: PropertyPath) => any>;
  587. }
  588. interface MixinOptions {
  589. /**
  590. * @see _.chain
  591. */
  592. chain?: boolean | undefined;
  593. }
  594. interface LoDashStatic {
  595. /**
  596. * Adds all own enumerable function properties of a source object to the destination object. If object is a
  597. * function then methods are added to its prototype as well.
  598. *
  599. * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying
  600. * the original.
  601. *
  602. * @param object The destination object.
  603. * @param source The object of functions to add.
  604. * @param options The options object.
  605. * @param options.chain Specify whether the functions added are chainable.
  606. * @return Returns object.
  607. */
  608. mixin<TObject>(object: TObject, source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): TObject;
  609. /**
  610. * @see _.mixin
  611. */
  612. mixin<TResult>(source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): LoDashStatic;
  613. }
  614. interface LoDashImplicitWrapper<TValue> {
  615. /**
  616. * @see _.mixin
  617. */
  618. mixin(source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): this;
  619. /**
  620. * @see _.mixin
  621. */
  622. mixin(options?: MixinOptions): LoDashImplicitWrapper<LoDashStatic>;
  623. }
  624. interface LoDashExplicitWrapper<TValue> {
  625. /**
  626. * @see _.mixin
  627. */
  628. mixin(source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): this;
  629. /**
  630. * @see _.mixin
  631. */
  632. mixin(options?: MixinOptions): LoDashExplicitWrapper<LoDashStatic>;
  633. }
  634. interface LoDashStatic {
  635. /**
  636. * Reverts the _ variable to its previous value and returns a reference to the lodash function.
  637. *
  638. * @return Returns the lodash function.
  639. */
  640. noConflict(): typeof _;
  641. }
  642. interface LoDashImplicitWrapper<TValue> {
  643. /**
  644. * @see _.noConflict
  645. */
  646. noConflict(): typeof _;
  647. }
  648. interface LoDashExplicitWrapper<TValue> {
  649. /**
  650. * @see _.noConflict
  651. */
  652. noConflict(): LoDashExplicitWrapper<typeof _>;
  653. }
  654. interface LoDashStatic {
  655. /**
  656. * A no-operation function that returns undefined regardless of the arguments it receives.
  657. *
  658. * @return undefined
  659. */
  660. noop(...args: any[]): void;
  661. }
  662. interface LoDashImplicitWrapper<TValue> {
  663. /**
  664. * @see _.noop
  665. */
  666. noop(...args: any[]): void;
  667. }
  668. interface LoDashExplicitWrapper<TValue> {
  669. /**
  670. * @see _.noop
  671. */
  672. noop(...args: any[]): PrimitiveChain<undefined>;
  673. }
  674. interface LoDashStatic {
  675. /**
  676. * Creates a function that returns its nth argument.
  677. *
  678. * @param n The index of the argument to return.
  679. * @return Returns the new function.
  680. */
  681. nthArg(n?: number): (...args: any[]) => any;
  682. }
  683. interface LoDashImplicitWrapper<TValue> {
  684. /**
  685. * @see _.nthArg
  686. */
  687. nthArg(): Function<(...args: any[]) => any>;
  688. }
  689. interface LoDashExplicitWrapper<TValue> {
  690. /**
  691. * @see _.nthArg
  692. */
  693. nthArg(): FunctionChain<(...args: any[]) => any>;
  694. }
  695. interface LoDashStatic {
  696. /**
  697. * Creates a function that invokes iteratees with the arguments provided to the created function and returns
  698. * their results.
  699. *
  700. * @param iteratees The iteratees to invoke.
  701. * @return Returns the new function.
  702. */
  703. over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): (...args: any[]) => TResult[];
  704. }
  705. interface Collection<T> {
  706. /**
  707. * @see _.over
  708. */
  709. over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): Function<(...args: any[]) => TResult[]>;
  710. }
  711. interface Function<T> {
  712. /**
  713. * @see _.over
  714. */
  715. over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): Function<(...args: any[]) => Array<ReturnType<T> | TResult>>;
  716. }
  717. interface CollectionChain<T> {
  718. /**
  719. * @see _.over
  720. */
  721. over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): FunctionChain<(...args: any[]) => TResult[]>;
  722. }
  723. interface FunctionChain<T> {
  724. /**
  725. * @see _.over
  726. */
  727. over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): FunctionChain<(...args: any[]) => Array<ReturnType<T> | TResult>>;
  728. }
  729. interface LoDashStatic {
  730. /**
  731. * Creates a function that checks if all of the predicates return truthy when invoked with the arguments
  732. * provided to the created function.
  733. *
  734. * @param predicates The predicates to check.
  735. * @return Returns the new function.
  736. */
  737. overEvery<T, Result1 extends T, Result2 extends T>(...predicates: [
  738. (arg: T) => arg is Result1,
  739. (arg: T) => arg is Result2
  740. ]): (arg: T) => arg is Result1 & Result2;
  741. overEvery<T>(...predicates: Array<Many<(...args: T[]) => boolean>>): (...args: T[]) => boolean;
  742. }
  743. interface Collection<T> {
  744. /**
  745. * @see _.overEvery
  746. */
  747. overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: TArgs[]) => boolean>;
  748. }
  749. interface Function<T> {
  750. /**
  751. * @see _.overEvery
  752. */
  753. overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: Parameters<T> | TArgs[]) => boolean>;
  754. }
  755. interface CollectionChain<T> {
  756. /**
  757. * @see _.overEvery
  758. */
  759. overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: TArgs[]) => boolean>;
  760. }
  761. interface FunctionChain<T> {
  762. /**
  763. * @see _.overEvery
  764. */
  765. overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: Parameters<T> | TArgs[]) => boolean>;
  766. }
  767. interface LoDashStatic {
  768. /**
  769. * Creates a function that checks if any of the predicates return truthy when invoked with the arguments
  770. * provided to the created function.
  771. *
  772. * @param predicates The predicates to check.
  773. * @return Returns the new function.
  774. */
  775. overSome<T, Result1 extends T, Result2 extends T>(...predicates: [
  776. (arg: T) => arg is Result1,
  777. (arg: T) => arg is Result2
  778. ]): (arg: T) => arg is Result1 | Result2;
  779. overSome<T>(...predicates: Array<Many<(...args: T[]) => boolean>>): (...args: T[]) => boolean;
  780. }
  781. interface Collection<T> {
  782. /**
  783. * @see _.overSome
  784. */
  785. overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: TArgs[]) => boolean>;
  786. }
  787. interface Function<T> {
  788. /**
  789. * @see _.overSome
  790. */
  791. overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: Parameters<T> | TArgs[]) => boolean>;
  792. }
  793. interface CollectionChain<T> {
  794. /**
  795. * @see _.overSome
  796. */
  797. overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: TArgs[]) => boolean>;
  798. }
  799. interface FunctionChain<T> {
  800. /**
  801. * @see _.overSome
  802. */
  803. overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: Parameters<T> | TArgs[]) => boolean>;
  804. }
  805. interface LoDashStatic {
  806. /**
  807. * Creates a function that returns the property value at path on a given object.
  808. *
  809. * @param path The path of the property to get.
  810. * @return Returns the new function.
  811. */
  812. property<TObj, TResult>(path: PropertyPath): (obj: TObj) => TResult;
  813. }
  814. interface LoDashImplicitWrapper<TValue> {
  815. /**
  816. * @see _.property
  817. */
  818. property<TObj, TResult>(): Function<(obj: TObj) => TResult>;
  819. }
  820. interface LoDashExplicitWrapper<TValue> {
  821. /**
  822. * @see _.property
  823. */
  824. property<TObj, TResult>(): FunctionChain<(obj: TObj) => TResult>;
  825. }
  826. interface LoDashStatic {
  827. /**
  828. * The opposite of _.property; this method creates a function that returns the property value at a given path
  829. * on object.
  830. *
  831. * @param object The object to query.
  832. * @return Returns the new function.
  833. */
  834. propertyOf<T extends {}>(object: T): (path: PropertyPath) => any;
  835. }
  836. interface LoDashImplicitWrapper<TValue> {
  837. /**
  838. * @see _.propertyOf
  839. */
  840. propertyOf(): LoDashImplicitWrapper<(path: PropertyPath) => any>;
  841. }
  842. interface LoDashExplicitWrapper<TValue> {
  843. /**
  844. * @see _.propertyOf
  845. */
  846. propertyOf(): LoDashExplicitWrapper<(path: PropertyPath) => any>;
  847. }
  848. interface LoDashStatic {
  849. /**
  850. * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.
  851. * If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length
  852. * range is created unless a negative step is specified.
  853. *
  854. * @param start The start of the range.
  855. * @param end The end of the range.
  856. * @param step The value to increment or decrement by.
  857. * @return Returns a new range array.
  858. */
  859. range(start: number, end?: number, step?: number): number[];
  860. /**
  861. * @see _.range
  862. */
  863. range(end: number, index: string | number, guard: object): number[];
  864. }
  865. interface LoDashImplicitWrapper<TValue> {
  866. /**
  867. * @see _.range
  868. */
  869. range(end?: number, step?: number): Collection<number>;
  870. }
  871. interface LoDashExplicitWrapper<TValue> {
  872. /**
  873. * @see _.range
  874. */
  875. range(end?: number, step?: number): CollectionChain<number>;
  876. }
  877. interface LoDashStatic {
  878. /**
  879. * This method is like `_.range` except that it populates values in
  880. * descending order.
  881. *
  882. * @category Util
  883. * @param start The start of the range.
  884. * @param end The end of the range.
  885. * @param step The value to increment or decrement by.
  886. * @returns Returns the new array of numbers.
  887. * @example
  888. *
  889. * _.rangeRight(4);
  890. * // => [3, 2, 1, 0]
  891. *
  892. * _.rangeRight(-4);
  893. * // => [-3, -2, -1, 0]
  894. *
  895. * _.rangeRight(1, 5);
  896. * // => [4, 3, 2, 1]
  897. *
  898. * _.rangeRight(0, 20, 5);
  899. * // => [15, 10, 5, 0]
  900. *
  901. * _.rangeRight(0, -4, -1);
  902. * // => [-3, -2, -1, 0]
  903. *
  904. * _.rangeRight(1, 4, 0);
  905. * // => [1, 1, 1]
  906. *
  907. * _.rangeRight(0);
  908. * // => []
  909. */
  910. rangeRight(start: number, end?: number, step?: number): number[];
  911. /**
  912. * @see _.rangeRight
  913. */
  914. rangeRight(end: number, index: string | number, guard: object): number[];
  915. }
  916. interface LoDashImplicitWrapper<TValue> {
  917. /**
  918. * @see _.rangeRight
  919. */
  920. rangeRight(end?: number, step?: number): Collection<number>;
  921. }
  922. interface LoDashExplicitWrapper<TValue> {
  923. /**
  924. * @see _.rangeRight
  925. */
  926. rangeRight(end?: number, step?: number): CollectionChain<number>;
  927. }
  928. interface LoDashStatic {
  929. /**
  930. * Create a new pristine lodash function using the given context object.
  931. *
  932. * @param context The context object.
  933. * @return Returns a new lodash function.
  934. */
  935. runInContext(context?: object): LoDashStatic;
  936. }
  937. interface LoDashImplicitWrapper<TValue> {
  938. /**
  939. * @see _.runInContext
  940. */
  941. runInContext(): LoDashStatic;
  942. }
  943. interface LoDashStatic {
  944. /**
  945. * This method returns a new empty array.
  946. *
  947. * @returns Returns the new empty array.
  948. */
  949. stubArray(): any[];
  950. }
  951. interface LoDashImplicitWrapper<TValue> {
  952. /**
  953. * @see _.stubArray
  954. */
  955. stubArray(): any[];
  956. }
  957. interface LoDashExplicitWrapper<TValue> {
  958. /**
  959. * @see _.stubArray
  960. */
  961. stubArray(): CollectionChain<any>;
  962. }
  963. interface LoDashStatic {
  964. /**
  965. * This method returns `false`.
  966. *
  967. * @returns Returns `false`.
  968. */
  969. stubFalse(): false;
  970. }
  971. interface LoDashImplicitWrapper<TValue> {
  972. /**
  973. * @see _.stubFalse
  974. */
  975. stubFalse(): false;
  976. }
  977. interface LoDashExplicitWrapper<TValue> {
  978. /**
  979. * @see _.stubFalse
  980. */
  981. stubFalse(): PrimitiveChain<false>;
  982. }
  983. interface LoDashStatic {
  984. /**
  985. * This method returns a new empty object.
  986. *
  987. * @returns Returns the new empty object.
  988. */
  989. stubObject(): any;
  990. }
  991. interface LoDashImplicitWrapper<TValue> {
  992. /**
  993. * @see _.stubObject
  994. */
  995. stubObject(): any;
  996. }
  997. interface LoDashExplicitWrapper<TValue> {
  998. /**
  999. * @see _.stubObject
  1000. */
  1001. stubObject(): LoDashExplicitWrapper<any>;
  1002. }
  1003. interface LoDashStatic {
  1004. /**
  1005. * This method returns an empty string.
  1006. *
  1007. * @returns Returns the empty string.
  1008. */
  1009. stubString(): string;
  1010. }
  1011. interface LoDashImplicitWrapper<TValue> {
  1012. /**
  1013. * @see _.stubString
  1014. */
  1015. stubString(): string;
  1016. }
  1017. interface LoDashExplicitWrapper<TValue> {
  1018. /**
  1019. * @see _.stubString
  1020. */
  1021. stubString(): StringChain;
  1022. }
  1023. interface LoDashStatic {
  1024. /**
  1025. * This method returns `true`.
  1026. *
  1027. * @returns Returns `true`.
  1028. */
  1029. stubTrue(): true;
  1030. }
  1031. interface LoDashImplicitWrapper<TValue> {
  1032. /**
  1033. * @see _.stubTrue
  1034. */
  1035. stubTrue(): true;
  1036. }
  1037. interface LoDashExplicitWrapper<TValue> {
  1038. /**
  1039. * @see _.stubTrue
  1040. */
  1041. stubTrue(): PrimitiveChain<true>;
  1042. }
  1043. interface LoDashStatic {
  1044. /**
  1045. * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee
  1046. * is invoked with one argument; (index).
  1047. *
  1048. * @param n The number of times to invoke iteratee.
  1049. * @param iteratee The function invoked per iteration.
  1050. * @return Returns the array of results.
  1051. */
  1052. times<TResult>(n: number, iteratee: (num: number) => TResult): TResult[];
  1053. /**
  1054. * @see _.times
  1055. */
  1056. times(n: number): number[];
  1057. }
  1058. interface LoDashImplicitWrapper<TValue> {
  1059. /**
  1060. * @see _.times
  1061. */
  1062. times<TResult>(iteratee: (num: number) => TResult): TResult[];
  1063. /**
  1064. * @see _.times
  1065. */
  1066. times(): number[];
  1067. }
  1068. interface LoDashExplicitWrapper<TValue> {
  1069. /**
  1070. * @see _.times
  1071. */
  1072. times<TResult>(iteratee: (num: number) => TResult): CollectionChain<TResult>;
  1073. /**
  1074. * @see _.times
  1075. */
  1076. times(): CollectionChain<number>;
  1077. }
  1078. interface LoDashStatic {
  1079. /**
  1080. * Converts `value` to a property path array.
  1081. *
  1082. * @category Util
  1083. * @param value The value to convert.
  1084. * @returns Returns the new property path array.
  1085. * @example
  1086. *
  1087. * _.toPath('a.b.c');
  1088. * // => ['a', 'b', 'c']
  1089. *
  1090. * _.toPath('a[0].b.c');
  1091. * // => ['a', '0', 'b', 'c']
  1092. *
  1093. * var path = ['a', 'b', 'c'],
  1094. * newPath = _.toPath(path);
  1095. *
  1096. * console.log(newPath);
  1097. * // => ['a', 'b', 'c']
  1098. *
  1099. * console.log(path === newPath);
  1100. * // => false
  1101. */
  1102. toPath(value: any): string[];
  1103. }
  1104. interface LoDashImplicitWrapper<TValue> {
  1105. /**
  1106. * @see _.toPath
  1107. */
  1108. toPath(): Collection<string>;
  1109. }
  1110. interface LoDashExplicitWrapper<TValue> {
  1111. /**
  1112. * @see _.toPath
  1113. */
  1114. toPath(): CollectionChain<string>;
  1115. }
  1116. interface LoDashStatic {
  1117. /**
  1118. * Generates a unique ID. If prefix is provided the ID is appended to it.
  1119. *
  1120. * @param prefix The value to prefix the ID with.
  1121. * @return Returns the unique ID.
  1122. */
  1123. uniqueId(prefix?: string): string;
  1124. }
  1125. interface LoDashImplicitWrapper<TValue> {
  1126. /**
  1127. * @see _.uniqueId
  1128. */
  1129. uniqueId(): string;
  1130. }
  1131. interface LoDashExplicitWrapper<TValue> {
  1132. /**
  1133. * @see _.uniqueId
  1134. */
  1135. uniqueId(): StringChain;
  1136. }
  1137. // stubTrue
  1138. interface LoDashStatic {
  1139. /**
  1140. * This method returns true.
  1141. *
  1142. * @return Returns true.
  1143. */
  1144. stubTrue(): true;
  1145. }
  1146. interface LoDashImplicitWrapper<TValue> {
  1147. /**
  1148. * @see _.stubTrue
  1149. */
  1150. stubTrue(): true;
  1151. }
  1152. interface LoDashExplicitWrapper<TValue> {
  1153. /**
  1154. * @see _.stubTrue
  1155. */
  1156. stubTrue(): LoDashExplicitWrapper<true>;
  1157. }
  1158. // stubFalse
  1159. interface LoDashStatic {
  1160. /**
  1161. * This method returns false.
  1162. *
  1163. * @return Returns false.
  1164. */
  1165. stubFalse(): false;
  1166. }
  1167. interface LoDashImplicitWrapper<TValue> {
  1168. /**
  1169. * @see _.stubFalse
  1170. */
  1171. stubFalse(): false;
  1172. }
  1173. interface LoDashExplicitWrapper<TValue> {
  1174. /**
  1175. * @see _.stubFalse
  1176. */
  1177. stubFalse(): LoDashExplicitWrapper<false>;
  1178. }
  1179. }