2dfe51f52f0062df0e45d5f387d32d4b207c4c27198adbc782e4a1e88f2e01f9d918a5d43c2f378e41b7d52ef86fbf70a454c5a11e929fe89468a2908f6f69 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643
  1. import _ = require("../index");
  2. import { uniqueSymbol } from "./common";
  3. declare module "../index" {
  4. interface LoDashStatic {
  5. /**
  6. * Assigns own enumerable properties of source objects to the destination
  7. * object. Source objects are applied from left to right. Subsequent sources
  8. * overwrite property assignments of previous sources.
  9. *
  10. * **Note:** This method mutates `object` and is loosely based on
  11. * [`Object.assign`](https://mdn.io/Object/assign).
  12. *
  13. * @category Object
  14. * @param object The destination object.
  15. * @param [sources] The source objects.
  16. * @returns Returns `object`.
  17. * @example
  18. *
  19. * function Foo() {
  20. * this.c = 3;
  21. * }
  22. *
  23. * function Bar() {
  24. * this.e = 5;
  25. * }
  26. *
  27. * Foo.prototype.d = 4;
  28. * Bar.prototype.f = 6;
  29. *
  30. * _.assign({ 'a': 1 }, new Foo, new Bar);
  31. * // => { 'a': 1, 'c': 3, 'e': 5 }
  32. */
  33. assign<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
  34. /**
  35. * @see _.assign
  36. */
  37. assign<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
  38. /**
  39. * @see _.assign
  40. */
  41. assign<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
  42. /**
  43. * @see _.assign
  44. */
  45. assign<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  46. /**
  47. * @see _.assign
  48. */
  49. assign<TObject>(object: TObject): TObject;
  50. /**
  51. * @see _.assign
  52. */
  53. assign(object: any, ...otherArgs: any[]): any;
  54. }
  55. interface Object<T> {
  56. /**
  57. * @see _.assign
  58. */
  59. assign<TSource>(source: TSource): Object<T & TSource>;
  60. /**
  61. * @see _.assign
  62. */
  63. assign<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
  64. /**
  65. * @see _.assign
  66. */
  67. assign<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
  68. /**
  69. * @see _.assign
  70. */
  71. assign<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  72. /**
  73. * @see _.assign
  74. */
  75. assign(): Object<T>;
  76. /**
  77. * @see _.assign
  78. */
  79. assign(...otherArgs: any[]): Object<any>;
  80. }
  81. interface ObjectChain<T> {
  82. /**
  83. * @see _.assign
  84. */
  85. assign<TSource>(source: TSource): ObjectChain<T & TSource>;
  86. /**
  87. * @see _.assign
  88. */
  89. assign<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
  90. /**
  91. * @see _.assign
  92. */
  93. assign<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  94. /**
  95. * @see _.assign
  96. */
  97. assign<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  98. /**
  99. * @see _.assign
  100. */
  101. assign(): ObjectChain<T>;
  102. /**
  103. * @see _.assign
  104. */
  105. assign(...otherArgs: any[]): ObjectChain<any>;
  106. }
  107. interface LoDashStatic {
  108. /**
  109. * This method is like `_.assign` except that it iterates over own and
  110. * inherited source properties.
  111. *
  112. * **Note:** This method mutates `object`.
  113. *
  114. * @alias extend
  115. * @category Object
  116. * @param object The destination object.
  117. * @param [sources] The source objects.
  118. * @returns Returns `object`.
  119. * @example
  120. *
  121. * function Foo() {
  122. * this.b = 2;
  123. * }
  124. *
  125. * function Bar() {
  126. * this.d = 4;
  127. * }
  128. *
  129. * Foo.prototype.c = 3;
  130. * Bar.prototype.e = 5;
  131. *
  132. * _.assignIn({ 'a': 1 }, new Foo, new Bar);
  133. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
  134. */
  135. assignIn<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
  136. /**
  137. * @see _.assignIn
  138. */
  139. assignIn<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
  140. /**
  141. * @see _.assignIn
  142. */
  143. assignIn<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
  144. /**
  145. * @see _.assignIn
  146. */
  147. assignIn<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  148. /**
  149. * @see _.assignIn
  150. */
  151. assignIn<TObject>(object: TObject): TObject;
  152. /**
  153. * @see _.assignIn
  154. */
  155. assignIn<TResult>(object: any, ...otherArgs: any[]): TResult;
  156. }
  157. interface Object<T> {
  158. /**
  159. * @see _.assignIn
  160. */
  161. assignIn<TSource>(source: TSource): Object<T & TSource>;
  162. /**
  163. * @see _.assignIn
  164. */
  165. assignIn<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
  166. /**
  167. * @see _.assignIn
  168. */
  169. assignIn<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
  170. /**
  171. * @see _.assignIn
  172. */
  173. assignIn<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  174. /**
  175. * @see _.assignIn
  176. */
  177. assignIn(): Object<T>;
  178. /**
  179. * @see _.assignIn
  180. */
  181. assignIn<TResult>(...otherArgs: any[]): Object<TResult>;
  182. }
  183. interface ObjectChain<T> {
  184. /**
  185. * @see _.assignIn
  186. */
  187. assignIn<TSource>(source: TSource): ObjectChain<T & TSource>;
  188. /**
  189. * @see _.assignIn
  190. */
  191. assignIn<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
  192. /**
  193. * @see _.assignIn
  194. */
  195. assignIn<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  196. /**
  197. * @see _.assignIn
  198. */
  199. assignIn<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  200. /**
  201. * @see _.assignIn
  202. */
  203. assignIn(): ObjectChain<T>;
  204. /**
  205. * @see _.assignIn
  206. */
  207. assignIn(...otherArgs: any[]): ObjectChain<any>;
  208. }
  209. type AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any;
  210. interface LoDashStatic {
  211. /**
  212. * This method is like `_.assignIn` except that it accepts `customizer` which
  213. * is invoked to produce the assigned values. If `customizer` returns `undefined`
  214. * assignment is handled by the method instead. The `customizer` is invoked
  215. * with five arguments: (objValue, srcValue, key, object, source).
  216. *
  217. * **Note:** This method mutates `object`.
  218. *
  219. * @alias extendWith
  220. * @category Object
  221. * @param object The destination object.
  222. * @param sources The source objects.
  223. * @param [customizer] The function to customize assigned values.
  224. * @returns Returns `object`.
  225. * @example
  226. *
  227. * function customizer(objValue, srcValue) {
  228. * return _.isUndefined(objValue) ? srcValue : objValue;
  229. * }
  230. *
  231. * var defaults = _.partialRight(_.assignInWith, customizer);
  232. *
  233. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  234. * // => { 'a': 1, 'b': 2 }
  235. */
  236. assignInWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
  237. /**
  238. * @see _.assignInWith
  239. */
  240. assignInWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
  241. /**
  242. * @see _.assignInWith
  243. */
  244. assignInWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
  245. /**
  246. * @see _.assignInWith
  247. */
  248. assignInWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  249. /**
  250. * @see _.assignInWith
  251. */
  252. assignInWith<TObject>(object: TObject): TObject;
  253. /**
  254. * @see _.assignInWith
  255. */
  256. assignInWith<TResult>(object: any, ...otherArgs: any[]): TResult;
  257. }
  258. interface Object<T> {
  259. /**
  260. * @see _.assignInWith
  261. */
  262. assignInWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
  263. /**
  264. * @see _.assignInWith
  265. */
  266. assignInWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
  267. /**
  268. * @see _.assignInWith
  269. */
  270. assignInWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
  271. /**
  272. * @see _.assignInWith
  273. */
  274. assignInWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  275. /**
  276. * @see _.assignInWith
  277. */
  278. assignInWith(): Object<T>;
  279. /**
  280. * @see _.assignInWith
  281. */
  282. assignInWith<TResult>(...otherArgs: any[]): Object<TResult>;
  283. }
  284. interface ObjectChain<T> {
  285. /**
  286. * @see _.assignInWith
  287. */
  288. assignInWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
  289. /**
  290. * @see _.assignInWith
  291. */
  292. assignInWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
  293. /**
  294. * @see _.assignInWith
  295. */
  296. assignInWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  297. /**
  298. * @see _.assignInWith
  299. */
  300. assignInWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  301. /**
  302. * @see _.assignInWith
  303. */
  304. assignInWith(): ObjectChain<T>;
  305. /**
  306. * @see _.assignInWith
  307. */
  308. assignInWith(...otherArgs: any[]): ObjectChain<any>;
  309. }
  310. interface LoDashStatic {
  311. /**
  312. * This method is like `_.assign` except that it accepts `customizer` which
  313. * is invoked to produce the assigned values. If `customizer` returns `undefined`
  314. * assignment is handled by the method instead. The `customizer` is invoked
  315. * with five arguments: (objValue, srcValue, key, object, source).
  316. *
  317. * **Note:** This method mutates `object`.
  318. *
  319. * @category Object
  320. * @param object The destination object.
  321. * @param sources The source objects.
  322. * @param [customizer] The function to customize assigned values.
  323. * @returns Returns `object`.
  324. * @example
  325. *
  326. * function customizer(objValue, srcValue) {
  327. * return _.isUndefined(objValue) ? srcValue : objValue;
  328. * }
  329. *
  330. * var defaults = _.partialRight(_.assignWith, customizer);
  331. *
  332. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  333. * // => { 'a': 1, 'b': 2 }
  334. */
  335. assignWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
  336. /**
  337. * @see _.assignWith
  338. */
  339. assignWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
  340. /**
  341. * @see _.assignWith
  342. */
  343. assignWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
  344. /**
  345. * @see _.assignWith
  346. */
  347. assignWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  348. /**
  349. * @see _.assignWith
  350. */
  351. assignWith<TObject>(object: TObject): TObject;
  352. /**
  353. * @see _.assignWith
  354. */
  355. assignWith<TResult>(object: any, ...otherArgs: any[]): TResult;
  356. }
  357. interface Object<T> {
  358. /**
  359. * @see _.assignWith
  360. */
  361. assignWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
  362. /**
  363. * @see _.assignWith
  364. */
  365. assignWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
  366. /**
  367. * @see _.assignWith
  368. */
  369. assignWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
  370. /**
  371. * @see _.assignWith
  372. */
  373. assignWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  374. /**
  375. * @see _.assignWith
  376. */
  377. assignWith(): Object<T>;
  378. /**
  379. * @see _.assignWith
  380. */
  381. assignWith<TResult>(...otherArgs: any[]): Object<TResult>;
  382. }
  383. interface ObjectChain<T> {
  384. /**
  385. * @see _.assignWith
  386. */
  387. assignWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
  388. /**
  389. * @see _.assignWith
  390. */
  391. assignWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
  392. /**
  393. * @see _.assignWith
  394. */
  395. assignWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  396. /**
  397. * @see _.assignWith
  398. */
  399. assignWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  400. /**
  401. * @see _.assignWith
  402. */
  403. assignWith(): ObjectChain<T>;
  404. /**
  405. * @see _.assignWith
  406. */
  407. assignWith(...otherArgs: any[]): ObjectChain<any>;
  408. }
  409. interface LoDashStatic {
  410. /**
  411. * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be
  412. * specified as individual arguments or as arrays of keys.
  413. *
  414. * @param object The object to iterate over.
  415. * @param props The property names or indexes of elements to pick, specified individually or in arrays.
  416. * @return Returns the new array of picked elements.
  417. */
  418. at<T>(object: Dictionary<T> | NumericDictionary<T> | null | undefined, ...props: PropertyPath[]): T[];
  419. /**
  420. * @see _.at
  421. */
  422. at<T extends object>(object: T | null | undefined, ...props: Array<Many<keyof T>>): Array<T[keyof T]>;
  423. }
  424. interface Object<T> {
  425. /**
  426. * @see _.at
  427. */
  428. at(...props: Array<Many<keyof T>>): Collection<T[keyof T]>;
  429. }
  430. interface Collection<T> {
  431. /**
  432. * @see _.at
  433. */
  434. at(...props: PropertyPath[]): Collection<T>;
  435. }
  436. interface ObjectChain<T> {
  437. /**
  438. * @see _.at
  439. */
  440. at(...props: Array<Many<keyof T>>): CollectionChain<T[keyof T]>;
  441. }
  442. interface CollectionChain<T> {
  443. /**
  444. * @see _.at
  445. */
  446. at(...props: PropertyPath[]): CollectionChain<T>;
  447. }
  448. interface LoDashStatic {
  449. /**
  450. * Creates an object that inherits from the given prototype object. If a properties object is provided its own
  451. * enumerable properties are assigned to the created object.
  452. *
  453. * @param prototype The object to inherit from.
  454. * @param properties The properties to assign to the object.
  455. * @return Returns the new object.
  456. */
  457. create<T extends object, U extends object>(prototype: T, properties?: U): T & U;
  458. }
  459. interface Object<T> {
  460. /**
  461. * @see _.create
  462. */
  463. create<U extends object>(properties?: U): Object<T & U>;
  464. }
  465. interface ObjectChain<T> {
  466. /**
  467. * @see _.create
  468. */
  469. create<U extends object>(properties?: U): ObjectChain<T & U>;
  470. }
  471. interface LoDashStatic {
  472. /**
  473. * Assigns own enumerable properties of source object(s) to the destination object for all destination
  474. * properties that resolve to undefined. Once a property is set, additional values of the same property are
  475. * ignored.
  476. *
  477. * Note: This method mutates object.
  478. *
  479. * @param object The destination object.
  480. * @param sources The source objects.
  481. * @return The destination object.
  482. */
  483. defaults<TObject, TSource>(object: TObject, source: TSource): NonNullable<TSource & TObject>;
  484. /**
  485. * @see _.defaults
  486. */
  487. defaults<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): NonNullable<TSource2 & TSource1 & TObject>;
  488. /**
  489. * @see _.defaults
  490. */
  491. defaults<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): NonNullable<TSource3 & TSource2 & TSource1 & TObject>;
  492. /**
  493. * @see _.defaults
  494. */
  495. defaults<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & TObject>;
  496. /**
  497. * @see _.defaults
  498. */
  499. defaults<TObject>(object: TObject): NonNullable<TObject>;
  500. /**
  501. * @see _.defaults
  502. */
  503. defaults(object: any, ...sources: any[]): any;
  504. }
  505. interface Object<T> {
  506. /**
  507. * @see _.defaults
  508. */
  509. defaults<TSource>(source: TSource): Object<NonNullable<TSource & T>>;
  510. /**
  511. * @see _.defaults
  512. */
  513. defaults<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<NonNullable<TSource2 & TSource1 & T>>;
  514. /**
  515. * @see _.defaults
  516. */
  517. defaults<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<NonNullable<TSource3 & TSource2 & TSource1 & T>>;
  518. /**
  519. * @see _.defaults
  520. */
  521. defaults<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & T>>;
  522. /**
  523. * @see _.defaults
  524. */
  525. defaults(): Object<NonNullable<T>>;
  526. /**
  527. * @see _.defaults
  528. */
  529. defaults(...sources: any[]): Object<any>;
  530. }
  531. interface ObjectChain<T> {
  532. /**
  533. * @see _.defaults
  534. */
  535. defaults<TSource>(source: TSource): ObjectChain<NonNullable<TSource & T>>;
  536. /**
  537. * @see _.defaults
  538. */
  539. defaults<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<NonNullable<TSource2 & TSource1 & T>>;
  540. /**
  541. * @see _.defaults
  542. */
  543. defaults<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<NonNullable<TSource3 & TSource2 & TSource1 & T>>;
  544. /**
  545. * @see _.defaults
  546. */
  547. defaults<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & T>>;
  548. /**
  549. * @see _.defaults
  550. */
  551. defaults(): ObjectChain<NonNullable<T>>;
  552. /**
  553. * @see _.defaults
  554. */
  555. defaults(...sources: any[]): ObjectChain<any>;
  556. }
  557. interface LoDashStatic {
  558. /**
  559. * This method is like _.defaults except that it recursively assigns default properties.
  560. * @param object The destination object.
  561. * @param sources The source objects.
  562. * @return Returns object.
  563. */
  564. defaultsDeep(object: any, ...sources: any[]): any;
  565. }
  566. interface Object<T> {
  567. /**
  568. * @see _.defaultsDeep
  569. */
  570. defaultsDeep(...sources: any[]): Object<any>;
  571. }
  572. interface ObjectChain<T> {
  573. /**
  574. * @see _.defaultsDeep
  575. */
  576. defaultsDeep(...sources: any[]): ObjectChain<any>;
  577. }
  578. interface LoDashStatic {
  579. /**
  580. * @see _.toPairs
  581. */
  582. entries<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
  583. /**
  584. * @see _.entries
  585. */
  586. entries(object?: object): Array<[string, any]>;
  587. }
  588. interface Object<T> {
  589. /**
  590. * @see _.entries
  591. */
  592. entries(): Collection<[string, T[keyof T]]>;
  593. }
  594. interface LoDashImplicitWrapper<TValue> {
  595. /**
  596. * @see _.entries
  597. */
  598. entries(): Collection<[string, any]>;
  599. }
  600. interface ObjectChain<T> {
  601. /**
  602. * @see _.entries
  603. */
  604. entries(): CollectionChain<[string, T[keyof T]]>;
  605. }
  606. interface LoDashExplicitWrapper<TValue> {
  607. /**
  608. * @see _.entries
  609. */
  610. entries(): CollectionChain<[string, any]>;
  611. }
  612. interface LoDashStatic {
  613. /**
  614. * @see _.entriesIn
  615. */
  616. entriesIn<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
  617. /**
  618. * @see _.entriesIn
  619. */
  620. entriesIn(object?: object): Array<[string, any]>;
  621. }
  622. interface Object<T> {
  623. /**
  624. * @see _.entriesIn
  625. */
  626. entriesIn(): Collection<[string, T[keyof T]]>;
  627. }
  628. interface LoDashImplicitWrapper<TValue> {
  629. /**
  630. * @see _.entriesIn
  631. */
  632. entriesIn(): Collection<[string, any]>;
  633. }
  634. interface ObjectChain<T> {
  635. /**
  636. * @see _.entriesIn
  637. */
  638. entriesIn(): CollectionChain<[string, T[keyof T]]>;
  639. }
  640. interface LoDashExplicitWrapper<TValue> {
  641. /**
  642. * @see _.entriesIn
  643. */
  644. entriesIn(): CollectionChain<[string, any]>;
  645. }
  646. interface LoDashStatic {
  647. /**
  648. * @see _.extend
  649. */
  650. extend<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
  651. /**
  652. * @see _.extend
  653. */
  654. extend<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
  655. /**
  656. * @see _.extend
  657. */
  658. extend<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
  659. /**
  660. * @see _.extend
  661. */
  662. extend<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  663. /**
  664. * @see _.extend
  665. */
  666. extend<TObject>(object: TObject): TObject;
  667. /**
  668. * @see _.extend
  669. */
  670. extend<TResult>(object: any, ...otherArgs: any[]): TResult;
  671. }
  672. interface Object<T> {
  673. /**
  674. * @see _.extend
  675. */
  676. extend<TSource>(source: TSource): Object<T & TSource>;
  677. /**
  678. * @see _.extend
  679. */
  680. extend<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
  681. /**
  682. * @see _.extend
  683. */
  684. extend<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
  685. /**
  686. * @see _.extend
  687. */
  688. extend<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  689. /**
  690. * @see _.extend
  691. */
  692. extend(): Object<T>;
  693. /**
  694. * @see _.extend
  695. */
  696. extend(...otherArgs: any[]): Object<any>;
  697. }
  698. interface ObjectChain<T> {
  699. /**
  700. * @see _.extend
  701. */
  702. extend<TSource>(source: TSource): ObjectChain<T & TSource>;
  703. /**
  704. * @see _.extend
  705. */
  706. extend<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
  707. /**
  708. * @see _.extend
  709. */
  710. extend<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  711. /**
  712. * @see _.extend
  713. */
  714. extend<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  715. /**
  716. * @see _.extend
  717. */
  718. extend(): ObjectChain<T>;
  719. /**
  720. * @see _.extend
  721. */
  722. extend(...otherArgs: any[]): ObjectChain<any>;
  723. }
  724. interface LoDashStatic {
  725. /**
  726. * @see _.extendWith
  727. */
  728. extendWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
  729. /**
  730. * @see _.extendWith
  731. */
  732. extendWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
  733. /**
  734. * @see _.extendWith
  735. */
  736. extendWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
  737. /**
  738. * @see _.extendWith
  739. */
  740. extendWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  741. /**
  742. * @see _.extendWith
  743. */
  744. extendWith<TObject>(object: TObject): TObject;
  745. /**
  746. * @see _.extendWith
  747. */
  748. extendWith<TResult>(object: any, ...otherArgs: any[]): TResult;
  749. }
  750. interface Object<T> {
  751. /**
  752. * @see _.extendWith
  753. */
  754. extendWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
  755. /**
  756. * @see _.extendWith
  757. */
  758. extendWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
  759. /**
  760. * @see _.extendWith
  761. */
  762. extendWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
  763. /**
  764. * @see _.extendWith
  765. */
  766. extendWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  767. /**
  768. * @see _.extendWith
  769. */
  770. extendWith(): Object<T>;
  771. /**
  772. * @see _.extendWith
  773. */
  774. extendWith(...otherArgs: any[]): Object<any>;
  775. }
  776. interface ObjectChain<T> {
  777. /**
  778. * @see _.extendWith
  779. */
  780. extendWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
  781. /**
  782. * @see _.extendWith
  783. */
  784. extendWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
  785. /**
  786. * @see _.extendWith
  787. */
  788. extendWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  789. /**
  790. * @see _.extendWith
  791. */
  792. extendWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  793. /**
  794. * @see _.extendWith
  795. */
  796. extendWith(): ObjectChain<T>;
  797. /**
  798. * @see _.extendWith
  799. */
  800. extendWith(...otherArgs: any[]): ObjectChain<any>;
  801. }
  802. interface LoDashStatic {
  803. /**
  804. * This method is like _.find except that it returns the key of the first element predicate returns truthy for
  805. * instead of the element itself.
  806. *
  807. * @param object The object to search.
  808. * @param predicate The function invoked per iteration.
  809. * @return Returns the key of the matched element, else undefined.
  810. */
  811. findKey<T>(object: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
  812. }
  813. interface LoDashImplicitWrapper<TValue> {
  814. /**
  815. * @see _.findKey
  816. */
  817. findKey(predicate?: ObjectIteratee<TValue>): string | undefined;
  818. }
  819. interface LoDashExplicitWrapper<TValue> {
  820. /**
  821. * @see _.findKey
  822. */
  823. findKey(predicate?: ObjectIteratee<TValue>): StringNullableChain;
  824. }
  825. interface LoDashStatic {
  826. /**
  827. * This method is like _.findKey except that it iterates over elements of a collection in the opposite order.
  828. *
  829. * @param object The object to search.
  830. * @param predicate The function invoked per iteration.
  831. * @return Returns the key of the matched element, else undefined.
  832. */
  833. findLastKey<T>(object: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
  834. }
  835. interface LoDashImplicitWrapper<TValue> {
  836. /**
  837. * @see _.findLastKey
  838. */
  839. findLastKey(predicate?: ObjectIteratee<TValue>): string | undefined;
  840. }
  841. interface LoDashExplicitWrapper<TValue> {
  842. /**
  843. * @see _.findLastKey
  844. */
  845. findLastKey(predicate?: ObjectIteratee<TValue>): StringNullableChain;
  846. }
  847. interface LoDashStatic {
  848. /**
  849. * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The
  850. * iteratee is invoked with three arguments: (value, key, object). Iteratee functions may
  851. * exit iteration early by explicitly returning false.
  852. *
  853. * @param object The object to iterate over.
  854. * @param iteratee The function invoked per iteration.
  855. * @return Returns object.
  856. */
  857. forIn<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
  858. /**
  859. * @see _.forIn
  860. */
  861. forIn<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
  862. }
  863. interface LoDashImplicitWrapper<TValue> {
  864. /**
  865. * @see _.forIn
  866. */
  867. forIn(iteratee?: ObjectIterator<TValue, any>): this;
  868. }
  869. interface LoDashExplicitWrapper<TValue> {
  870. /**
  871. * @see _.forIn
  872. */
  873. forIn(iteratee?: ObjectIterator<TValue, any>): this;
  874. }
  875. interface LoDashStatic {
  876. /**
  877. * This method is like _.forIn except that it iterates over properties of object in the opposite order.
  878. *
  879. * @param object The object to iterate over.
  880. * @param iteratee The function invoked per iteration.
  881. * @return Returns object.
  882. */
  883. forInRight<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
  884. /**
  885. * @see _.forInRight
  886. */
  887. forInRight<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
  888. }
  889. interface LoDashImplicitWrapper<TValue> {
  890. /**
  891. * @see _.forInRight
  892. */
  893. forInRight(iteratee?: ObjectIterator<TValue, any>): this;
  894. }
  895. interface LoDashExplicitWrapper<TValue> {
  896. /**
  897. * @see _.forInRight
  898. */
  899. forInRight(iteratee?: ObjectIterator<TValue, any>): this;
  900. }
  901. interface LoDashStatic {
  902. /**
  903. * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is
  904. * invoked with three arguments: (value, key, object). Iteratee functions may exit
  905. * iteration early by explicitly returning false.
  906. *
  907. * @param object The object to iterate over.
  908. * @param iteratee The function invoked per iteration.
  909. * @return Returns object.
  910. */
  911. forOwn<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
  912. /**
  913. * @see _.forOwn
  914. */
  915. forOwn<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
  916. }
  917. interface LoDashImplicitWrapper<TValue> {
  918. /**
  919. * @see _.forOwn
  920. */
  921. forOwn(iteratee?: ObjectIterator<TValue, any>): this;
  922. }
  923. interface LoDashExplicitWrapper<TValue> {
  924. /**
  925. * @see _.forOwn
  926. */
  927. forOwn(iteratee?: ObjectIterator<TValue, any>): this;
  928. }
  929. interface LoDashStatic {
  930. /**
  931. * This method is like _.forOwn except that it iterates over properties of object in the opposite order.
  932. *
  933. * @param object The object to iterate over.
  934. * @param iteratee The function invoked per iteration.
  935. * @return Returns object.
  936. */
  937. forOwnRight<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
  938. /**
  939. * @see _.forOwnRight
  940. */
  941. forOwnRight<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
  942. }
  943. interface LoDashImplicitWrapper<TValue> {
  944. /**
  945. * @see _.forOwnRight
  946. */
  947. forOwnRight(iteratee?: ObjectIterator<TValue, any>): this;
  948. }
  949. interface LoDashExplicitWrapper<TValue> {
  950. /**
  951. * @see _.forOwnRight
  952. */
  953. forOwnRight(iteratee?: ObjectIterator<TValue, any>): this;
  954. }
  955. interface LoDashStatic {
  956. /**
  957. * Creates an array of function property names from own enumerable properties
  958. * of `object`.
  959. *
  960. * @category Object
  961. * @param object The object to inspect.
  962. * @returns Returns the new array of property names.
  963. * @example
  964. *
  965. * function Foo() {
  966. * this.a = _.constant('a');
  967. * this.b = _.constant('b');
  968. * }
  969. *
  970. * Foo.prototype.c = _.constant('c');
  971. *
  972. * _.functions(new Foo);
  973. * // => ['a', 'b']
  974. */
  975. functions(object: any): string[];
  976. }
  977. interface LoDashImplicitWrapper<TValue> {
  978. /**
  979. * @see _.functions
  980. */
  981. functions(): Collection<string>;
  982. }
  983. interface LoDashExplicitWrapper<TValue> {
  984. /**
  985. * @see _.functions
  986. */
  987. functions(): CollectionChain<string>;
  988. }
  989. interface LoDashStatic {
  990. /**
  991. * Creates an array of function property names from own and inherited
  992. * enumerable properties of `object`.
  993. *
  994. * @category Object
  995. * @param object The object to inspect.
  996. * @returns Returns the new array of property names.
  997. * @example
  998. *
  999. * function Foo() {
  1000. * this.a = _.constant('a');
  1001. * this.b = _.constant('b');
  1002. * }
  1003. *
  1004. * Foo.prototype.c = _.constant('c');
  1005. *
  1006. * _.functionsIn(new Foo);
  1007. * // => ['a', 'b', 'c']
  1008. */
  1009. functionsIn<T extends {}>(object: any): string[];
  1010. }
  1011. interface LoDashImplicitWrapper<TValue> {
  1012. /**
  1013. * @see _.functionsIn
  1014. */
  1015. functionsIn(): Collection<string>;
  1016. }
  1017. interface LoDashExplicitWrapper<TValue> {
  1018. /**
  1019. * @see _.functionsIn
  1020. */
  1021. functionsIn(): CollectionChain<string>;
  1022. }
  1023. type GetFieldTypeOfArrayLikeByKey<T extends unknown[], K> =
  1024. K extends number ? T[K]
  1025. : K extends `${infer N extends number}` ? T[N]
  1026. : K extends keyof T ? T[K] : undefined;
  1027. type GetFieldTypeOfStringByKey<T extends string, K> =
  1028. K extends number ? T[K]
  1029. : K extends `${infer N extends number}` ? T[N]
  1030. : K extends keyof T ? T[K]
  1031. : undefined;
  1032. type GetFieldTypeOfNarrowedByKey<T, K> =
  1033. T extends unknown[] ? GetFieldTypeOfArrayLikeByKey<T, K>
  1034. : T extends string ? GetFieldTypeOfStringByKey<T, K>
  1035. : K extends keyof T ? T[K]
  1036. : K extends number
  1037. ? `${K}` extends keyof T ? T[`${K}`] : undefined
  1038. : K extends `${infer N extends number}`
  1039. ? N extends keyof T ? T[N] : undefined
  1040. : undefined;
  1041. /** Internal. Assumes P is a dot-delimited path. */
  1042. type GetFieldTypeOfNarrowedByDotPath<T, P> =
  1043. P extends `${infer L}.${infer R}`
  1044. ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, L>, R, 'DotPath'>
  1045. : GetFieldTypeOfNarrowedByKey<T, P>;
  1046. /** Internal. This is a piece of GetFieldTypeOfNarrowedByLKR logic,
  1047. * assuming that Lc isn't to be ignored, and does not end with dot. */
  1048. type GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R> =
  1049. '' extends R
  1050. ? GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>
  1051. : R extends `.${infer Rc}`
  1052. ? GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, Rc>
  1053. : GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, R>
  1054. /** Internal. Assumes T has been narrowed; L is a dot-delimited path,
  1055. * and should be ignored if an empty string; K is a key name; and R is
  1056. * a dot-delimetered path, to be ignored if an empty string. Also if
  1057. * L has a tail dot, or R has a front dot, these dots should be discarded,
  1058. * however when L or R is just a dot, they should be interpreted as empty
  1059. * key name (rather than ignored). */
  1060. type GetFieldTypeOfNarrowedByLKR<T, L, K, R> =
  1061. '' extends L
  1062. ? '' extends R
  1063. ? GetFieldTypeOfNarrowedByKey<T, K>
  1064. : R extends `.${infer Rc}`
  1065. ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, Rc>
  1066. : GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, R>
  1067. : L extends `${infer Lc}.`
  1068. ? GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R>
  1069. : GetFieldTypeOfNarrowedByLcKR<T, L, K, R>
  1070. /** Internal. Assumes T has been narrowed. */
  1071. type GetFieldTypeOfNarrowed<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
  1072. XT extends 'Key' ? GetFieldTypeOfNarrowedByKey<T, X>
  1073. : XT extends 'DotPath' ? GetFieldTypeOfNarrowedByDotPath<T, X>
  1074. : X extends `${infer L}['${infer K}']${infer R}`
  1075. ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
  1076. : X extends `${infer L}["${infer K}"]${infer R}`
  1077. ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
  1078. : X extends `${infer L}[${infer K}]${infer R}`
  1079. ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
  1080. : GetFieldTypeOfNarrowedByDotPath<T, X>;
  1081. /** Internal. Assumes T has been narrowed to an object type. */
  1082. type GetFieldTypeOfObject<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
  1083. Extract<T, unknown[]> extends never
  1084. ? GetFieldTypeOfNarrowed<T, X, XT>
  1085. : GetFieldTypeOfNarrowed<Exclude<T, unknown[]>, X, XT>
  1086. | GetFieldTypeOfNarrowed<Extract<T, unknown[]>, X, XT>;
  1087. /** Internal. Assumes T has been narrowed to a primitive type. */
  1088. type GetFieldTypeOfPrimitive<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
  1089. Extract<T, string> extends never
  1090. ? T extends never ? never : undefined
  1091. : (Exclude<T, string> extends never ? never : undefined)
  1092. | GetFieldTypeOfNarrowed<Extract<T, string>, X, XT>;
  1093. /**
  1094. * Deduces the type of value at the path P of type T,
  1095. * so that _.get<T, P>(t: T, p: P): GetFieldType<T, P>.
  1096. * XT specifies the exact meaning of X:
  1097. * - 'Path' (default) - X is a path type to be fully parsed;
  1098. * - 'DotPath - X is a dot-delimitered path, without square (indexing) brackets;
  1099. * - 'Key' - X is a simple key, and needs no parsing.
  1100. */
  1101. type GetFieldType<T, X, XT extends 'DotPath' | 'Key' | 'Path' = 'Path'> =
  1102. Extract<T, object> extends never
  1103. ? GetFieldTypeOfPrimitive<T, X, XT>
  1104. : GetFieldTypeOfPrimitive<Exclude<T, object>, X, XT>
  1105. | GetFieldTypeOfObject<Extract<T, object>, X, XT>;
  1106. interface LoDashStatic {
  1107. /**
  1108. * Gets the property value at path of object. If the resolved value is undefined the defaultValue is used
  1109. * in its place.
  1110. *
  1111. * @param object The object to query.
  1112. * @param path The path of the property to get.
  1113. * @param defaultValue The value returned if the resolved value is undefined.
  1114. * @return Returns the resolved value.
  1115. */
  1116. get<TObject extends object, TKey extends keyof TObject>(object: TObject, path: TKey | [TKey]): TObject[TKey];
  1117. /**
  1118. * @see _.get
  1119. */
  1120. get<TObject extends object, TKey extends keyof TObject>(object: TObject | null | undefined, path: TKey | [TKey]): TObject[TKey] | undefined;
  1121. /**
  1122. * @see _.get
  1123. */
  1124. get<TObject extends object, TKey extends keyof TObject, TDefault>(object: TObject | null | undefined, path: TKey | [TKey], defaultValue: TDefault): Exclude<TObject[TKey], undefined> | TDefault;
  1125. /**
  1126. * @see _.get
  1127. */
  1128. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1]>(object: TObject, path: [TKey1, TKey2]): TObject[TKey1][TKey2];
  1129. /**
  1130. * @see _.get
  1131. */
  1132. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>>(object: TObject | null | undefined, path: [TKey1, TKey2]): NonNullable<TObject[TKey1]>[TKey2] | undefined;
  1133. /**
  1134. * @see _.get
  1135. */
  1136. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2], defaultValue: TDefault): Exclude<NonNullable<TObject[TKey1]>[TKey2], undefined> | TDefault;
  1137. /**
  1138. * @see _.get
  1139. */
  1140. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2]>(object: TObject, path: [TKey1, TKey2, TKey3]): TObject[TKey1][TKey2][TKey3];
  1141. /**
  1142. * @see _.get
  1143. */
  1144. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3]): NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3] | undefined;
  1145. /**
  1146. * @see _.get
  1147. */
  1148. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3], undefined> | TDefault;
  1149. /**
  1150. * @see _.get
  1151. */
  1152. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2], TKey4 extends keyof TObject[TKey1][TKey2][TKey3]>(object: TObject, path: [TKey1, TKey2, TKey3, TKey4]): TObject[TKey1][TKey2][TKey3][TKey4];
  1153. /**
  1154. * @see _.get
  1155. */
  1156. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4]): NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4] | undefined;
  1157. /**
  1158. * @see _.get
  1159. */
  1160. get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude<NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4], undefined> | TDefault;
  1161. /**
  1162. * @see _.get
  1163. */
  1164. get<T>(object: NumericDictionary<T>, path: number): T;
  1165. /**
  1166. * @see _.get
  1167. */
  1168. get<T>(object: NumericDictionary<T> | null | undefined, path: number): T | undefined;
  1169. /**
  1170. * @see _.get
  1171. */
  1172. get<T, TDefault>(object: NumericDictionary<T> | null | undefined, path: number, defaultValue: TDefault): T | TDefault;
  1173. /**
  1174. * @see _.get
  1175. */
  1176. get<TDefault>(object: null | undefined, path: PropertyPath, defaultValue: TDefault): TDefault;
  1177. /**
  1178. * @see _.get
  1179. */
  1180. get(object: null | undefined, path: PropertyPath): undefined;
  1181. /**
  1182. * @see _.get
  1183. */
  1184. get<TObject, TPath extends string>(data: TObject, path: TPath): string extends TPath ? any : GetFieldType<TObject, TPath>;
  1185. /**
  1186. * @see _.get
  1187. */
  1188. get<TObject, TPath extends string, TDefault = GetFieldType<TObject, TPath>>(data: TObject, path: TPath, defaultValue: TDefault): Exclude<GetFieldType<TObject, TPath>, null | undefined> | TDefault;
  1189. /**
  1190. * @see _.get
  1191. */
  1192. get(object: any, path: PropertyPath, defaultValue?: any): any;
  1193. }
  1194. interface String {
  1195. /**
  1196. * @see _.get
  1197. */
  1198. get(path: number | number[]): string;
  1199. /**
  1200. * @see _.get
  1201. */
  1202. get(path: number | number[], defaultValue: string): string;
  1203. }
  1204. interface Object<T> {
  1205. /**
  1206. * @see _.get
  1207. */
  1208. get<TKey extends keyof T>(path: TKey | [TKey]): T[TKey];
  1209. /**
  1210. * @see _.get
  1211. */
  1212. get<TKey extends keyof T, TDefault>(path: TKey | [TKey], defaultValue: TDefault): Exclude<T[TKey], undefined> | TDefault;
  1213. /**
  1214. * @see _.get
  1215. */
  1216. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2]): T[TKey1][TKey2];
  1217. /**
  1218. * @see _.get
  1219. */
  1220. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TDefault>(path: [TKey1, TKey2], defaultValue: TDefault): Exclude<T[TKey1][TKey2], undefined> | TDefault;
  1221. /**
  1222. * @see _.get
  1223. */
  1224. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2]>(path: [TKey1, TKey2, TKey3]): T[TKey1][TKey2][TKey3];
  1225. /**
  1226. * @see _.get
  1227. */
  1228. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TDefault>(path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude<T[TKey1][TKey2][TKey3], undefined> | TDefault;
  1229. /**
  1230. * @see _.get
  1231. */
  1232. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3]>(path: [TKey1, TKey2, TKey3, TKey4]): T[TKey1][TKey2][TKey3][TKey4];
  1233. /**
  1234. * @see _.get
  1235. */
  1236. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3], TDefault>(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined> | TDefault;
  1237. /**
  1238. * @see _.get
  1239. */
  1240. get<TPath extends string>(path: TPath): string extends TPath ? any : GetFieldType<T, TPath>;
  1241. /**
  1242. * @see _.get
  1243. */
  1244. get<TPath extends string, TDefault = GetFieldType<T, TPath>>(path: TPath, defaultValue: TDefault): Exclude<GetFieldType<T, TPath>, null | undefined> | TDefault;
  1245. /**
  1246. * @see _.get
  1247. */
  1248. get(path: PropertyPath, defaultValue?: any): any;
  1249. }
  1250. interface Collection<T> {
  1251. /**
  1252. * @see _.get
  1253. */
  1254. get(path: number): T;
  1255. /**
  1256. * @see _.get
  1257. */
  1258. get<TDefault>(path: number, defaultValue: TDefault): T | TDefault;
  1259. }
  1260. interface StringChain {
  1261. /**
  1262. * @see _.get
  1263. */
  1264. get(path: number | number[]): StringChain;
  1265. /**
  1266. * @see _.get
  1267. */
  1268. get(path: number | number[], defaultValue: string): StringChain;
  1269. }
  1270. interface StringNullableChain {
  1271. /**
  1272. * @see _.get
  1273. */
  1274. get(path: number | number[]): StringNullableChain;
  1275. /**
  1276. * @see _.get
  1277. */
  1278. get(path: number | number[], defaultValue: string): StringChain;
  1279. }
  1280. interface ObjectChain<T> {
  1281. /**
  1282. * @see _.get
  1283. */
  1284. get<TKey extends keyof T>(path: TKey | [TKey]): ExpChain<T[TKey]>;
  1285. /**
  1286. * @see _.get
  1287. */
  1288. get<TKey extends keyof T>(path: TKey | [TKey], defaultValue: never[]): T[TKey] extends any[] ? ExpChain<Exclude<T[TKey], undefined>> : ExpChain<Exclude<T[TKey], undefined> | never[]>;
  1289. /**
  1290. * @see _.get
  1291. */
  1292. get<TKey extends keyof T, TDefault>(path: TKey | [TKey], defaultValue: TDefault): ExpChain<Exclude<T[TKey], undefined> | TDefault>;
  1293. /**
  1294. * @see _.get
  1295. */
  1296. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2]): ExpChain<T[TKey1][TKey2]>;
  1297. /**
  1298. * @see _.get
  1299. */
  1300. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2], defaultValue: never[]): T[TKey1][TKey2] extends any[] ? ExpChain<Exclude<T[TKey1][TKey2], undefined>> : ExpChain<Exclude<T[TKey1][TKey2], undefined> | never[]>;
  1301. /**
  1302. * @see _.get
  1303. */
  1304. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TDefault>(path: [TKey1, TKey2], defaultValue: TDefault): ExpChain<Exclude<T[TKey1][TKey2], undefined> | TDefault>;
  1305. /**
  1306. * @see _.get
  1307. */
  1308. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2]>(path: [TKey1, TKey2, TKey3]): ExpChain<T[TKey1][TKey2][TKey3]>;
  1309. /**
  1310. * @see _.get
  1311. */
  1312. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2]>(path: [TKey1, TKey2, TKey3], defaultValue: never[]): T[TKey1][TKey2][TKey3] extends any[] ? ExpChain<Exclude<T[TKey1][TKey2][TKey3], undefined>> : ExpChain<Exclude<T[TKey1][TKey2][TKey3], undefined> | never[]>;
  1313. /**
  1314. * @see _.get
  1315. */
  1316. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TDefault>(path: [TKey1, TKey2, TKey3], defaultValue: TDefault): ExpChain<Exclude<T[TKey1][TKey2][TKey3], undefined> | TDefault>;
  1317. /**
  1318. * @see _.get
  1319. */
  1320. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3]>(path: [TKey1, TKey2, TKey3, TKey4]): ExpChain<T[TKey1][TKey2][TKey3][TKey4]>;
  1321. /**
  1322. * @see _.get
  1323. */
  1324. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3]>(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: never[]): T[TKey1][TKey2][TKey3][TKey4] extends any[] ? ExpChain<Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined>> : ExpChain<Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined> | never[]>;
  1325. /**
  1326. * @see _.get
  1327. */
  1328. get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3], TDefault>(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): ExpChain<Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined> | TDefault>;
  1329. /**
  1330. * @see _.get
  1331. */
  1332. get<TPath extends string>(path: TPath): string extends TPath ? LoDashExplicitWrapper<any> : ExpChain<GetFieldType<T, TPath>>;
  1333. /**
  1334. * @see _.get
  1335. */
  1336. get<TPath extends string, TDefault = GetFieldType<T, TPath>>(path: TPath, defaultValue: TDefault): ExpChain<Exclude<GetFieldType<T, TPath>, null | undefined> | TDefault>;
  1337. /**
  1338. * @see _.get
  1339. */
  1340. get(path: PropertyPath, defaultValue?: any): LoDashExplicitWrapper<any>;
  1341. }
  1342. interface CollectionChain<T> {
  1343. /**
  1344. * @see _.get
  1345. */
  1346. get(path: number): ExpChain<T>;
  1347. /**
  1348. * @see _.get
  1349. */
  1350. get<TDefault>(path: number, defaultValue: TDefault): ExpChain<T | TDefault>;
  1351. }
  1352. interface LoDashStatic {
  1353. /**
  1354. * Checks if `path` is a direct property of `object`.
  1355. *
  1356. * @category Object
  1357. * @param object The object to query.
  1358. * @param path The path to check.
  1359. * @returns Returns `true` if `path` exists, else `false`.
  1360. * @example
  1361. *
  1362. * var object = { 'a': { 'b': { 'c': 3 } } };
  1363. * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
  1364. *
  1365. * _.has(object, 'a');
  1366. * // => true
  1367. *
  1368. * _.has(object, 'a.b.c');
  1369. * // => true
  1370. *
  1371. * _.has(object, ['a', 'b', 'c']);
  1372. * // => true
  1373. *
  1374. * _.has(other, 'a');
  1375. * // => false
  1376. */
  1377. has<T, K extends PropertyName>(object: T, path: K): object is T & { [P in K]: P extends keyof T ? T[P] : Record<string, unknown> extends T ? T[keyof T] : unknown} & {[uniqueSymbol]: unknown};
  1378. has<T>(object: T, path: PropertyPath): boolean;
  1379. }
  1380. interface LoDashImplicitWrapper<TValue> {
  1381. /**
  1382. * @see _.has
  1383. */
  1384. has(path: PropertyPath): boolean;
  1385. }
  1386. interface LoDashExplicitWrapper<TValue> {
  1387. /**
  1388. * @see _.has
  1389. */
  1390. has(path: PropertyPath): PrimitiveChain<boolean>;
  1391. }
  1392. interface LoDashStatic {
  1393. /**
  1394. * Checks if `path` is a direct or inherited property of `object`.
  1395. *
  1396. * @category Object
  1397. * @param object The object to query.
  1398. * @param path The path to check.
  1399. * @returns Returns `true` if `path` exists, else `false`.
  1400. * @example
  1401. *
  1402. * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
  1403. *
  1404. * _.hasIn(object, 'a');
  1405. * // => true
  1406. *
  1407. * _.hasIn(object, 'a.b.c');
  1408. * // => true
  1409. *
  1410. * _.hasIn(object, ['a', 'b', 'c']);
  1411. * // => true
  1412. *
  1413. * _.hasIn(object, 'b');
  1414. * // => false
  1415. */
  1416. hasIn<T>(object: T, path: PropertyPath): boolean;
  1417. }
  1418. interface LoDashImplicitWrapper<TValue> {
  1419. /**
  1420. * @see _.hasIn
  1421. */
  1422. hasIn(path: PropertyPath): boolean;
  1423. }
  1424. interface LoDashExplicitWrapper<TValue> {
  1425. /**
  1426. * @see _.hasIn
  1427. */
  1428. hasIn(path: PropertyPath): PrimitiveChain<boolean>;
  1429. }
  1430. interface LoDashStatic {
  1431. /**
  1432. * Creates an object composed of the inverted keys and values of object. If object contains duplicate values,
  1433. * subsequent values overwrite property assignments of previous values unless multiValue is true.
  1434. *
  1435. * @param object The object to invert.
  1436. * @param multiValue Allow multiple values per key.
  1437. * @return Returns the new inverted object.
  1438. */
  1439. invert(object: object): Dictionary<string>;
  1440. }
  1441. interface LoDashImplicitWrapper<TValue> {
  1442. /**
  1443. * @see _.invert
  1444. */
  1445. invert(): Object<Dictionary<string>>;
  1446. }
  1447. interface LoDashExplicitWrapper<TValue> {
  1448. /**
  1449. * @see _.invert
  1450. */
  1451. invert(): ObjectChain<Dictionary<string>>;
  1452. }
  1453. interface LoDashStatic {
  1454. /**
  1455. * This method is like _.invert except that the inverted object is generated from the results of running each
  1456. * element of object through iteratee. The corresponding inverted value of each inverted key is an array of
  1457. * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value).
  1458. *
  1459. * @param object The object to invert.
  1460. * @param interatee The iteratee invoked per element.
  1461. * @return Returns the new inverted object.
  1462. */
  1463. invertBy<T>(object: Dictionary<T> | NumericDictionary<T> | null | undefined, interatee?: ValueIteratee<T>): Dictionary<string[]>;
  1464. /**
  1465. * @see _.invertBy
  1466. */
  1467. invertBy<T extends object>(object: T | null | undefined, interatee?: ValueIteratee<T[keyof T]>): Dictionary<string[]>;
  1468. }
  1469. interface String {
  1470. /**
  1471. * @see _.invertBy
  1472. */
  1473. invertBy(iteratee?: ValueIteratee<string>): Object<Dictionary<string[]>>;
  1474. }
  1475. interface Collection<T> {
  1476. /**
  1477. * @see _.invertBy
  1478. */
  1479. invertBy(iteratee?: ValueIteratee<T>): Object<Dictionary<string[]>>;
  1480. }
  1481. interface Object<T> {
  1482. /**
  1483. * @see _.invertBy
  1484. */
  1485. invertBy(iteratee?: ValueIteratee<T[keyof T]>): Object<Dictionary<string[]>>;
  1486. }
  1487. interface StringChain {
  1488. /**
  1489. * @see _.invertBy
  1490. */
  1491. invertBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
  1492. }
  1493. interface StringNullableChain {
  1494. /**
  1495. * @see _.invertBy
  1496. */
  1497. invertBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
  1498. }
  1499. interface CollectionChain<T> {
  1500. /**
  1501. * @see _.invertBy
  1502. */
  1503. invertBy(iteratee?: ValueIteratee<T>): ObjectChain<Dictionary<string[]>>;
  1504. }
  1505. interface ObjectChain<T> {
  1506. /**
  1507. * @see _.invertBy
  1508. */
  1509. invertBy(iteratee?: ValueIteratee<T[keyof T]>): ObjectChain<Dictionary<string[]>>;
  1510. }
  1511. interface LoDashStatic {
  1512. /**
  1513. * Invokes the method at path of object.
  1514. * @param object The object to query.
  1515. * @param path The path of the method to invoke.
  1516. * @param args The arguments to invoke the method with.
  1517. */
  1518. invoke(object: any, path: PropertyPath, ...args: any[]): any;
  1519. }
  1520. interface LoDashImplicitWrapper<TValue> {
  1521. /**
  1522. * @see _.invoke
  1523. */
  1524. invoke(path: PropertyPath, ...args: any[]): any;
  1525. }
  1526. interface LoDashExplicitWrapper<TValue> {
  1527. /**
  1528. * @see _.invoke
  1529. */
  1530. invoke(path: PropertyPath, ...args: any[]): LoDashExplicitWrapper<any>;
  1531. }
  1532. interface LoDashStatic {
  1533. /**
  1534. * Creates an array of the own enumerable property names of object.
  1535. *
  1536. * Note: Non-object values are coerced to objects. See the ES spec for more details.
  1537. *
  1538. * @param object The object to query.
  1539. * @return Returns the array of property names.
  1540. */
  1541. keys(object?: any): string[];
  1542. }
  1543. interface LoDashImplicitWrapper<TValue> {
  1544. /**
  1545. * @see _.keys
  1546. */
  1547. keys(): Collection<string>;
  1548. }
  1549. interface LoDashExplicitWrapper<TValue> {
  1550. /**
  1551. * @see _.keys
  1552. */
  1553. keys(): CollectionChain<string>;
  1554. }
  1555. interface LoDashStatic {
  1556. /**
  1557. * Creates an array of the own and inherited enumerable property names of object.
  1558. *
  1559. * Note: Non-object values are coerced to objects.
  1560. *
  1561. * @param object The object to query.
  1562. * @return An array of property names.
  1563. */
  1564. keysIn(object?: any): string[];
  1565. }
  1566. interface LoDashImplicitWrapper<TValue> {
  1567. /**
  1568. * @see _.keysIn
  1569. */
  1570. keysIn(): Collection<string>;
  1571. }
  1572. interface LoDashExplicitWrapper<TValue> {
  1573. /**
  1574. * @see _.keysIn
  1575. */
  1576. keysIn(): CollectionChain<string>;
  1577. }
  1578. interface LoDashStatic {
  1579. /**
  1580. * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated
  1581. * by running each own enumerable property of object through iteratee.
  1582. *
  1583. * @param object The object to iterate over.
  1584. * @param iteratee The function invoked per iteration.
  1585. * @return Returns the new mapped object.
  1586. */
  1587. mapKeys<T>(object: List<T> | null | undefined, iteratee?: ListIteratee<T>): Dictionary<T>;
  1588. /**
  1589. * @see _.mapKeys
  1590. */
  1591. mapKeys<T extends object>(object: T | null | undefined, iteratee?: ObjectIteratee<T>): Dictionary<T[keyof T]>;
  1592. }
  1593. interface Collection<T> {
  1594. /**
  1595. * @see _.mapKeys
  1596. */
  1597. mapKeys(iteratee?: ListIteratee<T>): Object<Dictionary<T>>;
  1598. }
  1599. interface Object<T> {
  1600. /**
  1601. * @see _.mapKeys
  1602. */
  1603. mapKeys(iteratee?: ObjectIteratee<T>): Object<Dictionary<T[keyof T]>>;
  1604. }
  1605. interface CollectionChain<T> {
  1606. /**
  1607. * @see _.mapKeys
  1608. */
  1609. mapKeys(iteratee?: ListIteratee<T>): ObjectChain<Dictionary<T>>;
  1610. }
  1611. interface ObjectChain<T> {
  1612. /**
  1613. * @see _.mapKeys
  1614. */
  1615. mapKeys(iteratee?: ObjectIteratee<T>): ObjectChain<Dictionary<T[keyof T]>>;
  1616. }
  1617. interface LoDashStatic {
  1618. /**
  1619. * Creates an object with the same keys as object and values generated by running each own
  1620. * enumerable property of object through iteratee. The iteratee function is
  1621. * invoked with three arguments: (value, key, object).
  1622. *
  1623. * @param object The object to iterate over.
  1624. * @param iteratee The function invoked per iteration.
  1625. * @return Returns the new mapped object.
  1626. */
  1627. mapValues<TResult>(obj: string | null | undefined, callback: StringIterator<TResult>): NumericDictionary<TResult>;
  1628. /**
  1629. * @see _.mapValues
  1630. */
  1631. mapValues<T, TResult>(array: T[], callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
  1632. /**
  1633. * @see _.mapValues
  1634. */
  1635. mapValues<T extends object, TResult>(obj: T | null | undefined, callback: ObjectIterator<T, TResult>): { [P in keyof T]: TResult };
  1636. /**
  1637. * @see _.mapValues
  1638. */
  1639. mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: object): Dictionary<boolean>;
  1640. /**
  1641. * @see _.mapValues
  1642. */
  1643. mapValues<T extends object>(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean };
  1644. /**
  1645. * @see _.mapValues
  1646. */
  1647. mapValues<T, TKey extends keyof T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: TKey): Dictionary<T[TKey]>;
  1648. /**
  1649. * @see _.mapValues
  1650. */
  1651. mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: string): Dictionary<any>;
  1652. /**
  1653. * @see _.mapValues
  1654. */
  1655. mapValues<T extends object>(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any };
  1656. /**
  1657. * @see _.mapValues
  1658. */
  1659. mapValues(obj: string | null | undefined): NumericDictionary<string>;
  1660. /**
  1661. * @see _.mapValues
  1662. */
  1663. mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined): Dictionary<T>;
  1664. /**
  1665. * @see _.mapValues
  1666. */
  1667. mapValues<T extends object>(obj: T): T;
  1668. /**
  1669. * @see _.mapValues
  1670. */
  1671. mapValues<T extends object>(obj: T | null | undefined): PartialObject<T>;
  1672. }
  1673. interface String {
  1674. /**
  1675. * @see _.mapValues
  1676. */
  1677. mapValues<TResult>(callback: StringIterator<TResult>): Object<NumericDictionary<TResult>>;
  1678. /**
  1679. * @see _.mapValues
  1680. */
  1681. mapValues(): Object<NumericDictionary<string>>;
  1682. }
  1683. interface Collection<T> {
  1684. /**
  1685. * @see _.mapValues
  1686. */
  1687. mapValues<TResult>(callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
  1688. /**
  1689. * @see _.mapValues
  1690. */
  1691. mapValues<TKey extends keyof T>(iteratee: TKey): Object<Dictionary<T[TKey]>>;
  1692. /**
  1693. * @see _.mapValues
  1694. */
  1695. mapValues(iteratee: object): Object<Dictionary<boolean>>;
  1696. /**
  1697. * @see _.mapValues
  1698. */
  1699. mapValues(iteratee: string): Object<Dictionary<any>>;
  1700. /**
  1701. * @see _.mapValues
  1702. */
  1703. mapValues(): Object<Dictionary<T>>;
  1704. }
  1705. interface Object<T> {
  1706. /**
  1707. * @see _.mapValues
  1708. */
  1709. mapValues<TResult>(callback: ObjectIterator<T, TResult>): Object<{ [P in keyof T]: TResult }>;
  1710. /**
  1711. * @see _.mapValues
  1712. */
  1713. mapValues<TResult>(callback: DictionaryIterator<T[keyof T], TResult>): Object<Dictionary<TResult>>;
  1714. /**
  1715. * @see _.mapValues
  1716. */
  1717. mapValues(iteratee: object): Object<{ [P in keyof T]: boolean }>;
  1718. /**
  1719. * @see _.mapValues
  1720. */
  1721. mapValues<TKey extends keyof T[keyof T]>(iteratee: TKey): Object<Dictionary<T[keyof T][TKey]>>;
  1722. /**
  1723. * @see _.mapValues
  1724. */
  1725. mapValues(iteratee: string): Object<{ [P in keyof T]: any }>;
  1726. /**
  1727. * @see _.mapValues
  1728. */
  1729. mapValues(): Object<T>;
  1730. }
  1731. interface StringChain {
  1732. /**
  1733. * @see _.mapValues
  1734. */
  1735. mapValues<TResult>(callback: StringIterator<TResult>): ObjectChain<NumericDictionary<TResult>>;
  1736. /**
  1737. * @see _.mapValues
  1738. */
  1739. mapValues(): ObjectChain<NumericDictionary<string>>;
  1740. }
  1741. interface StringNullableChain {
  1742. /**
  1743. * @see _.mapValues
  1744. */
  1745. mapValues<TResult>(callback: StringIterator<TResult>): ObjectChain<NumericDictionary<TResult>>;
  1746. /**
  1747. * @see _.mapValues
  1748. */
  1749. mapValues(): ObjectChain<NumericDictionary<string>>;
  1750. }
  1751. interface CollectionChain<T> {
  1752. /**
  1753. * @see _.mapValues
  1754. */
  1755. mapValues<TResult>(callback: ArrayIterator<T, TResult>): ObjectChain<NumericDictionary<TResult>>;
  1756. /**
  1757. * @see _.mapValues
  1758. */
  1759. mapValues<TKey extends keyof T>(iteratee: TKey): ObjectChain<Dictionary<T[TKey]>>;
  1760. /**
  1761. * @see _.mapValues
  1762. */
  1763. mapValues(iteratee: object): ObjectChain<Dictionary<boolean>>;
  1764. /**
  1765. * @see _.mapValues
  1766. */
  1767. mapValues(iteratee: string): ObjectChain<Dictionary<any>>;
  1768. /**
  1769. * @see _.mapValues
  1770. */
  1771. mapValues(): ObjectChain<Dictionary<T>>;
  1772. }
  1773. interface ObjectChain<T> {
  1774. /**
  1775. * @see _.mapValues
  1776. */
  1777. mapValues<TResult>(callback: ObjectIterator<T, TResult>): ObjectChain<{ [P in keyof T]: TResult }>;
  1778. /**
  1779. * @see _.mapValues
  1780. */
  1781. mapValues<TResult>(callback: DictionaryIterator<T[keyof T], TResult>): ObjectChain<Dictionary<TResult>>;
  1782. /**
  1783. * @see _.mapValues
  1784. */
  1785. mapValues(iteratee: object): ObjectChain<{ [P in keyof T]: boolean }>;
  1786. /**
  1787. * @see _.mapValues
  1788. */
  1789. mapValues<TKey extends keyof T[keyof T]>(iteratee: TKey): ObjectChain<Dictionary<T[keyof T][TKey]>>;
  1790. /**
  1791. * @see _.mapValues
  1792. */
  1793. mapValues(iteratee: string): ObjectChain<{ [P in keyof T]: any }>;
  1794. /**
  1795. * @see _.mapValues
  1796. */
  1797. mapValues(): ObjectChain<T>;
  1798. }
  1799. interface LoDashStatic {
  1800. /**
  1801. * Recursively merges own and inherited enumerable properties of source
  1802. * objects into the destination object, skipping source properties that resolve
  1803. * to `undefined`. Array and plain object properties are merged recursively.
  1804. * Other objects and value types are overridden by assignment. Source objects
  1805. * are applied from left to right. Subsequent sources overwrite property
  1806. * assignments of previous sources.
  1807. *
  1808. * **Note:** This method mutates `object`.
  1809. *
  1810. * @category Object
  1811. * @param object The destination object.
  1812. * @param [source] The source objects.
  1813. * @returns Returns `object`.
  1814. * @example
  1815. *
  1816. * var users = {
  1817. * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
  1818. * };
  1819. *
  1820. * var ages = {
  1821. * 'data': [{ 'age': 36 }, { 'age': 40 }]
  1822. * };
  1823. *
  1824. * _.merge(users, ages);
  1825. * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
  1826. */
  1827. merge<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
  1828. /**
  1829. * @see _.merge
  1830. */
  1831. merge<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
  1832. /**
  1833. * @see _.merge
  1834. */
  1835. merge<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
  1836. /**
  1837. * @see _.merge
  1838. */
  1839. merge<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  1840. /**
  1841. * @see _.merge
  1842. */
  1843. merge(object: any, ...otherArgs: any[]): any;
  1844. }
  1845. interface Object<T> {
  1846. /**
  1847. * @see _.merge
  1848. */
  1849. merge<TSource>(source: TSource): Object<T & TSource>;
  1850. /**
  1851. * @see _.merge
  1852. */
  1853. merge<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
  1854. /**
  1855. * @see _.merge
  1856. */
  1857. merge<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
  1858. /**
  1859. * @see _.merge
  1860. */
  1861. merge<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  1862. /**
  1863. * @see _.merge
  1864. */
  1865. merge(...otherArgs: any[]): Object<any>;
  1866. }
  1867. interface ObjectChain<T> {
  1868. /**
  1869. * @see _.merge
  1870. */
  1871. merge<TSource>(source: TSource): ObjectChain<T & TSource>;
  1872. /**
  1873. * @see _.merge
  1874. */
  1875. merge<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
  1876. /**
  1877. * @see _.merge
  1878. */
  1879. merge<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  1880. /**
  1881. * @see _.merge
  1882. */
  1883. merge<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  1884. /**
  1885. * @see _.merge
  1886. */
  1887. merge(...otherArgs: any[]): ObjectChain<any>;
  1888. }
  1889. type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any, stack: any): any; }["bivariantHack"];
  1890. // TODO: Probably should just put all these methods on Object and forget about it.
  1891. // oh, except for Collection<any> I GUESS
  1892. interface LoDashStatic {
  1893. /**
  1894. * This method is like `_.merge` except that it accepts `customizer` which
  1895. * is invoked to produce the merged values of the destination and source
  1896. * properties. If `customizer` returns `undefined` merging is handled by the
  1897. * method instead. The `customizer` is invoked with six arguments:
  1898. * (objValue, srcValue, key, object, source, stack).
  1899. *
  1900. * @category Object
  1901. * @param object The destination object.
  1902. * @param source The source objects.
  1903. * @param customizer The function to customize assigned values.
  1904. * @returns Returns `object`.
  1905. * @example
  1906. *
  1907. * function customizer(objValue, srcValue) {
  1908. * if (_.isArray(objValue)) {
  1909. * return objValue.concat(srcValue);
  1910. * }
  1911. * }
  1912. *
  1913. * var object = {
  1914. * 'fruits': ['apple'],
  1915. * 'vegetables': ['beet']
  1916. * };
  1917. *
  1918. * var other = {
  1919. * 'fruits': ['banana'],
  1920. * 'vegetables': ['carrot']
  1921. * };
  1922. *
  1923. * _.mergeWith(object, other, customizer);
  1924. * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
  1925. */
  1926. mergeWith<TObject, TSource>(object: TObject, source: TSource, customizer: MergeWithCustomizer): TObject & TSource;
  1927. /**
  1928. * @see _.mergeWith
  1929. */
  1930. mergeWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2;
  1931. /**
  1932. * @see _.mergeWith
  1933. */
  1934. mergeWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3;
  1935. /**
  1936. * @see _.mergeWith
  1937. */
  1938. mergeWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  1939. /**
  1940. * @see _.mergeWith
  1941. */
  1942. mergeWith(object: any, ...otherArgs: any[]): any;
  1943. }
  1944. interface Object<T> {
  1945. /**
  1946. * @see _.mergeWith
  1947. */
  1948. mergeWith<TSource>(source: TSource, customizer: MergeWithCustomizer): Object<T & TSource>;
  1949. /**
  1950. * @see _.mergeWith
  1951. */
  1952. mergeWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2>;
  1953. /**
  1954. * @see _.mergeWith
  1955. */
  1956. mergeWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
  1957. /**
  1958. * @see _.mergeWith
  1959. */
  1960. mergeWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
  1961. /**
  1962. * @see _.mergeWith
  1963. */
  1964. mergeWith(...otherArgs: any[]): Object<any>;
  1965. }
  1966. interface ObjectChain<T> {
  1967. /**
  1968. * @see _.mergeWith
  1969. */
  1970. mergeWith<TSource>(source: TSource, customizer: MergeWithCustomizer): ObjectChain<T & TSource>;
  1971. /**
  1972. * @see _.mergeWith
  1973. */
  1974. mergeWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2>;
  1975. /**
  1976. * @see _.mergeWith
  1977. */
  1978. mergeWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
  1979. /**
  1980. * @see _.mergeWith
  1981. */
  1982. mergeWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
  1983. /**
  1984. * @see _.mergeWith
  1985. */
  1986. mergeWith(...otherArgs: any[]): ObjectChain<any>;
  1987. }
  1988. interface LoDashStatic {
  1989. /**
  1990. * The opposite of `_.pick`; this method creates an object composed of the
  1991. * own and inherited enumerable properties of `object` that are not omitted.
  1992. *
  1993. * @category Object
  1994. * @param object The source object.
  1995. * @param [paths] The property names to omit, specified
  1996. * individually or in arrays..
  1997. * @returns Returns the new object.
  1998. * @example
  1999. *
  2000. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  2001. *
  2002. * _.omit(object, ['a', 'c']);
  2003. * // => { 'b': '2' }
  2004. */
  2005. omit<T extends object, K extends PropertyName[]>(
  2006. object: T | null | undefined,
  2007. ...paths: K
  2008. ): Pick<T, Exclude<keyof T, K[number]>>;
  2009. /**
  2010. * @see _.omit
  2011. */
  2012. omit<T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<Many<K>>): Omit<T, K>;
  2013. /**
  2014. * @see _.omit
  2015. */
  2016. omit<T extends object>(object: T | null | undefined, ...paths: Array<Many<PropertyName>>): PartialObject<T>;
  2017. }
  2018. interface Collection<T> {
  2019. /**
  2020. * @see _.omit
  2021. */
  2022. omit(...paths: Array<Many<PropertyName>>): Collection<T>;
  2023. }
  2024. interface Object<T> {
  2025. /**
  2026. * @see _.omit
  2027. */
  2028. omit<K extends keyof T>(...paths: Array<Many<K>>): Object<Omit<T, K>>;
  2029. /**
  2030. * @see _.omit
  2031. */
  2032. omit(...paths: Array<Many<PropertyName | IterateeShorthand<T>>>): Object<PartialObject<T>>;
  2033. }
  2034. interface CollectionChain<T> {
  2035. /**
  2036. * @see _.omit
  2037. */
  2038. omit(...paths: Array<Many<PropertyName>>): CollectionChain<T>;
  2039. }
  2040. interface ObjectChain<T> {
  2041. /**
  2042. * @see _.omit
  2043. */
  2044. omit<K extends keyof T>(...paths: Array<Many<K>>): ObjectChain<Omit<T, K>>;
  2045. /**
  2046. * @see _.omit
  2047. */
  2048. omit(...paths: Array<Many<PropertyName>>): ObjectChain<PartialObject<T>>;
  2049. }
  2050. interface LoDashStatic {
  2051. /**
  2052. * The opposite of `_.pickBy`; this method creates an object composed of the
  2053. * own and inherited enumerable properties of `object` that `predicate`
  2054. * doesn't return truthy for.
  2055. *
  2056. * @category Object
  2057. * @param object The source object.
  2058. * @param [predicate=_.identity] The function invoked per property.
  2059. * @returns Returns the new object.
  2060. * @example
  2061. *
  2062. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  2063. *
  2064. * _.omitBy(object, _.isNumber);
  2065. * // => { 'b': '2' }
  2066. */
  2067. omitBy<T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
  2068. /**
  2069. * @see _.omitBy
  2070. */
  2071. omitBy<T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
  2072. /**
  2073. * @see _.omitBy
  2074. */
  2075. omitBy<T extends object>(object: T | null | undefined, predicate: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
  2076. }
  2077. interface Collection<T> {
  2078. /**
  2079. * @see _.omitBy
  2080. */
  2081. omitBy(predicate?: ValueKeyIteratee<T>): Object<Dictionary<T>>;
  2082. }
  2083. interface Object<T> {
  2084. /**
  2085. * @see _.omitBy
  2086. */
  2087. omitBy(predicate: ValueKeyIteratee<T[keyof T]>): Object<PartialObject<T>>;
  2088. }
  2089. interface CollectionChain<T> {
  2090. /**
  2091. * @see _.omitBy
  2092. */
  2093. omitBy(predicate?: ValueKeyIteratee<T>): ObjectChain<Dictionary<T>>;
  2094. }
  2095. interface ObjectChain<T> {
  2096. /**
  2097. * @see _.omitBy
  2098. */
  2099. omitBy(predicate: ValueKeyIteratee<T[keyof T]>): ObjectChain<PartialObject<T>>;
  2100. }
  2101. interface LoDashStatic {
  2102. /**
  2103. * Creates an object composed of the picked `object` properties.
  2104. *
  2105. * @category Object
  2106. * @param object The source object.
  2107. * @param [props] The property names to pick, specified
  2108. * individually or in arrays.
  2109. * @returns Returns the new object.
  2110. * @example
  2111. *
  2112. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  2113. *
  2114. * _.pick(object, ['a', 'c']);
  2115. * // => { 'a': 1, 'c': 3 }
  2116. */
  2117. pick<T extends object, U extends keyof T>(object: T, ...props: Array<Many<U>>): Pick<T, U>;
  2118. /**
  2119. * @see _.pick
  2120. */
  2121. pick<T>(object: T | null | undefined, ...props: Array<Many<PropertyPath>>): PartialObject<T>;
  2122. }
  2123. interface Object<T> {
  2124. /**
  2125. * @see _.pick
  2126. */
  2127. pick<U extends keyof T>(...props: Array<Many<U>>): Object<Pick<T, U>>;
  2128. /**
  2129. * @see _.pick
  2130. */
  2131. pick(...props: Array<Many<PropertyPath>>): Object<PartialObject<T>>;
  2132. }
  2133. interface ObjectChain<T> {
  2134. /**
  2135. * @see _.pick
  2136. */
  2137. pick<U extends keyof T>(...props: Array<Many<U>>): ObjectChain<Pick<T, U>>;
  2138. /**
  2139. * @see _.pick
  2140. */
  2141. pick(...props: Array<Many<PropertyPath>>): ObjectChain<PartialObject<T>>;
  2142. }
  2143. interface LoDashStatic {
  2144. /**
  2145. * Creates an object composed of the `object` properties `predicate` returns
  2146. * truthy for. The predicate is invoked with two arguments: (value, key).
  2147. *
  2148. * @category Object
  2149. * @param object The source object.
  2150. * @param [predicate=_.identity] The function invoked per property.
  2151. * @returns Returns the new object.
  2152. * @example
  2153. *
  2154. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  2155. *
  2156. * _.pickBy(object, _.isNumber);
  2157. * // => { 'a': 1, 'c': 3 }
  2158. */
  2159. pickBy<T, S extends T>(object: Dictionary<T> | null | undefined, predicate: ValueKeyIterateeTypeGuard<T, S>): Dictionary<S>;
  2160. /**
  2161. * @see _.pickBy
  2162. */
  2163. pickBy<T, S extends T>(object: NumericDictionary<T> | null | undefined, predicate: ValueKeyIterateeTypeGuard<T, S>): NumericDictionary<S>;
  2164. /**
  2165. * @see _.pickBy
  2166. */
  2167. pickBy<T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
  2168. /**
  2169. * @see _.pickBy
  2170. */
  2171. pickBy<T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
  2172. /**
  2173. * @see _.pickBy
  2174. */
  2175. pickBy<T extends object>(object: T | null | undefined, predicate?: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
  2176. }
  2177. interface Collection<T> {
  2178. /**
  2179. * @see _.pickBy
  2180. */
  2181. pickBy<S extends T>(predicate: ValueKeyIterateeTypeGuard<T, S>): Object<Dictionary<S>>;
  2182. /**
  2183. * @see _.pickBy
  2184. */
  2185. pickBy(predicate?: ValueKeyIteratee<T>): Object<Dictionary<T>>;
  2186. }
  2187. interface Object<T> {
  2188. /**
  2189. * @see _.pickBy
  2190. */
  2191. pickBy<S extends T[keyof T]>(predicate: ValueKeyIterateeTypeGuard<T[keyof T], S>): Object<NumericDictionary<unknown> extends T ? NumericDictionary<S> : Dictionary<S>>;
  2192. /**
  2193. * @see _.pickBy
  2194. */
  2195. pickBy(predicate?: ValueKeyIteratee<T[keyof T]>): Object<T extends Dictionary<unknown> ? Dictionary<T[keyof T]> : T extends NumericDictionary<unknown> ? NumericDictionary<T[keyof T]> : PartialObject<T>>;
  2196. }
  2197. interface CollectionChain<T> {
  2198. /**
  2199. * @see _.pickBy
  2200. */
  2201. pickBy<S extends T>(predicate: ValueKeyIterateeTypeGuard<T, S>): ObjectChain<Dictionary<S>>;
  2202. /**
  2203. * @see _.pickBy
  2204. */
  2205. pickBy(predicate?: ValueKeyIteratee<T>): ObjectChain<Dictionary<T>>;
  2206. }
  2207. interface ObjectChain<T> {
  2208. /**
  2209. * @see _.pickBy
  2210. */
  2211. pickBy<S extends T[keyof T]>(predicate: ValueKeyIterateeTypeGuard<T[keyof T], S>): ObjectChain<NumericDictionary<unknown> extends T ? NumericDictionary<S> : Dictionary<S>>;
  2212. /**
  2213. * @see _.pickBy
  2214. */
  2215. pickBy(predicate?: ValueKeyIteratee<T[keyof T]>): ObjectChain<T extends Dictionary<unknown> ? Dictionary<T[keyof T]> : T extends NumericDictionary<unknown> ? NumericDictionary<T[keyof T]> : PartialObject<T>>;
  2216. }
  2217. interface LoDashStatic {
  2218. /**
  2219. * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding
  2220. * of its parent object and its result is returned.
  2221. *
  2222. * @param object The object to query.
  2223. * @param path The path of the property to resolve.
  2224. * @param defaultValue The value returned if the resolved value is undefined.
  2225. * @return Returns the resolved value.
  2226. */
  2227. result<TResult>(object: any, path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult;
  2228. }
  2229. interface LoDashImplicitWrapper<TValue> {
  2230. /**
  2231. * @see _.result
  2232. */
  2233. result<TResult>(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult;
  2234. }
  2235. interface LoDashExplicitWrapper<TValue> {
  2236. /**
  2237. * @see _.result
  2238. */
  2239. result<TResult>(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): ExpChain<TResult>;
  2240. }
  2241. interface LoDashStatic {
  2242. /**
  2243. * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for
  2244. * missing index properties while objects are created for all other missing properties. Use _.setWith to
  2245. * customize path creation.
  2246. *
  2247. * @param object The object to modify.
  2248. * @param path The path of the property to set.
  2249. * @param value The value to set.
  2250. * @return Returns object.
  2251. */
  2252. set<T extends object>(object: T, path: PropertyPath, value: any): T;
  2253. /**
  2254. * @see _.set
  2255. */
  2256. set<TResult>(object: object, path: PropertyPath, value: any): TResult;
  2257. }
  2258. interface LoDashImplicitWrapper<TValue> {
  2259. /**
  2260. * @see _.set
  2261. */
  2262. set(path: PropertyPath, value: any): this;
  2263. /**
  2264. * @see _.set
  2265. */
  2266. set<TResult>(path: PropertyPath, value: any): ImpChain<TResult>;
  2267. }
  2268. interface LoDashExplicitWrapper<TValue> {
  2269. /**
  2270. * @see _.set
  2271. */
  2272. set(path: PropertyPath, value: any): this;
  2273. /**
  2274. * @see _.set
  2275. */
  2276. set<TResult>(path: PropertyPath, value: any): ExpChain<TResult>;
  2277. }
  2278. type SetWithCustomizer<T> = (nsValue: any, key: string, nsObject: T) => any;
  2279. interface LoDashStatic {
  2280. /**
  2281. * This method is like _.set except that it accepts customizer which is invoked to produce the objects of
  2282. * path. If customizer returns undefined path creation is handled by the method instead. The customizer is
  2283. * invoked with three arguments: (nsValue, key, nsObject).
  2284. *
  2285. * @param object The object to modify.
  2286. * @param path The path of the property to set.
  2287. * @param value The value to set.
  2288. * @param customizer The function to customize assigned values.
  2289. * @return Returns object.
  2290. */
  2291. setWith<T extends object>(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer<T>): T;
  2292. /**
  2293. * @see _.setWith
  2294. */
  2295. setWith<T extends object, TResult>(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer<T>): TResult;
  2296. }
  2297. interface LoDashImplicitWrapper<TValue> {
  2298. /**
  2299. * @see _.setWith
  2300. */
  2301. setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): this;
  2302. /**
  2303. * @see _.setWith
  2304. */
  2305. setWith<TResult>(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): ImpChain<TResult>;
  2306. }
  2307. interface LoDashExplicitWrapper<TValue> {
  2308. /**
  2309. * @see _.setWith
  2310. */
  2311. setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): this;
  2312. /**
  2313. * @see _.setWith
  2314. */
  2315. setWith<TResult>(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): ExpChain<TResult>;
  2316. }
  2317. interface LoDashStatic {
  2318. /**
  2319. * Creates an array of own enumerable key-value pairs for object.
  2320. *
  2321. * @param object The object to query.
  2322. * @return Returns the new array of key-value pairs.
  2323. */
  2324. toPairs<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
  2325. /**
  2326. * @see _.toPairs
  2327. */
  2328. toPairs(object?: object): Array<[string, any]>;
  2329. }
  2330. interface LoDashImplicitWrapper<TValue> {
  2331. /**
  2332. * @see _.toPairs
  2333. */
  2334. toPairs(): Collection<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
  2335. }
  2336. interface LoDashExplicitWrapper<TValue> {
  2337. /**
  2338. * @see _.toPairs
  2339. */
  2340. toPairs(): CollectionChain<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
  2341. }
  2342. interface LoDashStatic {
  2343. /**
  2344. * Creates an array of own and inherited enumerable key-value pairs for object.
  2345. *
  2346. * @param object The object to query.
  2347. * @return Returns the new array of key-value pairs.
  2348. */
  2349. toPairsIn<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
  2350. /**
  2351. * @see _.toPairsIn
  2352. */
  2353. toPairsIn(object?: object): Array<[string, any]>;
  2354. }
  2355. interface LoDashImplicitWrapper<TValue> {
  2356. /**
  2357. * @see _.toPairsIn
  2358. */
  2359. toPairsIn(): Collection<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
  2360. }
  2361. interface LoDashExplicitWrapper<TValue> {
  2362. /**
  2363. * @see _.toPairsIn
  2364. */
  2365. toPairsIn(): CollectionChain<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
  2366. }
  2367. interface LoDashStatic {
  2368. /**
  2369. * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of
  2370. * running each of its own enumerable properties through iteratee, with each invocation potentially mutating
  2371. * the accumulator object. The iteratee is invoked with four arguments: (accumulator,
  2372. * value, key, object). Iteratee functions may exit iteration early by explicitly returning false.
  2373. *
  2374. * @param object The object to iterate over.
  2375. * @param iteratee The function invoked per iteration.
  2376. * @param accumulator The custom accumulator value.
  2377. * @return Returns the accumulated value.
  2378. */
  2379. transform<T, TResult>(object: readonly T[], iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): TResult;
  2380. /**
  2381. * @see _.transform
  2382. */
  2383. transform<T, TResult>(object: Dictionary<T>, iteratee: MemoVoidDictionaryIterator<T, string, TResult>, accumulator?: TResult): TResult;
  2384. /**
  2385. * @see _.transform
  2386. */
  2387. transform<T extends object, TResult>(object: T, iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): TResult;
  2388. /**
  2389. * @see _.transform
  2390. */
  2391. transform(object: any[]): any[];
  2392. /**
  2393. * @see _.transform
  2394. */
  2395. transform(object: object): Dictionary<any>;
  2396. }
  2397. interface Collection<T> {
  2398. /**
  2399. * @see _.transform
  2400. */
  2401. transform<TResult>(iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): ImpChain<TResult>;
  2402. /**
  2403. * @see _.transform
  2404. */
  2405. transform(): Collection<any>;
  2406. }
  2407. interface Object<T> {
  2408. /**
  2409. * @see _.transform
  2410. */
  2411. transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], string, TResult>, accumulator?: TResult): ImpChain<TResult>;
  2412. /**
  2413. * @see _.transform
  2414. */
  2415. transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): ImpChain<TResult>;
  2416. /**
  2417. * @see _.transform
  2418. */
  2419. transform(): ImpChain<T extends Dictionary<unknown> ? Dictionary<any> : T>;
  2420. }
  2421. interface CollectionChain<T> {
  2422. /**
  2423. * @see _.transform
  2424. */
  2425. transform<TResult>(iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): ExpChain<TResult>;
  2426. /**
  2427. * @see _.transform
  2428. */
  2429. transform(): CollectionChain<any>;
  2430. }
  2431. interface ObjectChain<T> {
  2432. /**
  2433. * @see _.transform
  2434. */
  2435. transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], string, TResult>, accumulator?: TResult): ExpChain<TResult>;
  2436. /**
  2437. * @see _.transform
  2438. */
  2439. transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): ExpChain<TResult>;
  2440. /**
  2441. * @see _.transform
  2442. */
  2443. transform(): ExpChain<T extends Dictionary<unknown> ? Dictionary<any> : T>;
  2444. }
  2445. interface LoDashStatic {
  2446. /**
  2447. * Removes the property at path of object.
  2448. *
  2449. * Note: This method mutates object.
  2450. *
  2451. * @param object The object to modify.
  2452. * @param path The path of the property to unset.
  2453. * @return Returns true if the property is deleted, else false.
  2454. */
  2455. unset(object: any, path: PropertyPath): boolean;
  2456. }
  2457. interface LoDashImplicitWrapper<TValue> {
  2458. /**
  2459. * @see _.unset
  2460. */
  2461. unset(path: PropertyPath): Primitive<boolean>;
  2462. }
  2463. interface LoDashExplicitWrapper<TValue> {
  2464. /**
  2465. * @see _.unset
  2466. */
  2467. unset(path: PropertyPath): PrimitiveChain<boolean>;
  2468. }
  2469. interface LoDashStatic {
  2470. /**
  2471. * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to
  2472. * customize path creation. The updater is invoked with one argument: (value).
  2473. *
  2474. * @param object The object to modify.
  2475. * @param path The path of the property to set.
  2476. * @param updater The function to produce the updated value.
  2477. * @return Returns object.
  2478. */
  2479. update(object: object, path: PropertyPath, updater: (value: any) => any): any;
  2480. }
  2481. interface LoDashImplicitWrapper<TValue> {
  2482. /**
  2483. * @see _.update
  2484. */
  2485. update(path: PropertyPath, updater: (value: any) => any): Object<any>;
  2486. }
  2487. interface LoDashExplicitWrapper<TValue> {
  2488. /**
  2489. * @see _.update
  2490. */
  2491. update(path: PropertyPath, updater: (value: any) => any): ObjectChain<any>;
  2492. }
  2493. interface LoDashStatic {
  2494. /**
  2495. * This method is like `_.update` except that it accepts `customizer` which is
  2496. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  2497. * path creation is handled by the method instead. The `customizer` is invoked
  2498. * with three arguments: (nsValue, key, nsObject).
  2499. *
  2500. * **Note:** This method mutates `object`.
  2501. *
  2502. * @since 4.6.0
  2503. * @category Object
  2504. * @param object The object to modify.
  2505. * @param path The path of the property to set.
  2506. * @param updater The function to produce the updated value.
  2507. * @param [customizer] The function to customize assigned values.
  2508. * @returns Returns `object`.
  2509. * @example
  2510. *
  2511. * var object = {};
  2512. *
  2513. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  2514. * // => { '0': { '1': 'a' } }
  2515. */
  2516. updateWith<T extends object>(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): T;
  2517. /**
  2518. * @see _.updateWith
  2519. */
  2520. updateWith<T extends object, TResult>(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): TResult;
  2521. }
  2522. interface Object<T> {
  2523. /**
  2524. * @see _.updateWith
  2525. */
  2526. updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): this;
  2527. /**
  2528. * @see _.updateWith
  2529. */
  2530. updateWith<TResult>(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): Object<TResult>;
  2531. }
  2532. interface ObjectChain<T> {
  2533. /**
  2534. * @see _.updateWith
  2535. */
  2536. updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): this;
  2537. /**
  2538. * @see _.updateWith
  2539. */
  2540. updateWith<TResult>(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): ObjectChain<TResult>;
  2541. }
  2542. interface LoDashStatic {
  2543. /**
  2544. * Creates an array of the own enumerable property values of object.
  2545. *
  2546. * @param object The object to query.
  2547. * @return Returns an array of property values.
  2548. */
  2549. values<T>(object: Dictionary<T> | NumericDictionary<T> | List<T> | null | undefined): T[];
  2550. /**
  2551. * @see _.values
  2552. */
  2553. values<T extends object>(object: T | null | undefined): Array<T[keyof T]>;
  2554. /**
  2555. * @see _.values
  2556. */
  2557. values(object: any): any[];
  2558. }
  2559. interface String {
  2560. /**
  2561. * @see _.values
  2562. */
  2563. values(): Collection<string>;
  2564. }
  2565. interface Object<T> {
  2566. /**
  2567. * @see _.values
  2568. */
  2569. values(): Collection<T[keyof T]>;
  2570. }
  2571. interface ObjectChain<T> {
  2572. /**
  2573. * @see _.values
  2574. */
  2575. values(): CollectionChain<T[keyof T]>;
  2576. }
  2577. interface StringChain {
  2578. /**
  2579. * @see _.values
  2580. */
  2581. values(): CollectionChain<string>;
  2582. }
  2583. interface StringNullableChain {
  2584. /**
  2585. * @see _.values
  2586. */
  2587. values(): CollectionChain<string>;
  2588. }
  2589. interface LoDashStatic {
  2590. /**
  2591. * Creates an array of the own and inherited enumerable property values of object.
  2592. *
  2593. * @param object The object to query.
  2594. * @return Returns the array of property values.
  2595. */
  2596. valuesIn<T>(object: Dictionary<T> | NumericDictionary<T> | List<T> | null | undefined): T[];
  2597. /**
  2598. * @see _.valuesIn
  2599. */
  2600. valuesIn<T extends object>(object: T | null | undefined): Array<T[keyof T]>;
  2601. }
  2602. interface String {
  2603. /**
  2604. * @see _.valuesIn
  2605. */
  2606. valuesIn(): Collection<string>;
  2607. }
  2608. interface Object<T> {
  2609. /**
  2610. * @see _.valuesIn
  2611. */
  2612. valuesIn(): Collection<T[keyof T]>;
  2613. }
  2614. interface StringChain {
  2615. /**
  2616. * @see _.valuesIn
  2617. */
  2618. valuesIn(): CollectionChain<string>;
  2619. }
  2620. interface StringNullableChain {
  2621. /**
  2622. * @see _.valuesIn
  2623. */
  2624. valuesIn(): CollectionChain<string>;
  2625. }
  2626. interface ObjectChain<T> {
  2627. /**
  2628. * @see _.valuesIn
  2629. */
  2630. valuesIn(): CollectionChain<T[keyof T]>;
  2631. }
  2632. }