| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643 |
- import _ = require("../index");
- import { uniqueSymbol } from "./common";
- declare module "../index" {
- interface LoDashStatic {
- /**
- * Assigns own enumerable properties of source objects to the destination
- * object. Source objects are applied from left to right. Subsequent sources
- * overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object` and is loosely based on
- * [`Object.assign`](https://mdn.io/Object/assign).
- *
- * @category Object
- * @param object The destination object.
- * @param [sources] The source objects.
- * @returns Returns `object`.
- * @example
- *
- * function Foo() {
- * this.c = 3;
- * }
- *
- * function Bar() {
- * this.e = 5;
- * }
- *
- * Foo.prototype.d = 4;
- * Bar.prototype.f = 6;
- *
- * _.assign({ 'a': 1 }, new Foo, new Bar);
- * // => { 'a': 1, 'c': 3, 'e': 5 }
- */
- assign<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
- /**
- * @see _.assign
- */
- assign<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
- /**
- * @see _.assign
- */
- assign<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.assign
- */
- assign<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.assign
- */
- assign<TObject>(object: TObject): TObject;
- /**
- * @see _.assign
- */
- assign(object: any, ...otherArgs: any[]): any;
- }
- interface Object<T> {
- /**
- * @see _.assign
- */
- assign<TSource>(source: TSource): Object<T & TSource>;
- /**
- * @see _.assign
- */
- assign<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
- /**
- * @see _.assign
- */
- assign<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assign
- */
- assign<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assign
- */
- assign(): Object<T>;
- /**
- * @see _.assign
- */
- assign(...otherArgs: any[]): Object<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.assign
- */
- assign<TSource>(source: TSource): ObjectChain<T & TSource>;
- /**
- * @see _.assign
- */
- assign<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.assign
- */
- assign<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assign
- */
- assign<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assign
- */
- assign(): ObjectChain<T>;
- /**
- * @see _.assign
- */
- assign(...otherArgs: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * This method is like `_.assign` except that it iterates over own and
- * inherited source properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @alias extend
- * @category Object
- * @param object The destination object.
- * @param [sources] The source objects.
- * @returns Returns `object`.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * function Bar() {
- * this.d = 4;
- * }
- *
- * Foo.prototype.c = 3;
- * Bar.prototype.e = 5;
- *
- * _.assignIn({ 'a': 1 }, new Foo, new Bar);
- * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
- */
- assignIn<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
- /**
- * @see _.assignIn
- */
- assignIn<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
- /**
- * @see _.assignIn
- */
- assignIn<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.assignIn
- */
- assignIn<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.assignIn
- */
- assignIn<TObject>(object: TObject): TObject;
- /**
- * @see _.assignIn
- */
- assignIn<TResult>(object: any, ...otherArgs: any[]): TResult;
- }
- interface Object<T> {
- /**
- * @see _.assignIn
- */
- assignIn<TSource>(source: TSource): Object<T & TSource>;
- /**
- * @see _.assignIn
- */
- assignIn<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
- /**
- * @see _.assignIn
- */
- assignIn<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assignIn
- */
- assignIn<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assignIn
- */
- assignIn(): Object<T>;
- /**
- * @see _.assignIn
- */
- assignIn<TResult>(...otherArgs: any[]): Object<TResult>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.assignIn
- */
- assignIn<TSource>(source: TSource): ObjectChain<T & TSource>;
- /**
- * @see _.assignIn
- */
- assignIn<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.assignIn
- */
- assignIn<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assignIn
- */
- assignIn<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assignIn
- */
- assignIn(): ObjectChain<T>;
- /**
- * @see _.assignIn
- */
- assignIn(...otherArgs: any[]): ObjectChain<any>;
- }
- type AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any;
- interface LoDashStatic {
- /**
- * This method is like `_.assignIn` except that it accepts `customizer` which
- * is invoked to produce the assigned values. If `customizer` returns `undefined`
- * assignment is handled by the method instead. The `customizer` is invoked
- * with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @alias extendWith
- * @category Object
- * @param object The destination object.
- * @param sources The source objects.
- * @param [customizer] The function to customize assigned values.
- * @returns Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignInWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- assignInWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
- /**
- * @see _.assignInWith
- */
- assignInWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
- /**
- * @see _.assignInWith
- */
- assignInWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.assignInWith
- */
- assignInWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.assignInWith
- */
- assignInWith<TObject>(object: TObject): TObject;
- /**
- * @see _.assignInWith
- */
- assignInWith<TResult>(object: any, ...otherArgs: any[]): TResult;
- }
- interface Object<T> {
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assignInWith
- */
- assignInWith(): Object<T>;
- /**
- * @see _.assignInWith
- */
- assignInWith<TResult>(...otherArgs: any[]): Object<TResult>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assignInWith
- */
- assignInWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assignInWith
- */
- assignInWith(): ObjectChain<T>;
- /**
- * @see _.assignInWith
- */
- assignInWith(...otherArgs: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * This method is like `_.assign` except that it accepts `customizer` which
- * is invoked to produce the assigned values. If `customizer` returns `undefined`
- * assignment is handled by the method instead. The `customizer` is invoked
- * with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @category Object
- * @param object The destination object.
- * @param sources The source objects.
- * @param [customizer] The function to customize assigned values.
- * @returns Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- assignWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
- /**
- * @see _.assignWith
- */
- assignWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
- /**
- * @see _.assignWith
- */
- assignWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.assignWith
- */
- assignWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.assignWith
- */
- assignWith<TObject>(object: TObject): TObject;
- /**
- * @see _.assignWith
- */
- assignWith<TResult>(object: any, ...otherArgs: any[]): TResult;
- }
- interface Object<T> {
- /**
- * @see _.assignWith
- */
- assignWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
- /**
- * @see _.assignWith
- */
- assignWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
- /**
- * @see _.assignWith
- */
- assignWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assignWith
- */
- assignWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assignWith
- */
- assignWith(): Object<T>;
- /**
- * @see _.assignWith
- */
- assignWith<TResult>(...otherArgs: any[]): Object<TResult>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.assignWith
- */
- assignWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
- /**
- * @see _.assignWith
- */
- assignWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.assignWith
- */
- assignWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.assignWith
- */
- assignWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.assignWith
- */
- assignWith(): ObjectChain<T>;
- /**
- * @see _.assignWith
- */
- assignWith(...otherArgs: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be
- * specified as individual arguments or as arrays of keys.
- *
- * @param object The object to iterate over.
- * @param props The property names or indexes of elements to pick, specified individually or in arrays.
- * @return Returns the new array of picked elements.
- */
- at<T>(object: Dictionary<T> | NumericDictionary<T> | null | undefined, ...props: PropertyPath[]): T[];
- /**
- * @see _.at
- */
- at<T extends object>(object: T | null | undefined, ...props: Array<Many<keyof T>>): Array<T[keyof T]>;
- }
- interface Object<T> {
- /**
- * @see _.at
- */
- at(...props: Array<Many<keyof T>>): Collection<T[keyof T]>;
- }
- interface Collection<T> {
- /**
- * @see _.at
- */
- at(...props: PropertyPath[]): Collection<T>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.at
- */
- at(...props: Array<Many<keyof T>>): CollectionChain<T[keyof T]>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.at
- */
- at(...props: PropertyPath[]): CollectionChain<T>;
- }
- interface LoDashStatic {
- /**
- * Creates an object that inherits from the given prototype object. If a properties object is provided its own
- * enumerable properties are assigned to the created object.
- *
- * @param prototype The object to inherit from.
- * @param properties The properties to assign to the object.
- * @return Returns the new object.
- */
- create<T extends object, U extends object>(prototype: T, properties?: U): T & U;
- }
- interface Object<T> {
- /**
- * @see _.create
- */
- create<U extends object>(properties?: U): Object<T & U>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.create
- */
- create<U extends object>(properties?: U): ObjectChain<T & U>;
- }
- interface LoDashStatic {
- /**
- * Assigns own enumerable properties of source object(s) to the destination object for all destination
- * properties that resolve to undefined. Once a property is set, additional values of the same property are
- * ignored.
- *
- * Note: This method mutates object.
- *
- * @param object The destination object.
- * @param sources The source objects.
- * @return The destination object.
- */
- defaults<TObject, TSource>(object: TObject, source: TSource): NonNullable<TSource & TObject>;
- /**
- * @see _.defaults
- */
- defaults<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): NonNullable<TSource2 & TSource1 & TObject>;
- /**
- * @see _.defaults
- */
- defaults<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): NonNullable<TSource3 & TSource2 & TSource1 & TObject>;
- /**
- * @see _.defaults
- */
- defaults<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & TObject>;
- /**
- * @see _.defaults
- */
- defaults<TObject>(object: TObject): NonNullable<TObject>;
- /**
- * @see _.defaults
- */
- defaults(object: any, ...sources: any[]): any;
- }
- interface Object<T> {
- /**
- * @see _.defaults
- */
- defaults<TSource>(source: TSource): Object<NonNullable<TSource & T>>;
- /**
- * @see _.defaults
- */
- defaults<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<NonNullable<TSource2 & TSource1 & T>>;
- /**
- * @see _.defaults
- */
- defaults<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<NonNullable<TSource3 & TSource2 & TSource1 & T>>;
- /**
- * @see _.defaults
- */
- defaults<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & T>>;
- /**
- * @see _.defaults
- */
- defaults(): Object<NonNullable<T>>;
- /**
- * @see _.defaults
- */
- defaults(...sources: any[]): Object<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.defaults
- */
- defaults<TSource>(source: TSource): ObjectChain<NonNullable<TSource & T>>;
- /**
- * @see _.defaults
- */
- defaults<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<NonNullable<TSource2 & TSource1 & T>>;
- /**
- * @see _.defaults
- */
- defaults<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<NonNullable<TSource3 & TSource2 & TSource1 & T>>;
- /**
- * @see _.defaults
- */
- defaults<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & T>>;
- /**
- * @see _.defaults
- */
- defaults(): ObjectChain<NonNullable<T>>;
- /**
- * @see _.defaults
- */
- defaults(...sources: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * This method is like _.defaults except that it recursively assigns default properties.
- * @param object The destination object.
- * @param sources The source objects.
- * @return Returns object.
- */
- defaultsDeep(object: any, ...sources: any[]): any;
- }
- interface Object<T> {
- /**
- * @see _.defaultsDeep
- */
- defaultsDeep(...sources: any[]): Object<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.defaultsDeep
- */
- defaultsDeep(...sources: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * @see _.toPairs
- */
- entries<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
- /**
- * @see _.entries
- */
- entries(object?: object): Array<[string, any]>;
- }
- interface Object<T> {
- /**
- * @see _.entries
- */
- entries(): Collection<[string, T[keyof T]]>;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.entries
- */
- entries(): Collection<[string, any]>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.entries
- */
- entries(): CollectionChain<[string, T[keyof T]]>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.entries
- */
- entries(): CollectionChain<[string, any]>;
- }
- interface LoDashStatic {
- /**
- * @see _.entriesIn
- */
- entriesIn<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
- /**
- * @see _.entriesIn
- */
- entriesIn(object?: object): Array<[string, any]>;
- }
- interface Object<T> {
- /**
- * @see _.entriesIn
- */
- entriesIn(): Collection<[string, T[keyof T]]>;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.entriesIn
- */
- entriesIn(): Collection<[string, any]>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.entriesIn
- */
- entriesIn(): CollectionChain<[string, T[keyof T]]>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.entriesIn
- */
- entriesIn(): CollectionChain<[string, any]>;
- }
- interface LoDashStatic {
- /**
- * @see _.extend
- */
- extend<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
- /**
- * @see _.extend
- */
- extend<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
- /**
- * @see _.extend
- */
- extend<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.extend
- */
- extend<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.extend
- */
- extend<TObject>(object: TObject): TObject;
- /**
- * @see _.extend
- */
- extend<TResult>(object: any, ...otherArgs: any[]): TResult;
- }
- interface Object<T> {
- /**
- * @see _.extend
- */
- extend<TSource>(source: TSource): Object<T & TSource>;
- /**
- * @see _.extend
- */
- extend<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
- /**
- * @see _.extend
- */
- extend<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.extend
- */
- extend<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.extend
- */
- extend(): Object<T>;
- /**
- * @see _.extend
- */
- extend(...otherArgs: any[]): Object<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.extend
- */
- extend<TSource>(source: TSource): ObjectChain<T & TSource>;
- /**
- * @see _.extend
- */
- extend<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.extend
- */
- extend<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.extend
- */
- extend<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.extend
- */
- extend(): ObjectChain<T>;
- /**
- * @see _.extend
- */
- extend(...otherArgs: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * @see _.extendWith
- */
- extendWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
- /**
- * @see _.extendWith
- */
- extendWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
- /**
- * @see _.extendWith
- */
- extendWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.extendWith
- */
- extendWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.extendWith
- */
- extendWith<TObject>(object: TObject): TObject;
- /**
- * @see _.extendWith
- */
- extendWith<TResult>(object: any, ...otherArgs: any[]): TResult;
- }
- interface Object<T> {
- /**
- * @see _.extendWith
- */
- extendWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
- /**
- * @see _.extendWith
- */
- extendWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
- /**
- * @see _.extendWith
- */
- extendWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.extendWith
- */
- extendWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.extendWith
- */
- extendWith(): Object<T>;
- /**
- * @see _.extendWith
- */
- extendWith(...otherArgs: any[]): Object<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.extendWith
- */
- extendWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
- /**
- * @see _.extendWith
- */
- extendWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.extendWith
- */
- extendWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.extendWith
- */
- extendWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.extendWith
- */
- extendWith(): ObjectChain<T>;
- /**
- * @see _.extendWith
- */
- extendWith(...otherArgs: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * This method is like _.find except that it returns the key of the first element predicate returns truthy for
- * instead of the element itself.
- *
- * @param object The object to search.
- * @param predicate The function invoked per iteration.
- * @return Returns the key of the matched element, else undefined.
- */
- findKey<T>(object: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.findKey
- */
- findKey(predicate?: ObjectIteratee<TValue>): string | undefined;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.findKey
- */
- findKey(predicate?: ObjectIteratee<TValue>): StringNullableChain;
- }
- interface LoDashStatic {
- /**
- * This method is like _.findKey except that it iterates over elements of a collection in the opposite order.
- *
- * @param object The object to search.
- * @param predicate The function invoked per iteration.
- * @return Returns the key of the matched element, else undefined.
- */
- findLastKey<T>(object: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.findLastKey
- */
- findLastKey(predicate?: ObjectIteratee<TValue>): string | undefined;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.findLastKey
- */
- findLastKey(predicate?: ObjectIteratee<TValue>): StringNullableChain;
- }
- interface LoDashStatic {
- /**
- * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The
- * iteratee is invoked with three arguments: (value, key, object). Iteratee functions may
- * exit iteration early by explicitly returning false.
- *
- * @param object The object to iterate over.
- * @param iteratee The function invoked per iteration.
- * @return Returns object.
- */
- forIn<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
- /**
- * @see _.forIn
- */
- forIn<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.forIn
- */
- forIn(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.forIn
- */
- forIn(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashStatic {
- /**
- * This method is like _.forIn except that it iterates over properties of object in the opposite order.
- *
- * @param object The object to iterate over.
- * @param iteratee The function invoked per iteration.
- * @return Returns object.
- */
- forInRight<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
- /**
- * @see _.forInRight
- */
- forInRight<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.forInRight
- */
- forInRight(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.forInRight
- */
- forInRight(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashStatic {
- /**
- * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is
- * invoked with three arguments: (value, key, object). Iteratee functions may exit
- * iteration early by explicitly returning false.
- *
- * @param object The object to iterate over.
- * @param iteratee The function invoked per iteration.
- * @return Returns object.
- */
- forOwn<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
- /**
- * @see _.forOwn
- */
- forOwn<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.forOwn
- */
- forOwn(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.forOwn
- */
- forOwn(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashStatic {
- /**
- * This method is like _.forOwn except that it iterates over properties of object in the opposite order.
- *
- * @param object The object to iterate over.
- * @param iteratee The function invoked per iteration.
- * @return Returns object.
- */
- forOwnRight<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
- /**
- * @see _.forOwnRight
- */
- forOwnRight<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.forOwnRight
- */
- forOwnRight(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.forOwnRight
- */
- forOwnRight(iteratee?: ObjectIterator<TValue, any>): this;
- }
- interface LoDashStatic {
- /**
- * Creates an array of function property names from own enumerable properties
- * of `object`.
- *
- * @category Object
- * @param object The object to inspect.
- * @returns Returns the new array of property names.
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functions(new Foo);
- * // => ['a', 'b']
- */
- functions(object: any): string[];
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.functions
- */
- functions(): Collection<string>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.functions
- */
- functions(): CollectionChain<string>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of function property names from own and inherited
- * enumerable properties of `object`.
- *
- * @category Object
- * @param object The object to inspect.
- * @returns Returns the new array of property names.
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functionsIn(new Foo);
- * // => ['a', 'b', 'c']
- */
- functionsIn<T extends {}>(object: any): string[];
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.functionsIn
- */
- functionsIn(): Collection<string>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.functionsIn
- */
- functionsIn(): CollectionChain<string>;
- }
- type GetFieldTypeOfArrayLikeByKey<T extends unknown[], K> =
- K extends number ? T[K]
- : K extends `${infer N extends number}` ? T[N]
- : K extends keyof T ? T[K] : undefined;
- type GetFieldTypeOfStringByKey<T extends string, K> =
- K extends number ? T[K]
- : K extends `${infer N extends number}` ? T[N]
- : K extends keyof T ? T[K]
- : undefined;
- type GetFieldTypeOfNarrowedByKey<T, K> =
- T extends unknown[] ? GetFieldTypeOfArrayLikeByKey<T, K>
- : T extends string ? GetFieldTypeOfStringByKey<T, K>
- : K extends keyof T ? T[K]
- : K extends number
- ? `${K}` extends keyof T ? T[`${K}`] : undefined
- : K extends `${infer N extends number}`
- ? N extends keyof T ? T[N] : undefined
- : undefined;
- /** Internal. Assumes P is a dot-delimited path. */
- type GetFieldTypeOfNarrowedByDotPath<T, P> =
- P extends `${infer L}.${infer R}`
- ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, L>, R, 'DotPath'>
- : GetFieldTypeOfNarrowedByKey<T, P>;
- /** Internal. This is a piece of GetFieldTypeOfNarrowedByLKR logic,
- * assuming that Lc isn't to be ignored, and does not end with dot. */
- type GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R> =
- '' extends R
- ? GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>
- : R extends `.${infer Rc}`
- ? GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, Rc>
- : GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, R>
- /** Internal. Assumes T has been narrowed; L is a dot-delimited path,
- * and should be ignored if an empty string; K is a key name; and R is
- * a dot-delimetered path, to be ignored if an empty string. Also if
- * L has a tail dot, or R has a front dot, these dots should be discarded,
- * however when L or R is just a dot, they should be interpreted as empty
- * key name (rather than ignored). */
- type GetFieldTypeOfNarrowedByLKR<T, L, K, R> =
- '' extends L
- ? '' extends R
- ? GetFieldTypeOfNarrowedByKey<T, K>
- : R extends `.${infer Rc}`
- ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, Rc>
- : GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, R>
- : L extends `${infer Lc}.`
- ? GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R>
- : GetFieldTypeOfNarrowedByLcKR<T, L, K, R>
- /** Internal. Assumes T has been narrowed. */
- type GetFieldTypeOfNarrowed<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
- XT extends 'Key' ? GetFieldTypeOfNarrowedByKey<T, X>
- : XT extends 'DotPath' ? GetFieldTypeOfNarrowedByDotPath<T, X>
- : X extends `${infer L}['${infer K}']${infer R}`
- ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
- : X extends `${infer L}["${infer K}"]${infer R}`
- ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
- : X extends `${infer L}[${infer K}]${infer R}`
- ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
- : GetFieldTypeOfNarrowedByDotPath<T, X>;
- /** Internal. Assumes T has been narrowed to an object type. */
- type GetFieldTypeOfObject<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
- Extract<T, unknown[]> extends never
- ? GetFieldTypeOfNarrowed<T, X, XT>
- : GetFieldTypeOfNarrowed<Exclude<T, unknown[]>, X, XT>
- | GetFieldTypeOfNarrowed<Extract<T, unknown[]>, X, XT>;
- /** Internal. Assumes T has been narrowed to a primitive type. */
- type GetFieldTypeOfPrimitive<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
- Extract<T, string> extends never
- ? T extends never ? never : undefined
- : (Exclude<T, string> extends never ? never : undefined)
- | GetFieldTypeOfNarrowed<Extract<T, string>, X, XT>;
- /**
- * Deduces the type of value at the path P of type T,
- * so that _.get<T, P>(t: T, p: P): GetFieldType<T, P>.
- * XT specifies the exact meaning of X:
- * - 'Path' (default) - X is a path type to be fully parsed;
- * - 'DotPath - X is a dot-delimitered path, without square (indexing) brackets;
- * - 'Key' - X is a simple key, and needs no parsing.
- */
- type GetFieldType<T, X, XT extends 'DotPath' | 'Key' | 'Path' = 'Path'> =
- Extract<T, object> extends never
- ? GetFieldTypeOfPrimitive<T, X, XT>
- : GetFieldTypeOfPrimitive<Exclude<T, object>, X, XT>
- | GetFieldTypeOfObject<Extract<T, object>, X, XT>;
- interface LoDashStatic {
- /**
- * Gets the property value at path of object. If the resolved value is undefined the defaultValue is used
- * in its place.
- *
- * @param object The object to query.
- * @param path The path of the property to get.
- * @param defaultValue The value returned if the resolved value is undefined.
- * @return Returns the resolved value.
- */
- get<TObject extends object, TKey extends keyof TObject>(object: TObject, path: TKey | [TKey]): TObject[TKey];
- /**
- * @see _.get
- */
- get<TObject extends object, TKey extends keyof TObject>(object: TObject | null | undefined, path: TKey | [TKey]): TObject[TKey] | undefined;
- /**
- * @see _.get
- */
- get<TObject extends object, TKey extends keyof TObject, TDefault>(object: TObject | null | undefined, path: TKey | [TKey], defaultValue: TDefault): Exclude<TObject[TKey], undefined> | TDefault;
- /**
- * @see _.get
- */
- get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1]>(object: TObject, path: [TKey1, TKey2]): TObject[TKey1][TKey2];
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- 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];
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- 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];
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- get<T>(object: NumericDictionary<T>, path: number): T;
- /**
- * @see _.get
- */
- get<T>(object: NumericDictionary<T> | null | undefined, path: number): T | undefined;
- /**
- * @see _.get
- */
- get<T, TDefault>(object: NumericDictionary<T> | null | undefined, path: number, defaultValue: TDefault): T | TDefault;
- /**
- * @see _.get
- */
- get<TDefault>(object: null | undefined, path: PropertyPath, defaultValue: TDefault): TDefault;
- /**
- * @see _.get
- */
- get(object: null | undefined, path: PropertyPath): undefined;
- /**
- * @see _.get
- */
- get<TObject, TPath extends string>(data: TObject, path: TPath): string extends TPath ? any : GetFieldType<TObject, TPath>;
- /**
- * @see _.get
- */
- get<TObject, TPath extends string, TDefault = GetFieldType<TObject, TPath>>(data: TObject, path: TPath, defaultValue: TDefault): Exclude<GetFieldType<TObject, TPath>, null | undefined> | TDefault;
- /**
- * @see _.get
- */
- get(object: any, path: PropertyPath, defaultValue?: any): any;
- }
- interface String {
- /**
- * @see _.get
- */
- get(path: number | number[]): string;
- /**
- * @see _.get
- */
- get(path: number | number[], defaultValue: string): string;
- }
- interface Object<T> {
- /**
- * @see _.get
- */
- get<TKey extends keyof T>(path: TKey | [TKey]): T[TKey];
- /**
- * @see _.get
- */
- get<TKey extends keyof T, TDefault>(path: TKey | [TKey], defaultValue: TDefault): Exclude<T[TKey], undefined> | TDefault;
- /**
- * @see _.get
- */
- get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2]): T[TKey1][TKey2];
- /**
- * @see _.get
- */
- get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TDefault>(path: [TKey1, TKey2], defaultValue: TDefault): Exclude<T[TKey1][TKey2], undefined> | TDefault;
- /**
- * @see _.get
- */
- get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2]>(path: [TKey1, TKey2, TKey3]): T[TKey1][TKey2][TKey3];
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- 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];
- /**
- * @see _.get
- */
- 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;
- /**
- * @see _.get
- */
- get<TPath extends string>(path: TPath): string extends TPath ? any : GetFieldType<T, TPath>;
- /**
- * @see _.get
- */
- get<TPath extends string, TDefault = GetFieldType<T, TPath>>(path: TPath, defaultValue: TDefault): Exclude<GetFieldType<T, TPath>, null | undefined> | TDefault;
- /**
- * @see _.get
- */
- get(path: PropertyPath, defaultValue?: any): any;
- }
- interface Collection<T> {
- /**
- * @see _.get
- */
- get(path: number): T;
- /**
- * @see _.get
- */
- get<TDefault>(path: number, defaultValue: TDefault): T | TDefault;
- }
- interface StringChain {
- /**
- * @see _.get
- */
- get(path: number | number[]): StringChain;
- /**
- * @see _.get
- */
- get(path: number | number[], defaultValue: string): StringChain;
- }
- interface StringNullableChain {
- /**
- * @see _.get
- */
- get(path: number | number[]): StringNullableChain;
- /**
- * @see _.get
- */
- get(path: number | number[], defaultValue: string): StringChain;
- }
- interface ObjectChain<T> {
- /**
- * @see _.get
- */
- get<TKey extends keyof T>(path: TKey | [TKey]): ExpChain<T[TKey]>;
- /**
- * @see _.get
- */
- 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[]>;
- /**
- * @see _.get
- */
- get<TKey extends keyof T, TDefault>(path: TKey | [TKey], defaultValue: TDefault): ExpChain<Exclude<T[TKey], undefined> | TDefault>;
- /**
- * @see _.get
- */
- get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2]): ExpChain<T[TKey1][TKey2]>;
- /**
- * @see _.get
- */
- 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[]>;
- /**
- * @see _.get
- */
- get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TDefault>(path: [TKey1, TKey2], defaultValue: TDefault): ExpChain<Exclude<T[TKey1][TKey2], undefined> | TDefault>;
- /**
- * @see _.get
- */
- 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]>;
- /**
- * @see _.get
- */
- 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[]>;
- /**
- * @see _.get
- */
- 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>;
- /**
- * @see _.get
- */
- 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]>;
- /**
- * @see _.get
- */
- 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[]>;
- /**
- * @see _.get
- */
- 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>;
- /**
- * @see _.get
- */
- get<TPath extends string>(path: TPath): string extends TPath ? LoDashExplicitWrapper<any> : ExpChain<GetFieldType<T, TPath>>;
- /**
- * @see _.get
- */
- get<TPath extends string, TDefault = GetFieldType<T, TPath>>(path: TPath, defaultValue: TDefault): ExpChain<Exclude<GetFieldType<T, TPath>, null | undefined> | TDefault>;
- /**
- * @see _.get
- */
- get(path: PropertyPath, defaultValue?: any): LoDashExplicitWrapper<any>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.get
- */
- get(path: number): ExpChain<T>;
- /**
- * @see _.get
- */
- get<TDefault>(path: number, defaultValue: TDefault): ExpChain<T | TDefault>;
- }
- interface LoDashStatic {
- /**
- * Checks if `path` is a direct property of `object`.
- *
- * @category Object
- * @param object The object to query.
- * @param path The path to check.
- * @returns Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': { 'c': 3 } } };
- * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b.c');
- * // => true
- *
- * _.has(object, ['a', 'b', 'c']);
- * // => true
- *
- * _.has(other, 'a');
- * // => false
- */
- 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};
- has<T>(object: T, path: PropertyPath): boolean;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.has
- */
- has(path: PropertyPath): boolean;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.has
- */
- has(path: PropertyPath): PrimitiveChain<boolean>;
- }
- interface LoDashStatic {
- /**
- * Checks if `path` is a direct or inherited property of `object`.
- *
- * @category Object
- * @param object The object to query.
- * @param path The path to check.
- * @returns Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
- *
- * _.hasIn(object, 'a');
- * // => true
- *
- * _.hasIn(object, 'a.b.c');
- * // => true
- *
- * _.hasIn(object, ['a', 'b', 'c']);
- * // => true
- *
- * _.hasIn(object, 'b');
- * // => false
- */
- hasIn<T>(object: T, path: PropertyPath): boolean;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.hasIn
- */
- hasIn(path: PropertyPath): boolean;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.hasIn
- */
- hasIn(path: PropertyPath): PrimitiveChain<boolean>;
- }
- interface LoDashStatic {
- /**
- * Creates an object composed of the inverted keys and values of object. If object contains duplicate values,
- * subsequent values overwrite property assignments of previous values unless multiValue is true.
- *
- * @param object The object to invert.
- * @param multiValue Allow multiple values per key.
- * @return Returns the new inverted object.
- */
- invert(object: object): Dictionary<string>;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.invert
- */
- invert(): Object<Dictionary<string>>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.invert
- */
- invert(): ObjectChain<Dictionary<string>>;
- }
- interface LoDashStatic {
- /**
- * This method is like _.invert except that the inverted object is generated from the results of running each
- * element of object through iteratee. The corresponding inverted value of each inverted key is an array of
- * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value).
- *
- * @param object The object to invert.
- * @param interatee The iteratee invoked per element.
- * @return Returns the new inverted object.
- */
- invertBy<T>(object: Dictionary<T> | NumericDictionary<T> | null | undefined, interatee?: ValueIteratee<T>): Dictionary<string[]>;
- /**
- * @see _.invertBy
- */
- invertBy<T extends object>(object: T | null | undefined, interatee?: ValueIteratee<T[keyof T]>): Dictionary<string[]>;
- }
- interface String {
- /**
- * @see _.invertBy
- */
- invertBy(iteratee?: ValueIteratee<string>): Object<Dictionary<string[]>>;
- }
- interface Collection<T> {
- /**
- * @see _.invertBy
- */
- invertBy(iteratee?: ValueIteratee<T>): Object<Dictionary<string[]>>;
- }
- interface Object<T> {
- /**
- * @see _.invertBy
- */
- invertBy(iteratee?: ValueIteratee<T[keyof T]>): Object<Dictionary<string[]>>;
- }
- interface StringChain {
- /**
- * @see _.invertBy
- */
- invertBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
- }
- interface StringNullableChain {
- /**
- * @see _.invertBy
- */
- invertBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.invertBy
- */
- invertBy(iteratee?: ValueIteratee<T>): ObjectChain<Dictionary<string[]>>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.invertBy
- */
- invertBy(iteratee?: ValueIteratee<T[keyof T]>): ObjectChain<Dictionary<string[]>>;
- }
- interface LoDashStatic {
- /**
- * Invokes the method at path of object.
- * @param object The object to query.
- * @param path The path of the method to invoke.
- * @param args The arguments to invoke the method with.
- */
- invoke(object: any, path: PropertyPath, ...args: any[]): any;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.invoke
- */
- invoke(path: PropertyPath, ...args: any[]): any;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.invoke
- */
- invoke(path: PropertyPath, ...args: any[]): LoDashExplicitWrapper<any>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of the own enumerable property names of object.
- *
- * Note: Non-object values are coerced to objects. See the ES spec for more details.
- *
- * @param object The object to query.
- * @return Returns the array of property names.
- */
- keys(object?: any): string[];
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.keys
- */
- keys(): Collection<string>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.keys
- */
- keys(): CollectionChain<string>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of the own and inherited enumerable property names of object.
- *
- * Note: Non-object values are coerced to objects.
- *
- * @param object The object to query.
- * @return An array of property names.
- */
- keysIn(object?: any): string[];
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.keysIn
- */
- keysIn(): Collection<string>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.keysIn
- */
- keysIn(): CollectionChain<string>;
- }
- interface LoDashStatic {
- /**
- * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated
- * by running each own enumerable property of object through iteratee.
- *
- * @param object The object to iterate over.
- * @param iteratee The function invoked per iteration.
- * @return Returns the new mapped object.
- */
- mapKeys<T>(object: List<T> | null | undefined, iteratee?: ListIteratee<T>): Dictionary<T>;
- /**
- * @see _.mapKeys
- */
- mapKeys<T extends object>(object: T | null | undefined, iteratee?: ObjectIteratee<T>): Dictionary<T[keyof T]>;
- }
- interface Collection<T> {
- /**
- * @see _.mapKeys
- */
- mapKeys(iteratee?: ListIteratee<T>): Object<Dictionary<T>>;
- }
- interface Object<T> {
- /**
- * @see _.mapKeys
- */
- mapKeys(iteratee?: ObjectIteratee<T>): Object<Dictionary<T[keyof T]>>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.mapKeys
- */
- mapKeys(iteratee?: ListIteratee<T>): ObjectChain<Dictionary<T>>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.mapKeys
- */
- mapKeys(iteratee?: ObjectIteratee<T>): ObjectChain<Dictionary<T[keyof T]>>;
- }
- interface LoDashStatic {
- /**
- * Creates an object with the same keys as object and values generated by running each own
- * enumerable property of object through iteratee. The iteratee function is
- * invoked with three arguments: (value, key, object).
- *
- * @param object The object to iterate over.
- * @param iteratee The function invoked per iteration.
- * @return Returns the new mapped object.
- */
- mapValues<TResult>(obj: string | null | undefined, callback: StringIterator<TResult>): NumericDictionary<TResult>;
- /**
- * @see _.mapValues
- */
- mapValues<T, TResult>(array: T[], callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
- /**
- * @see _.mapValues
- */
- mapValues<T extends object, TResult>(obj: T | null | undefined, callback: ObjectIterator<T, TResult>): { [P in keyof T]: TResult };
- /**
- * @see _.mapValues
- */
- mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: object): Dictionary<boolean>;
- /**
- * @see _.mapValues
- */
- mapValues<T extends object>(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean };
- /**
- * @see _.mapValues
- */
- mapValues<T, TKey extends keyof T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: TKey): Dictionary<T[TKey]>;
- /**
- * @see _.mapValues
- */
- mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: string): Dictionary<any>;
- /**
- * @see _.mapValues
- */
- mapValues<T extends object>(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any };
- /**
- * @see _.mapValues
- */
- mapValues(obj: string | null | undefined): NumericDictionary<string>;
- /**
- * @see _.mapValues
- */
- mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined): Dictionary<T>;
- /**
- * @see _.mapValues
- */
- mapValues<T extends object>(obj: T): T;
- /**
- * @see _.mapValues
- */
- mapValues<T extends object>(obj: T | null | undefined): PartialObject<T>;
- }
- interface String {
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: StringIterator<TResult>): Object<NumericDictionary<TResult>>;
- /**
- * @see _.mapValues
- */
- mapValues(): Object<NumericDictionary<string>>;
- }
- interface Collection<T> {
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
- /**
- * @see _.mapValues
- */
- mapValues<TKey extends keyof T>(iteratee: TKey): Object<Dictionary<T[TKey]>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: object): Object<Dictionary<boolean>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: string): Object<Dictionary<any>>;
- /**
- * @see _.mapValues
- */
- mapValues(): Object<Dictionary<T>>;
- }
- interface Object<T> {
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: ObjectIterator<T, TResult>): Object<{ [P in keyof T]: TResult }>;
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: DictionaryIterator<T[keyof T], TResult>): Object<Dictionary<TResult>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: object): Object<{ [P in keyof T]: boolean }>;
- /**
- * @see _.mapValues
- */
- mapValues<TKey extends keyof T[keyof T]>(iteratee: TKey): Object<Dictionary<T[keyof T][TKey]>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: string): Object<{ [P in keyof T]: any }>;
- /**
- * @see _.mapValues
- */
- mapValues(): Object<T>;
- }
- interface StringChain {
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: StringIterator<TResult>): ObjectChain<NumericDictionary<TResult>>;
- /**
- * @see _.mapValues
- */
- mapValues(): ObjectChain<NumericDictionary<string>>;
- }
- interface StringNullableChain {
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: StringIterator<TResult>): ObjectChain<NumericDictionary<TResult>>;
- /**
- * @see _.mapValues
- */
- mapValues(): ObjectChain<NumericDictionary<string>>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: ArrayIterator<T, TResult>): ObjectChain<NumericDictionary<TResult>>;
- /**
- * @see _.mapValues
- */
- mapValues<TKey extends keyof T>(iteratee: TKey): ObjectChain<Dictionary<T[TKey]>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: object): ObjectChain<Dictionary<boolean>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: string): ObjectChain<Dictionary<any>>;
- /**
- * @see _.mapValues
- */
- mapValues(): ObjectChain<Dictionary<T>>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: ObjectIterator<T, TResult>): ObjectChain<{ [P in keyof T]: TResult }>;
- /**
- * @see _.mapValues
- */
- mapValues<TResult>(callback: DictionaryIterator<T[keyof T], TResult>): ObjectChain<Dictionary<TResult>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: object): ObjectChain<{ [P in keyof T]: boolean }>;
- /**
- * @see _.mapValues
- */
- mapValues<TKey extends keyof T[keyof T]>(iteratee: TKey): ObjectChain<Dictionary<T[keyof T][TKey]>>;
- /**
- * @see _.mapValues
- */
- mapValues(iteratee: string): ObjectChain<{ [P in keyof T]: any }>;
- /**
- * @see _.mapValues
- */
- mapValues(): ObjectChain<T>;
- }
- interface LoDashStatic {
- /**
- * Recursively merges own and inherited enumerable properties of source
- * objects into the destination object, skipping source properties that resolve
- * to `undefined`. Array and plain object properties are merged recursively.
- * Other objects and value types are overridden by assignment. Source objects
- * are applied from left to right. Subsequent sources overwrite property
- * assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @category Object
- * @param object The destination object.
- * @param [source] The source objects.
- * @returns Returns `object`.
- * @example
- *
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
- *
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
- *
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
- */
- merge<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
- /**
- * @see _.merge
- */
- merge<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
- /**
- * @see _.merge
- */
- merge<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.merge
- */
- merge<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.merge
- */
- merge(object: any, ...otherArgs: any[]): any;
- }
- interface Object<T> {
- /**
- * @see _.merge
- */
- merge<TSource>(source: TSource): Object<T & TSource>;
- /**
- * @see _.merge
- */
- merge<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
- /**
- * @see _.merge
- */
- merge<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.merge
- */
- merge<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.merge
- */
- merge(...otherArgs: any[]): Object<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.merge
- */
- merge<TSource>(source: TSource): ObjectChain<T & TSource>;
- /**
- * @see _.merge
- */
- merge<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.merge
- */
- merge<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.merge
- */
- merge<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.merge
- */
- merge(...otherArgs: any[]): ObjectChain<any>;
- }
- type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any, stack: any): any; }["bivariantHack"];
- // TODO: Probably should just put all these methods on Object and forget about it.
- // oh, except for Collection<any> I GUESS
- interface LoDashStatic {
- /**
- * This method is like `_.merge` except that it accepts `customizer` which
- * is invoked to produce the merged values of the destination and source
- * properties. If `customizer` returns `undefined` merging is handled by the
- * method instead. The `customizer` is invoked with six arguments:
- * (objValue, srcValue, key, object, source, stack).
- *
- * @category Object
- * @param object The destination object.
- * @param source The source objects.
- * @param customizer The function to customize assigned values.
- * @returns Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * if (_.isArray(objValue)) {
- * return objValue.concat(srcValue);
- * }
- * }
- *
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
- *
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
- *
- * _.mergeWith(object, other, customizer);
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
- */
- mergeWith<TObject, TSource>(object: TObject, source: TSource, customizer: MergeWithCustomizer): TObject & TSource;
- /**
- * @see _.mergeWith
- */
- mergeWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2;
- /**
- * @see _.mergeWith
- */
- mergeWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3;
- /**
- * @see _.mergeWith
- */
- mergeWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
- /**
- * @see _.mergeWith
- */
- mergeWith(object: any, ...otherArgs: any[]): any;
- }
- interface Object<T> {
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource>(source: TSource, customizer: MergeWithCustomizer): Object<T & TSource>;
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2>;
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.mergeWith
- */
- mergeWith(...otherArgs: any[]): Object<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource>(source: TSource, customizer: MergeWithCustomizer): ObjectChain<T & TSource>;
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2>;
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
- /**
- * @see _.mergeWith
- */
- mergeWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
- /**
- * @see _.mergeWith
- */
- mergeWith(...otherArgs: any[]): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable properties of `object` that are not omitted.
- *
- * @category Object
- * @param object The source object.
- * @param [paths] The property names to omit, specified
- * individually or in arrays..
- * @returns Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omit(object, ['a', 'c']);
- * // => { 'b': '2' }
- */
- omit<T extends object, K extends PropertyName[]>(
- object: T | null | undefined,
- ...paths: K
- ): Pick<T, Exclude<keyof T, K[number]>>;
- /**
- * @see _.omit
- */
- omit<T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<Many<K>>): Omit<T, K>;
- /**
- * @see _.omit
- */
- omit<T extends object>(object: T | null | undefined, ...paths: Array<Many<PropertyName>>): PartialObject<T>;
- }
- interface Collection<T> {
- /**
- * @see _.omit
- */
- omit(...paths: Array<Many<PropertyName>>): Collection<T>;
- }
- interface Object<T> {
- /**
- * @see _.omit
- */
- omit<K extends keyof T>(...paths: Array<Many<K>>): Object<Omit<T, K>>;
- /**
- * @see _.omit
- */
- omit(...paths: Array<Many<PropertyName | IterateeShorthand<T>>>): Object<PartialObject<T>>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.omit
- */
- omit(...paths: Array<Many<PropertyName>>): CollectionChain<T>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.omit
- */
- omit<K extends keyof T>(...paths: Array<Many<K>>): ObjectChain<Omit<T, K>>;
- /**
- * @see _.omit
- */
- omit(...paths: Array<Many<PropertyName>>): ObjectChain<PartialObject<T>>;
- }
- interface LoDashStatic {
- /**
- * The opposite of `_.pickBy`; this method creates an object composed of the
- * own and inherited enumerable properties of `object` that `predicate`
- * doesn't return truthy for.
- *
- * @category Object
- * @param object The source object.
- * @param [predicate=_.identity] The function invoked per property.
- * @returns Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omitBy(object, _.isNumber);
- * // => { 'b': '2' }
- */
- omitBy<T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
- /**
- * @see _.omitBy
- */
- omitBy<T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
- /**
- * @see _.omitBy
- */
- omitBy<T extends object>(object: T | null | undefined, predicate: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
- }
- interface Collection<T> {
- /**
- * @see _.omitBy
- */
- omitBy(predicate?: ValueKeyIteratee<T>): Object<Dictionary<T>>;
- }
- interface Object<T> {
- /**
- * @see _.omitBy
- */
- omitBy(predicate: ValueKeyIteratee<T[keyof T]>): Object<PartialObject<T>>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.omitBy
- */
- omitBy(predicate?: ValueKeyIteratee<T>): ObjectChain<Dictionary<T>>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.omitBy
- */
- omitBy(predicate: ValueKeyIteratee<T[keyof T]>): ObjectChain<PartialObject<T>>;
- }
- interface LoDashStatic {
- /**
- * Creates an object composed of the picked `object` properties.
- *
- * @category Object
- * @param object The source object.
- * @param [props] The property names to pick, specified
- * individually or in arrays.
- * @returns Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pick(object, ['a', 'c']);
- * // => { 'a': 1, 'c': 3 }
- */
- pick<T extends object, U extends keyof T>(object: T, ...props: Array<Many<U>>): Pick<T, U>;
- /**
- * @see _.pick
- */
- pick<T>(object: T | null | undefined, ...props: Array<Many<PropertyPath>>): PartialObject<T>;
- }
- interface Object<T> {
- /**
- * @see _.pick
- */
- pick<U extends keyof T>(...props: Array<Many<U>>): Object<Pick<T, U>>;
- /**
- * @see _.pick
- */
- pick(...props: Array<Many<PropertyPath>>): Object<PartialObject<T>>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.pick
- */
- pick<U extends keyof T>(...props: Array<Many<U>>): ObjectChain<Pick<T, U>>;
- /**
- * @see _.pick
- */
- pick(...props: Array<Many<PropertyPath>>): ObjectChain<PartialObject<T>>;
- }
- interface LoDashStatic {
- /**
- * Creates an object composed of the `object` properties `predicate` returns
- * truthy for. The predicate is invoked with two arguments: (value, key).
- *
- * @category Object
- * @param object The source object.
- * @param [predicate=_.identity] The function invoked per property.
- * @returns Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pickBy(object, _.isNumber);
- * // => { 'a': 1, 'c': 3 }
- */
- pickBy<T, S extends T>(object: Dictionary<T> | null | undefined, predicate: ValueKeyIterateeTypeGuard<T, S>): Dictionary<S>;
- /**
- * @see _.pickBy
- */
- pickBy<T, S extends T>(object: NumericDictionary<T> | null | undefined, predicate: ValueKeyIterateeTypeGuard<T, S>): NumericDictionary<S>;
- /**
- * @see _.pickBy
- */
- pickBy<T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
- /**
- * @see _.pickBy
- */
- pickBy<T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
- /**
- * @see _.pickBy
- */
- pickBy<T extends object>(object: T | null | undefined, predicate?: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
- }
- interface Collection<T> {
- /**
- * @see _.pickBy
- */
- pickBy<S extends T>(predicate: ValueKeyIterateeTypeGuard<T, S>): Object<Dictionary<S>>;
- /**
- * @see _.pickBy
- */
- pickBy(predicate?: ValueKeyIteratee<T>): Object<Dictionary<T>>;
- }
- interface Object<T> {
- /**
- * @see _.pickBy
- */
- pickBy<S extends T[keyof T]>(predicate: ValueKeyIterateeTypeGuard<T[keyof T], S>): Object<NumericDictionary<unknown> extends T ? NumericDictionary<S> : Dictionary<S>>;
- /**
- * @see _.pickBy
- */
- 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>>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.pickBy
- */
- pickBy<S extends T>(predicate: ValueKeyIterateeTypeGuard<T, S>): ObjectChain<Dictionary<S>>;
- /**
- * @see _.pickBy
- */
- pickBy(predicate?: ValueKeyIteratee<T>): ObjectChain<Dictionary<T>>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.pickBy
- */
- pickBy<S extends T[keyof T]>(predicate: ValueKeyIterateeTypeGuard<T[keyof T], S>): ObjectChain<NumericDictionary<unknown> extends T ? NumericDictionary<S> : Dictionary<S>>;
- /**
- * @see _.pickBy
- */
- 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>>;
- }
- interface LoDashStatic {
- /**
- * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding
- * of its parent object and its result is returned.
- *
- * @param object The object to query.
- * @param path The path of the property to resolve.
- * @param defaultValue The value returned if the resolved value is undefined.
- * @return Returns the resolved value.
- */
- result<TResult>(object: any, path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.result
- */
- result<TResult>(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.result
- */
- result<TResult>(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): ExpChain<TResult>;
- }
- interface LoDashStatic {
- /**
- * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for
- * missing index properties while objects are created for all other missing properties. Use _.setWith to
- * customize path creation.
- *
- * @param object The object to modify.
- * @param path The path of the property to set.
- * @param value The value to set.
- * @return Returns object.
- */
- set<T extends object>(object: T, path: PropertyPath, value: any): T;
- /**
- * @see _.set
- */
- set<TResult>(object: object, path: PropertyPath, value: any): TResult;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.set
- */
- set(path: PropertyPath, value: any): this;
- /**
- * @see _.set
- */
- set<TResult>(path: PropertyPath, value: any): ImpChain<TResult>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.set
- */
- set(path: PropertyPath, value: any): this;
- /**
- * @see _.set
- */
- set<TResult>(path: PropertyPath, value: any): ExpChain<TResult>;
- }
- type SetWithCustomizer<T> = (nsValue: any, key: string, nsObject: T) => any;
- interface LoDashStatic {
- /**
- * This method is like _.set except that it accepts customizer which is invoked to produce the objects of
- * path. If customizer returns undefined path creation is handled by the method instead. The customizer is
- * invoked with three arguments: (nsValue, key, nsObject).
- *
- * @param object The object to modify.
- * @param path The path of the property to set.
- * @param value The value to set.
- * @param customizer The function to customize assigned values.
- * @return Returns object.
- */
- setWith<T extends object>(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer<T>): T;
- /**
- * @see _.setWith
- */
- setWith<T extends object, TResult>(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer<T>): TResult;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.setWith
- */
- setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): this;
- /**
- * @see _.setWith
- */
- setWith<TResult>(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): ImpChain<TResult>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.setWith
- */
- setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): this;
- /**
- * @see _.setWith
- */
- setWith<TResult>(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): ExpChain<TResult>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of own enumerable key-value pairs for object.
- *
- * @param object The object to query.
- * @return Returns the new array of key-value pairs.
- */
- toPairs<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
- /**
- * @see _.toPairs
- */
- toPairs(object?: object): Array<[string, any]>;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.toPairs
- */
- toPairs(): Collection<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.toPairs
- */
- toPairs(): CollectionChain<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of own and inherited enumerable key-value pairs for object.
- *
- * @param object The object to query.
- * @return Returns the new array of key-value pairs.
- */
- toPairsIn<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
- /**
- * @see _.toPairsIn
- */
- toPairsIn(object?: object): Array<[string, any]>;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.toPairsIn
- */
- toPairsIn(): Collection<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.toPairsIn
- */
- toPairsIn(): CollectionChain<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
- }
- interface LoDashStatic {
- /**
- * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of
- * running each of its own enumerable properties through iteratee, with each invocation potentially mutating
- * the accumulator object. The iteratee is invoked with four arguments: (accumulator,
- * value, key, object). Iteratee functions may exit iteration early by explicitly returning false.
- *
- * @param object The object to iterate over.
- * @param iteratee The function invoked per iteration.
- * @param accumulator The custom accumulator value.
- * @return Returns the accumulated value.
- */
- transform<T, TResult>(object: readonly T[], iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): TResult;
- /**
- * @see _.transform
- */
- transform<T, TResult>(object: Dictionary<T>, iteratee: MemoVoidDictionaryIterator<T, string, TResult>, accumulator?: TResult): TResult;
- /**
- * @see _.transform
- */
- transform<T extends object, TResult>(object: T, iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): TResult;
- /**
- * @see _.transform
- */
- transform(object: any[]): any[];
- /**
- * @see _.transform
- */
- transform(object: object): Dictionary<any>;
- }
- interface Collection<T> {
- /**
- * @see _.transform
- */
- transform<TResult>(iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): ImpChain<TResult>;
- /**
- * @see _.transform
- */
- transform(): Collection<any>;
- }
- interface Object<T> {
- /**
- * @see _.transform
- */
- transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], string, TResult>, accumulator?: TResult): ImpChain<TResult>;
- /**
- * @see _.transform
- */
- transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): ImpChain<TResult>;
- /**
- * @see _.transform
- */
- transform(): ImpChain<T extends Dictionary<unknown> ? Dictionary<any> : T>;
- }
- interface CollectionChain<T> {
- /**
- * @see _.transform
- */
- transform<TResult>(iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): ExpChain<TResult>;
- /**
- * @see _.transform
- */
- transform(): CollectionChain<any>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.transform
- */
- transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], string, TResult>, accumulator?: TResult): ExpChain<TResult>;
- /**
- * @see _.transform
- */
- transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): ExpChain<TResult>;
- /**
- * @see _.transform
- */
- transform(): ExpChain<T extends Dictionary<unknown> ? Dictionary<any> : T>;
- }
- interface LoDashStatic {
- /**
- * Removes the property at path of object.
- *
- * Note: This method mutates object.
- *
- * @param object The object to modify.
- * @param path The path of the property to unset.
- * @return Returns true if the property is deleted, else false.
- */
- unset(object: any, path: PropertyPath): boolean;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.unset
- */
- unset(path: PropertyPath): Primitive<boolean>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.unset
- */
- unset(path: PropertyPath): PrimitiveChain<boolean>;
- }
- interface LoDashStatic {
- /**
- * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to
- * customize path creation. The updater is invoked with one argument: (value).
- *
- * @param object The object to modify.
- * @param path The path of the property to set.
- * @param updater The function to produce the updated value.
- * @return Returns object.
- */
- update(object: object, path: PropertyPath, updater: (value: any) => any): any;
- }
- interface LoDashImplicitWrapper<TValue> {
- /**
- * @see _.update
- */
- update(path: PropertyPath, updater: (value: any) => any): Object<any>;
- }
- interface LoDashExplicitWrapper<TValue> {
- /**
- * @see _.update
- */
- update(path: PropertyPath, updater: (value: any) => any): ObjectChain<any>;
- }
- interface LoDashStatic {
- /**
- * This method is like `_.update` except that it accepts `customizer` which is
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
- * path creation is handled by the method instead. The `customizer` is invoked
- * with three arguments: (nsValue, key, nsObject).
- *
- * **Note:** This method mutates `object`.
- *
- * @since 4.6.0
- * @category Object
- * @param object The object to modify.
- * @param path The path of the property to set.
- * @param updater The function to produce the updated value.
- * @param [customizer] The function to customize assigned values.
- * @returns Returns `object`.
- * @example
- *
- * var object = {};
- *
- * _.updateWith(object, '[0][1]', _.constant('a'), Object);
- * // => { '0': { '1': 'a' } }
- */
- updateWith<T extends object>(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): T;
- /**
- * @see _.updateWith
- */
- updateWith<T extends object, TResult>(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): TResult;
- }
- interface Object<T> {
- /**
- * @see _.updateWith
- */
- updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): this;
- /**
- * @see _.updateWith
- */
- updateWith<TResult>(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): Object<TResult>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.updateWith
- */
- updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): this;
- /**
- * @see _.updateWith
- */
- updateWith<TResult>(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): ObjectChain<TResult>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of the own enumerable property values of object.
- *
- * @param object The object to query.
- * @return Returns an array of property values.
- */
- values<T>(object: Dictionary<T> | NumericDictionary<T> | List<T> | null | undefined): T[];
- /**
- * @see _.values
- */
- values<T extends object>(object: T | null | undefined): Array<T[keyof T]>;
- /**
- * @see _.values
- */
- values(object: any): any[];
- }
- interface String {
- /**
- * @see _.values
- */
- values(): Collection<string>;
- }
- interface Object<T> {
- /**
- * @see _.values
- */
- values(): Collection<T[keyof T]>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.values
- */
- values(): CollectionChain<T[keyof T]>;
- }
- interface StringChain {
- /**
- * @see _.values
- */
- values(): CollectionChain<string>;
- }
- interface StringNullableChain {
- /**
- * @see _.values
- */
- values(): CollectionChain<string>;
- }
- interface LoDashStatic {
- /**
- * Creates an array of the own and inherited enumerable property values of object.
- *
- * @param object The object to query.
- * @return Returns the array of property values.
- */
- valuesIn<T>(object: Dictionary<T> | NumericDictionary<T> | List<T> | null | undefined): T[];
- /**
- * @see _.valuesIn
- */
- valuesIn<T extends object>(object: T | null | undefined): Array<T[keyof T]>;
- }
- interface String {
- /**
- * @see _.valuesIn
- */
- valuesIn(): Collection<string>;
- }
- interface Object<T> {
- /**
- * @see _.valuesIn
- */
- valuesIn(): Collection<T[keyof T]>;
- }
- interface StringChain {
- /**
- * @see _.valuesIn
- */
- valuesIn(): CollectionChain<string>;
- }
- interface StringNullableChain {
- /**
- * @see _.valuesIn
- */
- valuesIn(): CollectionChain<string>;
- }
- interface ObjectChain<T> {
- /**
- * @see _.valuesIn
- */
- valuesIn(): CollectionChain<T[keyof T]>;
- }
- }
|