From 1fb244abedbe3dbfc11e31d3e9436be9062a8cbe Mon Sep 17 00:00:00 2001 From: Josh Rutherford Date: Thu, 19 Oct 2017 05:40:47 -0500 Subject: [PATCH 001/232] react-dom: add createPortal API (#20245). (#20336) * react-dom: add createPortal API. * React, React-DOM: move portal interface to types/react, update render for class components to include ReactPortal. * react-dom: add second portal test case with jsx, allow jsx in react-dom-tests. * react, react-dom createPortal api: remove undocumented arguments, properties. --- types/react-dom/index.d.ts | 5 ++++- .../{react-dom-tests.ts => react-dom-tests.tsx} | 14 ++++++++++++++ types/react-dom/tsconfig.json | 5 +++-- types/react/index.d.ts | 12 +++++++++--- 4 files changed, 30 insertions(+), 6 deletions(-) rename types/react-dom/{react-dom-tests.ts => react-dom-tests.tsx} (93%) diff --git a/types/react-dom/index.d.ts b/types/react-dom/index.d.ts index aeac0c8081..20b870a8b8 100644 --- a/types/react-dom/index.d.ts +++ b/types/react-dom/index.d.ts @@ -4,6 +4,7 @@ // AssureSign // Microsoft // MartynasZilinskas +// Josh Rutherford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -12,12 +13,14 @@ export as namespace ReactDOM; import { ReactInstance, Component, ComponentState, ReactElement, SFCElement, CElement, - DOMAttributes, DOMElement + DOMAttributes, DOMElement, ReactNode, ReactPortal } from 'react'; export function findDOMNode(instance: ReactInstance): Element; export function unmountComponentAtNode(container: Element): boolean; +export function createPortal(children: ReactNode, container: Element): ReactPortal; + export const version: string; export const render: Renderer; export const hydrate: Renderer; diff --git a/types/react-dom/react-dom-tests.ts b/types/react-dom/react-dom-tests.tsx similarity index 93% rename from types/react-dom/react-dom-tests.ts rename to types/react-dom/react-dom-tests.tsx index 08eac7afdb..3f153b0a75 100644 --- a/types/react-dom/react-dom-tests.ts +++ b/types/react-dom/react-dom-tests.tsx @@ -31,6 +31,20 @@ describe('ReactDOM', () => { ReactDOM.render(React.createElement('div'), rootElement); ReactDOM.findDOMNode(rootElement); }); + + it('createPortal', () => { + const rootElement = document.createElement('div'); + const portalTarget = document.createElement('div'); + + class ClassComponent extends React.Component { + render() { + return ReactDOM.createPortal(
, portalTarget); + } + } + + ReactDOM.createPortal(React.createElement('div'), portalTarget); + ReactDOM.render(, rootElement); + }); }); describe('ReactDOMServer', () => { diff --git a/types/react-dom/tsconfig.json b/types/react-dom/tsconfig.json index 010744a826..0d21b07029 100644 --- a/types/react-dom/tsconfig.json +++ b/types/react-dom/tsconfig.json @@ -1,7 +1,7 @@ { "files": [ "index.d.ts", - "react-dom-tests.ts", + "react-dom-tests.tsx", "server/index.d.ts", "node-stream/index.d.ts", "test-utils/index.d.ts" @@ -22,6 +22,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "jsx": "preserve" } } \ No newline at end of file diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 35feb8d0ab..93cb62fbfa 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -13,6 +13,7 @@ // Dovydas Navickas // Stéphane Goetz // Rich Seviora +// Josh Rutherford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -123,6 +124,11 @@ declare namespace React { type: keyof ReactSVG; } + interface ReactPortal { + key: Key | null; + children: ReactNode; + } + // // Factories // ---------------------------------------------------------------------- @@ -161,7 +167,7 @@ declare namespace React { // Should be Array but type aliases cannot be recursive type ReactFragment = {} | Array; - type ReactNode = ReactChild | ReactFragment | boolean | null | undefined; + type ReactNode = ReactChild | ReactFragment | ReactPortal | string | number | boolean | null | undefined; // // Top Level API @@ -280,7 +286,7 @@ declare namespace React { // tslint:enable:unified-signatures forceUpdate(callBack?: () => any): void; - render(): JSX.Element | JSX.Element[] | string | number | null | false; + render(): JSX.Element | JSX.Element[] | ReactPortal | string | number | null | false; // React.Props is now deprecated, which means that the `children` // property is not available on `P` by default, even though you can @@ -3505,7 +3511,7 @@ declare global { // tslint:disable:no-empty-interface interface Element extends React.ReactElement { } interface ElementClass extends React.Component { - render(): Element | Element[] | string | number | null | false; + render(): Element | Element[] | React.ReactPortal | string | number | null | false; } interface ElementAttributesProperty { props: {}; } interface ElementChildrenAttribute { children: {}; } From 0cbf897a5df2d58336c27291e11ae671fca63b4f Mon Sep 17 00:00:00 2001 From: Weeco <23424570+weeco@users.noreply.github.com> Date: Thu, 19 Oct 2017 16:39:30 +0200 Subject: [PATCH 002/232] Added eachAsync options for concurrency (#20541) * Added eachAsync options for concurrency * Added overload function definition for eachAsync --- types/mongoose/index.d.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index cd7bb438d4..3e1002fd3c 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -469,6 +469,11 @@ declare module "mongoose" { static Messages: Object; } + interface EachAsyncOptions { + /** defaults to 1 */ + parallel?: number; + } + /* * section querycursor.js * http://mongoosejs.com/docs/api.html#querycursor-js @@ -500,10 +505,21 @@ declare module "mongoose" { * Execute fn for every document in the cursor. If fn returns a promise, * will wait for the promise to resolve before iterating on to the next one. * Returns a promise that resolves when done. - * @param callback executed when all docs have been processed + * @param fn Function to be executed for every document in the cursor + * @param callback Executed when all docs have been processed */ eachAsync(fn: (doc: T) => any, callback?: (err: any) => void): Promise; + /** + * Execute fn for every document in the cursor. If fn returns a promise, + * will wait for the promise to resolve before iterating on to the next one. + * Returns a promise that resolves when done. + * @param fn Function to be executed for every document in the cursor + * @param options Async options (e. g. parallel function execution) + * @param callback Executed when all docs have been processed + */ + eachAsync(fn: (doc: T) => any, options: EachAsyncOptions, callback?: (err: any) => void): Promise; + /** * Registers a transform function which subsequently maps documents retrieved * via the streams interface or .next() From 4aa4400332de149258fda1bc4f3fe4de6686bfb9 Mon Sep 17 00:00:00 2001 From: Yoga Aliarham Date: Thu, 19 Oct 2017 21:48:52 +0700 Subject: [PATCH 003/232] Update ioredis type definitions (add pfcount, pfadd, pfmerge interfaces) (#20669) * Update ioredis type definitions * Add contributor name * Update interface order --- types/ioredis/index.d.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index 7a36c4b7a6..8353b4e563 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/luin/ioredis // Definitions by: York Yao // Christopher Eck +// Yoga Aliarham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* =================== USAGE =================== @@ -325,16 +326,22 @@ declare module IORedis { evalsha(args: any[], callback?: ResCallbackT): any; evalsha(...args: any[]): any; script(args: any[], callback?: ResCallbackT): any; - script(...args: any[]): any; script(key: string, callback?: ResCallbackT): any; + script(...args: any[]): any; quit(args: any[], callback?: ResCallbackT): any; quit(...args: any[]): any; - scan(...args: any[]): any; scan(args: any[], callback?: ResCallbackT): any; - hscan(...args: any[]): any; + scan(...args: any[]): any; hscan(args: any[], callback?: ResCallbackT): any; - zscan(...args: any[]): any; + hscan(...args: any[]): any; zscan(args: any[], callback?: ResCallbackT): any; + zscan(...args: any[]): any; + pfmerge(args: any[], callback?: ResCallbackT): any; + pfmerge(...args: any[]): any; + pfadd(args: any[], callback?: ResCallbackT): any; + pfadd(...args: any[]): any; + pfcount(args: any[], callback?: ResCallbackT): any; + pfcount(...args: any[]): any; pipeline(): Pipeline; pipeline(commands: string[][]): Pipeline; From 68a737fd800032531f3f87ac9c48b540b81dd600 Mon Sep 17 00:00:00 2001 From: mattywong Date: Thu, 19 Oct 2017 23:04:18 +0800 Subject: [PATCH 004/232] [@types/next] Update Router.push() method to include UrlLike type (#20671) * [@types/next] Update Router.push() method to include UrlLike type Allow a valid UrlLike object instead of only a string type e.g ``` Router.push({ pathname: '/pathname', query: { prop1: '', prop2: '', }, }); ``` https://github.com/zeit/next.js/#with-url-object-1 * Update router.d.ts --- types/next/router.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/next/router.d.ts b/types/next/router.d.ts index 021b0dd3dc..a1d58bb42a 100644 --- a/types/next/router.d.ts +++ b/types/next/router.d.ts @@ -1,4 +1,7 @@ import * as React from 'react'; +import * as url from 'url'; + +type UrlLike = url.UrlObject | url.Url; export interface EventChangeOptions { shallow?: boolean; @@ -20,8 +23,8 @@ export interface SingletonRouter { // router methods reload(route: string): Promise; back(): void; - push(url: string, as?: string, options?: EventChangeOptions): Promise; - replace(url: string, as?: string, options?: EventChangeOptions): Promise; + push(url: string|UrlLike, as?: string|UrlLike, options?: EventChangeOptions): Promise; + replace(url: string|UrlLike, as?: string|UrlLike, options?: EventChangeOptions): Promise; prefetch(url: string): Promise>; // router events From 77eac5484737119fc124ee602659e7179f9a342f Mon Sep 17 00:00:00 2001 From: AJ Richardson Date: Thu, 19 Oct 2017 11:09:17 -0400 Subject: [PATCH 005/232] [lodash] Better chaining wrappers, overload clean-up (#19356) * [lodash] improved iterateee parameters, simplified forEach overloads * Changed ListIterator to StringIterator, cleaned up more issues with flatMap * Even more flatMap cleanup * Making wrapper types simpler and more accurate (not done) * Fixed type inference for forEach callback arguments * Converted explicit wrapper types, implemented differenceWith * Updated more functions to use new-style wrappers * Finished updating the remaining methods * Fixed lint errors * Fixed parameter type inference when using `any` (#19228) * Fixed test errors * Fixed issues with _.get * Fixed issues with _.get * consider this * removed duplicate type, added TODO * More _.get fixes * Fixed issues with mapValues with a single parameter * Modified lodash-tests to have minimal diff with upstream * Improved backwards compatibility --- types/lodash/index.d.ts | 14419 +++++++++++++-------------------- types/lodash/lodash-tests.ts | 3032 +++---- types/lodash/tslint.json | 17 +- 3 files changed, 7058 insertions(+), 10410 deletions(-) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index 58698cb4f3..ac954c6107 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -8,7 +8,7 @@ // Junyoung Clare Jang , // e-cloud // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.2 /** ### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) @@ -244,7 +244,7 @@ Methods: export = _; export as namespace _; -declare var _: _.LoDashStatic; +declare let _: _.LoDashStatic; type PartialObject = Partial; @@ -253,46 +253,74 @@ declare namespace _ { interface LoDashStatic { /** - * Creates a lodash object which wraps the given value to enable intuitive method chaining. + * Creates a lodash object which wraps value to enable implicit method chain sequences. + * Methods that operate on and return arrays, collections, and functions can be chained together. + * Methods that retrieve a single value or may return a primitive value will automatically end the + * chain sequence and return the unwrapped value. Otherwise, the value must be unwrapped with value(). * - * In addition to Lo-Dash methods, wrappers also have the following Array methods: - * concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift + * Explicit chain sequences, which must be unwrapped with value(), may be enabled using _.chain. * - * Chaining is supported in custom builds as long as the value method is implicitly or - * explicitly included in the build. + * The execution of chained methods is lazy, that is, it's deferred until value() is + * implicitly or explicitly called. * - * The chainable wrapper functions are: - * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, - * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, - * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, - * keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, - * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, - * remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times, - * toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut fusion + * is an optimization to merge iteratee calls; this avoids the creation of intermediate + * arrays and can greatly reduce the number of iteratee executions. Sections of a chain + * sequence qualify for shortcut fusion if the section is applied to an array and iteratees + * accept only one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. * - * The non-chainable wrapper functions are: - * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, - * findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean, - * isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber, - * isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin, - * noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some, - * sortedIndex, runInContext, template, unescape, uniqueId, and value + * Chaining is supported in custom builds as long as the value() method is directly or + * indirectly included in the build. * - * The wrapper functions first and last return wrapped values when n is provided, otherwise - * they return unwrapped values. + * In addition to lodash methods, wrappers have Array and String methods. + * The wrapper Array methods are: + * concat, join, pop, push, shift, sort, splice, and unshift. + * The wrapper String methods are: + * replace and split. * - * Explicit chaining can be enabled by using the _.chain method. + * The wrapper methods that support shortcut fusion are: + * at, compact, drop, dropRight, dropWhile, filter, find, findLast, head, initial, last, + * map, reject, reverse, slice, tail, take, takeRight, takeRightWhile, takeWhile, and toArray + * + * The chainable wrapper methods are: + * after, ary, assign, assignIn, assignInWith, assignWith, at, before, bind, bindAll, bindKey, + * castArray, chain, chunk, commit, compact, concat, conforms, constant, countBy, create, + * curry, debounce, defaults, defaultsDeep, defer, delay, difference, differenceBy, differenceWith, + * drop, dropRight, dropRightWhile, dropWhile, extend, extendWith, fill, filter, flatMap, + * flatMapDeep, flatMapDepth, flatten, flattenDeep, flattenDepth, flip, flow, flowRight, + * fromPairs, functions, functionsIn, groupBy, initial, intersection, intersectionBy, intersectionWith, + * invert, invertBy, invokeMap, iteratee, keyBy, keys, keysIn, map, mapKeys, mapValues, + * matches, matchesProperty, memoize, merge, mergeWith, method, methodOf, mixin, negate, + * nthArg, omit, omitBy, once, orderBy, over, overArgs, overEvery, overSome, partial, partialRight, + * partition, pick, pickBy, plant, property, propertyOf, pull, pullAll, pullAllBy, pullAllWith, pullAt, + * push, range, rangeRight, rearg, reject, remove, rest, reverse, sampleSize, set, setWith, + * shuffle, slice, sort, sortBy, sortedUniq, sortedUniqBy, splice, spread, tail, take, + * takeRight, takeRightWhile, takeWhile, tap, throttle, thru, toArray, toPairs, toPairsIn, + * toPath, toPlainObject, transform, unary, union, unionBy, unionWith, uniq, uniqBy, uniqWith, + * unset, unshift, unzip, unzipWith, update, updateWith, values, valuesIn, without, wrap, + * xor, xorBy, xorWith, zip, zipObject, zipObjectDeep, and zipWith. + * + * The wrapper methods that are not chainable by default are: + * add, attempt, camelCase, capitalize, ceil, clamp, clone, cloneDeep, cloneDeepWith, cloneWith, + * conformsTo, deburr, defaultTo, divide, each, eachRight, endsWith, eq, escape, escapeRegExp, + * every, find, findIndex, findKey, findLast, findLastIndex, findLastKey, first, floor, forEach, + * forEachRight, forIn, forInRight, forOwn, forOwnRight, get, gt, gte, has, hasIn, head, + * identity, includes, indexOf, inRange, invoke, isArguments, isArray, isArrayBuffer, + * isArrayLike, isArrayLikeObject, isBoolean, isBuffer, isDate, isElement, isEmpty, isEqual, isEqualWith, + * isError, isFinite, isFunction, isInteger, isLength, isMap, isMatch, isMatchWith, isNaN, + * isNative, isNil, isNull, isNumber, isObject, isObjectLike, isPlainObject, isRegExp, + * isSafeInteger, isSet, isString, isUndefined, isTypedArray, isWeakMap, isWeakSet, join, + * kebabCase, last, lastIndexOf, lowerCase, lowerFirst, lt, lte, max, maxBy, mean, meanBy, + * min, minBy, multiply, noConflict, noop, now, nth, pad, padEnd, padStart, parseInt, pop, + * random, reduce, reduceRight, repeat, result, round, runInContext, sample, shift, size, + * snakeCase, some, sortedIndex, sortedIndexBy, sortedLastIndex, sortedLastIndexBy, startCase, + * startsWith, stubArray, stubFalse, stubObject, stubString, stubTrue, subtract, sum, sumBy, + * template, times, toFinite, toInteger, toJSON, toLength, toLower, toNumber, toSafeInteger, + * toString, toUpper, trim, trimEnd, trimStart, truncate, unescape, uniqueId, upperCase, + * upperFirst, value, and words. **/ - (value: number): LoDashImplicitWrapper; - (value: string): LoDashImplicitStringWrapper; - (value: boolean): LoDashImplicitWrapper; - (value: null | undefined): LoDashImplicitWrapper; - (value: number[]): LoDashImplicitNumberArrayWrapper; - (value: T[]): LoDashImplicitArrayWrapper; - (value: T[] | null | undefined): LoDashImplicitNillableArrayWrapper; - (value: T): LoDashImplicitObjectWrapper; - (value: T | null | undefined): LoDashImplicitNillableObjectWrapper; - (value: any): LoDashImplicitWrapper; + (value: T): LoDashImplicitWrapper; /** * The semantic version number. @@ -368,7 +396,7 @@ declare namespace _ { * @param value The value to cache. * @return Returns the cache object. */ - set(key: string, value: any): _.Dictionary; + set(key: string, value: any): Dictionary; /** * Removes all key-value entries from the map. @@ -379,66 +407,26 @@ declare namespace _ { new (): MapCache; } - interface LoDashWrapperBase { } + interface LoDashWrapper { } - interface LoDashImplicitWrapperBase extends LoDashWrapperBase { } - - interface LoDashExplicitWrapperBase extends LoDashWrapperBase { } - - interface LoDashImplicitWrapper extends LoDashImplicitWrapperBase> { } - - interface LoDashExplicitWrapper extends LoDashExplicitWrapperBase> { } - - interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper { } - - interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper { } - - interface LoDashImplicitObjectWrapperBase extends LoDashImplicitWrapperBase { } - - interface LoDashImplicitObjectWrapper extends LoDashImplicitObjectWrapperBase> { } - - interface LoDashImplicitNillableObjectWrapper extends LoDashImplicitObjectWrapperBase> { } - - interface LoDashExplicitObjectWrapperBase extends LoDashExplicitWrapperBase { } - - interface LoDashExplicitObjectWrapper extends LoDashExplicitObjectWrapperBase> { } - - interface LoDashExplicitNillableObjectWrapper extends LoDashExplicitObjectWrapperBase> { } - - interface LoDashImplicitArrayWrapperBase extends LoDashImplicitWrapperBase { - pop(): T | undefined; - push(...items: T[]): TWrapper; - shift(): T | undefined; - sort(compareFn?: (a: T, b: T) => number): TWrapper; - splice(start: number): TWrapper; - splice(start: number, deleteCount: number, ...items: T[]): TWrapper; - unshift(...items: T[]): TWrapper; + interface LoDashImplicitWrapper extends LoDashWrapper { + pop(this: LoDashImplicitWrapper | null | undefined>): T | undefined; + push(this: LoDashImplicitWrapper | null | undefined>, ...items: T[]): this; + shift(this: LoDashImplicitWrapper | null | undefined>): T | undefined; + sort(this: LoDashImplicitWrapper | null | undefined>, compareFn?: (a: T, b: T) => number): this; + splice(this: LoDashImplicitWrapper | null | undefined>, start: number, deleteCount?: number, ...items: T[]): this; + unshift(this: LoDashImplicitWrapper | null | undefined>, ...items: T[]): this; } - interface LoDashImplicitArrayWrapper extends LoDashImplicitArrayWrapperBase> { } - - interface LoDashImplicitNillableArrayWrapper extends LoDashImplicitArrayWrapperBase> { } - - interface LoDashImplicitNumberArrayWrapperBase extends LoDashImplicitArrayWrapperBase { } - - interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper { } - - interface LoDashExplicitArrayWrapperBase extends LoDashExplicitWrapperBase { - pop(): LoDashExplicitObjectWrapper; - push(...items: T[]): TWrapper; - shift(): LoDashExplicitObjectWrapper; - sort(compareFn?: (a: T, b: T) => number): TWrapper; - splice(start: number): TWrapper; - splice(start: number, deleteCount: number, ...items: T[]): TWrapper; - unshift(...items: T[]): TWrapper; + interface LoDashExplicitWrapper extends LoDashWrapper { + pop(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; + push(this: LoDashExplicitWrapper | null | undefined>, ...items: T[]): this; + shift(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; + sort(this: LoDashExplicitWrapper | null | undefined>, compareFn?: (a: T, b: T) => number): this; + splice(this: LoDashExplicitWrapper | null | undefined>, start: number, deleteCount?: number, ...items: T[]): this; + unshift(this: LoDashExplicitWrapper | null | undefined>, ...items: T[]): this; } - interface LoDashExplicitArrayWrapper extends LoDashExplicitArrayWrapperBase> { } - - interface LoDashExplicitNillableArrayWrapper extends LoDashExplicitArrayWrapperBase> { } - - interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper { } - /********* * Array * *********/ @@ -459,32 +447,24 @@ declare namespace _ { ): T[][]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.chunk */ - chunk(size?: number): LoDashImplicitArrayWrapper; + chunk( + this: LoDashImplicitWrapper | null | undefined>, + size?: number, + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.chunk */ - chunk(size?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.chunk - */ - chunk(size?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.chunk - */ - chunk(size?: number): LoDashExplicitArrayWrapper; + chunk( + this: LoDashExplicitWrapper | null | undefined>, + size?: number, + ): LoDashExplicitWrapper; } //_.compact @@ -499,35 +479,21 @@ declare namespace _ { compact(array?: List | null | undefined): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.compact */ - compact(): LoDashImplicitArrayWrapper; + compact(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.compact */ - compact(): LoDashImplicitArrayWrapper; + compact(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.compact - */ - compact(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.compact - */ - compact(): LoDashExplicitArrayWrapper; - } - - //_.concat DUMMY + //_.concat interface LoDashStatic { /** * Creates a new array concatenating `array` with any additional arrays @@ -550,7 +516,21 @@ declare namespace _ { * console.log(array); * // => [1] */ - concat(array: List, ...values: Array>): T[]; + concat(array: Many, ...values: Array>): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.compact + */ + concat(this: LoDashImplicitWrapper>, ...values: Array>): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.compact + */ + concat(this: LoDashExplicitWrapper>, ...values: Array>): LoDashExplicitWrapper; } //_.difference @@ -569,32 +549,24 @@ declare namespace _ { ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.difference */ - difference(...values: Array>): LoDashImplicitArrayWrapper; + difference( + this: LoDashImplicitWrapper | null | undefined>, + ...values: Array> + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.difference */ - difference(...values: Array>): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.difference - */ - difference(...values: Array>): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.difference - */ - difference(...values: Array>): LoDashExplicitArrayWrapper; + difference( + this: LoDashExplicitWrapper | null | undefined>, + ...values: Array> + ): LoDashExplicitWrapper; } //_.differenceBy @@ -612,16 +584,7 @@ declare namespace _ { differenceBy( array: List | null | undefined, values?: List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: List | null | undefined, - values?: List, - iteratee?: W + iteratee?: ValueIteratee ): T[]; /** @@ -629,19 +592,9 @@ declare namespace _ { */ differenceBy( array: List | null | undefined, - values1?: List, - values2?: List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: List | null | undefined, - values1?: List, - values2?: List, - iteratee?: W + values1: List, + values2: List, + iteratee?: ValueIteratee ): T[]; /** @@ -649,33 +602,10 @@ declare namespace _ { */ differenceBy( array: List | null | undefined, - values1?: List, - values2?: List, - values3?: List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: List | null | undefined, - values1?: List, - values2?: List, - values3?: List, - iteratee?: W - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: List | null | undefined, - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: W + values1: List, + values2: List, + values3: List, + iteratee?: ValueIteratee ): T[]; /** @@ -683,11 +613,11 @@ declare namespace _ { */ differenceBy( array: List | null | undefined, - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: ((value: T) => any)|string + values1: List, + values2: List, + values3: List, + values4: List, + iteratee?: ValueIteratee ): T[]; /** @@ -695,25 +625,12 @@ declare namespace _ { */ differenceBy( array: List | null | undefined, - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: List | null | undefined, - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: W + values1: List, + values2: List, + values3: List, + values4: List, + values5: List, + iteratee?: ValueIteratee ): T[]; /** @@ -721,447 +638,141 @@ declare namespace _ { */ differenceBy( array: List | null | undefined, - ...values: any[] + ...values: Array | ValueIteratee> ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.differenceBy */ differenceBy( + this: LoDashImplicitWrapper | null | undefined>, values?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + values1: List, + values2: List, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + values1: List, + values2: List, + values3: List, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + values1: List, + values2: List, + values3: List, + values4: List, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + values1: List, + values2: List, + values3: List, + values4: List, + values5: List, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( - ...values: any[] - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + ...values: Array | ValueIteratee> + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.differenceBy */ differenceBy( + this: LoDashExplicitWrapper | null | undefined>, values?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + values1: List, + values2: List, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + values1: List, + values2: List, + values3: List, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + values1: List, + values2: List, + values3: List, + values4: List, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + values1: List, + values2: List, + values3: List, + values4: List, + values5: List, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( - ...values: any[] - ): LoDashImplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + ...values: Array | ValueIteratee> + ): LoDashExplicitWrapper; } - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.differenceBy - */ - differenceBy( - values?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.differenceBy - */ - differenceBy( - values?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: List, - values2?: List, - values3?: List, - values4?: List, - values5?: List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashExplicitArrayWrapper; - } - - //_.differenceWith DUMMY + //_.differenceWith interface LoDashStatic { /** * Creates an array of unique `array` values not included in the other @@ -1171,18 +782,67 @@ declare namespace _ { * @static * @memberOf _ * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. + * @param {...Array} [values] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] */ - differenceWith( - array: List, - ...values: any[] - ): any[]; + differenceWith( + array: List | null | undefined, + values?: List, + comparator?: Comparator + ): T[]; + + /** + * @see _.differenceWith + */ + differenceWith( + array: List | null | undefined, + ...values: Array | Comparator>, + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.differenceWith + */ + differenceWith( + this: LoDashImplicitWrapper | null | undefined>, + values?: List, + comparator?: Comparator + ): LoDashImplicitWrapper; + + /** + * @see _.differenceWith + */ + differenceWith( + this: LoDashImplicitWrapper | null | undefined>, + ...values: Array | Comparator>, + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.differenceWith + */ + differenceWith( + this: LoDashExplicitWrapper | null | undefined>, + values?: List, + comparator?: Comparator + ): LoDashExplicitWrapper; + + /** + * @see _.differenceWith + */ + differenceWith( + this: LoDashExplicitWrapper | null | undefined>, + ...values: Array | Comparator>, + ): LoDashExplicitWrapper; } //_.drop @@ -1197,32 +857,18 @@ declare namespace _ { drop(array: List | null | undefined, n?: number): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.drop */ - drop(n?: number): LoDashImplicitArrayWrapper; + drop(this: LoDashImplicitWrapper | null | undefined>, n?: number): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.drop */ - drop(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.drop - */ - drop(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.drop - */ - drop(n?: number): LoDashExplicitArrayWrapper; + drop(this: LoDashExplicitWrapper | null | undefined>, n?: number): LoDashExplicitWrapper; } //_.dropRight @@ -1240,32 +886,18 @@ declare namespace _ { ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.dropRight */ - dropRight(n?: number): LoDashImplicitArrayWrapper; + dropRight(this: LoDashImplicitWrapper | null | undefined>, n?: number): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.dropRight */ - dropRight(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashExplicitArrayWrapper; + dropRight(this: LoDashExplicitWrapper | null | undefined>, n?: number): LoDashExplicitWrapper; } //_.dropRightWhile @@ -1288,118 +920,30 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the slice of array. */ - dropRightWhile( - array: List | null | undefined, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - array: List | null | undefined, - predicate?: string - ): TValue[]; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - array: List | null | undefined, - predicate?: TWhere - ): TValue[]; + dropRightWhile( + array: List | null | undefined, + predicate?: ListIteratee + ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.dropRightWhile */ - dropRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; + dropRightWhile( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.dropRightWhile */ - dropRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + dropRightWhile( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; } //_.dropWhile @@ -1422,118 +966,30 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the slice of array. */ - dropWhile( - array: List | null | undefined, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.dropWhile - */ - dropWhile( - array: List | null | undefined, - predicate?: string - ): TValue[]; - - /** - * @see _.dropWhile - */ - dropWhile( - array: List | null | undefined, - predicate?: TWhere - ): TValue[]; + dropWhile( + array: List | null | undefined, + predicate?: ListIteratee + ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.dropWhile */ - dropWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; + dropWhile( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.dropWhile */ - dropWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + dropWhile( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; } //_.fill @@ -1551,9 +1007,7 @@ declare namespace _ { */ fill( array: any[] | null | undefined, - value: T, - start?: number, - end?: number + value: T ): T[]; /** @@ -1561,54 +1015,104 @@ declare namespace _ { */ fill( array: List | null | undefined, - value: T, - start?: number, - end?: number + value: T ): List; + + /** + * @see _.fill + */ + fill( + array: U[] | null | undefined, + value: T, + start?: number, + end?: number + ): Array; + + /** + * @see _.fill + */ + fill( + array: List | null | undefined, + value: T, + start?: number, + end?: number + ): List; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.fill */ fill( - value: T, - start?: number, - end?: number - ): LoDashImplicitArrayWrapper; - } + this: LoDashImplicitWrapper, + value: T + ): LoDashImplicitWrapper; - interface LoDashImplicitObjectWrapperBase { /** * @see _.fill */ fill( + this: LoDashImplicitWrapper | null | undefined>, + value: T + ): LoDashImplicitWrapper>; + + /** + * @see _.fill + */ + fill( + this: LoDashImplicitWrapper, value: T, start?: number, end?: number - ): LoDashImplicitObjectWrapper>; + ): LoDashImplicitWrapper>; + + /** + * @see _.fill + */ + fill( + this: LoDashImplicitWrapper | null | undefined>, + value: T, + start?: number, + end?: number + ): LoDashImplicitWrapper>; } - interface LoDashExplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.fill */ fill( - value: T, - start?: number, - end?: number - ): LoDashExplicitArrayWrapper; - } + this: LoDashExplicitWrapper, + value: T + ): LoDashExplicitWrapper; - interface LoDashExplicitObjectWrapperBase { /** * @see _.fill */ fill( + this: LoDashExplicitWrapper | null | undefined>, + value: T + ): LoDashExplicitWrapper>; + + /** + * @see _.fill + */ + fill( + this: LoDashExplicitWrapper, value: T, start?: number, end?: number - ): LoDashExplicitObjectWrapper>; + ): LoDashExplicitWrapper>; + + /** + * @see _.fill + */ + fill( + this: LoDashExplicitWrapper | null | undefined>, + value: T, + start?: number, + end?: number + ): LoDashExplicitWrapper>; } //_.findIndex @@ -1633,129 +1137,29 @@ declare namespace _ { */ findIndex( array: List | null | undefined, - predicate?: ListIterator, + predicate?: ListIteratee, fromIndex?: number ): number; + } + interface LoDashImplicitWrapper { /** * @see _.findIndex */ findIndex( - array: List | null | undefined, - predicate?: string, - fromIndex?: number - ): number; - - /** - * @see _.findIndex - */ - findIndex( - array: List | null | undefined, - predicate?: W, + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee, fromIndex?: number ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.findIndex */ - findIndex( - predicate?: ListIterator, - fromIndex?: number - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string, - fromIndex?: number - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W, - fromIndex?: number - ): number; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator, - fromIndex?: number - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string, - fromIndex?: number - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W, - fromIndex?: number - ): number; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W, + findIndex( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee, fromIndex?: number ): LoDashExplicitWrapper; } @@ -1781,185 +1185,53 @@ declare namespace _ { */ findLastIndex( array: List | null | undefined, - predicate?: ListIterator, + predicate?: ListIteratee, fromIndex?: number ): number; + } + interface LoDashImplicitWrapper { /** * @see _.findLastIndex */ findLastIndex( - array: List | null | undefined, - predicate?: string, - fromIndex?: number - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - array: List | null | undefined, - predicate?: W, + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee, fromIndex?: number ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.findLastIndex */ - findLastIndex( - predicate?: ListIterator, - fromIndex?: number - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string, - fromIndex?: number - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W, - fromIndex?: number - ): number; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator, - fromIndex?: number - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string, - fromIndex?: number - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W, - fromIndex?: number - ): number; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string, - fromIndex?: number - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W, + findLastIndex( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee, fromIndex?: number ): LoDashExplicitWrapper; } //_.first interface LoDashStatic { - /** - * @see _.head - */ - first(array: List | null | undefined): T | undefined; + first: typeof _.head; // tslint:disable-line:no-unnecessary-qualifier } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.head */ - first(): string | undefined; + first(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.head */ - first(): T | undefined; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.head - */ - first(): T | undefined; - } - - interface LoDashExplicitWrapper { - /** - * @see _.head - */ - first(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.head - */ - first(): T; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.head - */ - first(): T; + first(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } interface RecursiveArray extends Array> {} - interface ListOfRecursiveArraysOrValues extends List> {} //_.flatten @@ -1978,53 +1250,30 @@ declare namespace _ { * @see _.flatten */ flatten(array: List> | null | undefined): T[]; - - /** - * @see _.flatten - */ - flatten(array: ListOfRecursiveArraysOrValues | null | undefined): RecursiveArray; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.flatten */ - flatten(): LoDashImplicitArrayWrapper; + flatten(this: LoDashImplicitWrapper | null | undefined>, isDeep: boolean): LoDashImplicitWrapper; + + /** + * @see _.flatten + */ + flatten(this: LoDashImplicitWrapper> | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.flatten */ - flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; - } + flatten(this: LoDashExplicitWrapper | null | undefined>, isDeep: boolean): LoDashExplicitWrapper; - interface LoDashImplicitObjectWrapperBase { /** * @see _.flatten */ - flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flatten - */ - flatten(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; + flatten(this: LoDashExplicitWrapper> | null | undefined>): LoDashExplicitWrapper; } //_.flattenDeep @@ -2038,46 +1287,18 @@ declare namespace _ { flattenDeep(array: ListOfRecursiveArraysOrValues | null | undefined): T[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.flattenDeep */ - flattenDeep(): LoDashImplicitArrayWrapper; + flattenDeep(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.flattenDeep */ - flattenDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; + flattenDeep(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // _.flattenDepth @@ -2092,6 +1313,20 @@ declare namespace _ { flattenDepth(array: ListOfRecursiveArraysOrValues | null | undefined, depth?: number): T[]; } + interface LoDashImplicitWrapper { + /** + * @see _.flattenDeep + */ + flattenDepth(this: LoDashImplicitWrapper | null | undefined>, depth?: number): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flattenDeep + */ + flattenDepth(this: LoDashExplicitWrapper | null | undefined>, depth?: number): LoDashExplicitWrapper; + } + //_.fromPairs interface LoDashStatic { /** @@ -2109,7 +1344,7 @@ declare namespace _ { * // => { 'fred': 30, 'barney': 40 } */ fromPairs( - array: List<[_.StringRepresentable, T]> | null | undefined + array: List<[StringRepresentable, T]> | null | undefined ): Dictionary; /** @@ -2120,20 +1355,37 @@ declare namespace _ { ): Dictionary; } - //_.fromPairs DUMMY - interface LoDashImplicitArrayWrapperBase { + //_.fromPairs + interface LoDashImplicitWrapper { /** * @see _.fromPairs */ - fromPairs(): LoDashImplicitObjectWrapper; - } + fromPairs( + this: LoDashImplicitWrapper | null | undefined> + ): LoDashImplicitWrapper>; - //_.fromPairs DUMMY - interface LoDashExplicitArrayWrapperBase { + /** + @see _.fromPairs + */ + fromPairs( + this: LoDashImplicitWrapper | null | undefined> + ): LoDashImplicitWrapper>; + } + //_.fromPairs + interface LoDashExplicitWrapper { /** * @see _.fromPairs */ - fromPairs(): LoDashExplicitObjectWrapper; + fromPairs( + this: LoDashExplicitWrapper | null | undefined> + ): LoDashExplicitWrapper>; + + /** + @see _.fromPairs + */ + fromPairs( + this: LoDashExplicitWrapper | null | undefined> + ): LoDashExplicitWrapper>; } //_.head @@ -2149,46 +1401,18 @@ declare namespace _ { head(array: List | null | undefined): T | undefined; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.head */ - head(): string | undefined; + head(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.head */ - head(): T | undefined; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.head - */ - head(): T | undefined; - } - - interface LoDashExplicitWrapper { - /** - * @see _.head - */ - head(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.head - */ - head(): T; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.head - */ - head(): T; + head(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.indexOf @@ -2223,277 +1447,28 @@ declare namespace _ { ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.indexOf */ - indexOf( + indexOf( + this: LoDashImplicitWrapper | null | undefined>, value: T, fromIndex?: boolean|number ): number; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.indexOf */ - indexOf( - value: TValue, - fromIndex?: boolean|number - ): number; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.indexOf - */ - indexOf( + indexOf( + this: LoDashExplicitWrapper | null | undefined>, value: T, fromIndex?: boolean|number ): LoDashExplicitWrapper; } - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.indexOf - */ - indexOf( - value: TValue, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } - - //_.intersectionBy DUMMY - interface LoDashStatic { - /** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of shared values. - * @example - * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1] - * - * // using the `_.property` iteratee shorthand - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ - intersectionBy( - array: List, - ...values: any[] - ): any[]; - } - - //_.intersectionWith DUMMY - interface LoDashStatic { - /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ - intersectionWith( - array: List, - ...values: any[] - ): any[]; - } - - //_.join - interface LoDashStatic { - /** - * Converts all elements in `array` into a string separated by `separator`. - * - * @param array The array to convert. - * @param separator The element separator. - * @returns Returns the joined string. - */ - join( - array: List | null | undefined, - separator?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.join - */ - join(separator?: string): string; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.join - */ - join(separator?: string): string; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.join - */ - join(separator?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } - - //_.pullAll DUMMY - interface LoDashStatic { - /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, [2, 3]); - * console.log(array); - * // => [1, 1] - */ - pullAll( - array: List, - ...values: any[] - ): any[]; - } - - //_.pullAllBy DUMMY - interface LoDashStatic { - /** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] - */ - pullAllBy( - array: List, - ...values: any[] - ): any[]; - } - - type Comparator = (arrVal: T, othVal: T) => boolean; - - //_.pullAllWith - interface LoDashStatic { - /** - * This method is like `_.pullAll` except that it accepts `comparator` which - * is invoked to compare elements of `array` to `values`. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.differenceWith`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.6.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; - * - * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); - * console.log(array); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] - */ - pullAllWith( - array: List, - values: List, - comparator?: Comparator - ): List; - } - - //_.reverse DUMMY - interface LoDashStatic { - /** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. - * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). - * - * @memberOf _ - * @category Array - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.reverse(array); - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - reverse( - array: List, - ...values: any[] - ): any[]; - } - //_.sortedIndexOf interface LoDashStatic { /** @@ -2517,42 +1492,26 @@ declare namespace _ { ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.sortedIndexOf */ - sortedIndexOf( + sortedIndexOf( + this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sortedIndexOf */ - sortedIndexOf( - value: TValue - ): number; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortedIndexOf - */ - sortedIndexOf( + sortedIndexOf( + this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: TValue - ): LoDashExplicitWrapper; - } - //_.initial interface LoDashStatic { /** @@ -2564,32 +1523,18 @@ declare namespace _ { initial(array: List | null | undefined): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.initial */ - initial(): LoDashImplicitArrayWrapper; + initial(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.initial */ - initial(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.initial - */ - initial(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.initial - */ - initial(): LoDashExplicitArrayWrapper; + initial(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.intersection @@ -2601,35 +1546,244 @@ declare namespace _ { * @param arrays The arrays to inspect. * @return Returns the new array of shared values. */ - intersection(...arrays: Array | null | undefined>): T[]; + intersection(...arrays: Array>): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.intersection */ - intersection(...arrays: Array>): LoDashImplicitArrayWrapper; + intersection( + this: LoDashImplicitWrapper>, + ...arrays: Array> + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.intersection */ - intersection(...arrays: Array>): LoDashImplicitArrayWrapper; + intersection( + this: LoDashExplicitWrapper>, + ...arrays: Array> + ): LoDashExplicitWrapper; } - interface LoDashExplicitArrayWrapperBase { + //_.intersectionBy + interface LoDashStatic { /** - * @see _.intersection + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of shared values. + * @example + * + * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * // => [2.1] + * + * // using the `_.property` iteratee shorthand + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] */ - intersection(...arrays: Array>): LoDashExplicitArrayWrapper; + intersectionBy( + array?: List | null | undefined, + values?: List, + iteratee?: ValueIteratee + ): T[]; + + /** + * @see _.intersectionBy + */ + intersectionBy( + array?: List | null | undefined, + ...values: Array | ValueIteratee>, + ): T[]; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** - * @see _.intersection + * @see _.intersectionBy */ - intersection(...arrays: Array>): LoDashExplicitArrayWrapper; + intersectionBy( + this: LoDashImplicitWrapper | null | undefined>, + values?: List, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.intersectionBy + */ + intersectionBy( + this: LoDashImplicitWrapper | null | undefined>, + ...values: Array | ValueIteratee>, + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.intersectionBy + */ + intersectionBy( + this: LoDashExplicitWrapper | null | undefined>, + values?: List, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.intersectionBy + */ + intersectionBy( + this: LoDashExplicitWrapper | null | undefined>, + ...values: Array | ValueIteratee>, + ): LoDashExplicitWrapper; + } + + //_.intersectionWith + interface LoDashStatic { + /** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [values] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + intersectionWith( + array: List | null | undefined, + values?: List, + comparator?: Comparator + ): T[]; + + /** + * @see _.differenceWith + */ + intersectionWith( + array: List | null | undefined, + ...values: Array | Comparator>, + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.intersectionWith + */ + intersectionWith( + this: LoDashImplicitWrapper | null | undefined>, + values?: List, + comparator?: Comparator + ): LoDashImplicitWrapper; + + /** + * @see _.intersectionWith + */ + intersectionWith( + this: LoDashImplicitWrapper | null | undefined>, + ...values: Array | Comparator>, + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.intersectionWith + */ + intersectionWith( + this: LoDashExplicitWrapper | null | undefined>, + values?: List, + comparator?: Comparator + ): LoDashExplicitWrapper; + + /** + * @see _.intersectionWith + */ + intersectionWith( + this: LoDashExplicitWrapper | null | undefined>, + ...values: Array | Comparator>, + ): LoDashExplicitWrapper; + } + + //_.join + interface LoDashStatic { + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @param array The array to convert. + * @param separator The element separator. + * @returns Returns the joined string. + */ + join( + array: List | null | undefined, + separator?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.join + */ + join(separator?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + + //_.reverse + interface LoDashStatic { + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @memberOf _ + * @category Array + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + reverse>( + array: TList, + ): TList; + } + + //_.prototype.reverse + interface LoDashWrapper { + /** + * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to + * last, and so on. + * + * Note: This method mutates the wrapped array. + * + * @return Returns the new reversed lodash wrapper instance. + */ + reverse(): this; } //_.last @@ -2643,46 +1797,18 @@ declare namespace _ { last(array: List | null | undefined): T | undefined; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.last */ - last(): string | undefined; + last(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.last */ - last(): T | undefined; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.last - */ - last(): T | undefined; - } - - interface LoDashExplicitWrapper { - /** - * @see _.last - */ - last(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.last - */ - last(): T; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.last - */ - last(): T; + last(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.lastIndexOf @@ -2698,47 +1824,29 @@ declare namespace _ { lastIndexOf( array: List | null | undefined, value: T, - fromIndex?: boolean|number + fromIndex?: true|number ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** - * @see _.lastIndexOf + * @see _.indexOf */ - lastIndexOf( + lastIndexOf( + this: LoDashImplicitWrapper | null | undefined>, value: T, - fromIndex?: boolean|number + fromIndex?: true|number ): number; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** - * @see _.lastIndexOf + * @see _.indexOf */ - lastIndexOf( - value: TResult, - fromIndex?: boolean|number - ): number; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.lastIndexOf - */ - lastIndexOf( + lastIndexOf( + this: LoDashExplicitWrapper | null | undefined>, value: T, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: TResult, - fromIndex?: boolean|number + fromIndex?: true|number ): LoDashExplicitWrapper; } @@ -2757,40 +1865,24 @@ declare namespace _ { ): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.nth */ - nth( + nth( + this: LoDashImplicitWrapper | null | undefined>, n?: number ): T | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.nth */ - nth( - n?:number - ): TResult | undefined; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.nth - */ - nth( - n?:number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.nth - */ - nth( - n?:number - ): LoDashExplicitWrapper; + nth( + this: LoDashExplicitWrapper | null | undefined>, + n?: number + ): LoDashExplicitWrapper; } //_.pull @@ -2818,32 +1910,24 @@ declare namespace _ { ): List; } - interface LoDashImplicitArrayWrapper { + interface LoDashImplicitWrapper { /** * @see _.pull */ - pull(...values: T[]): LoDashImplicitArrayWrapper; + pull( + this: LoDashImplicitWrapper>, + ...values: T[] + ): this; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.pull */ - pull(...values: TValue[]): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.pull - */ - pull(...values: T[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.pull - */ - pull(...values: TValue[]): LoDashExplicitObjectWrapper>; + pull( + this: LoDashExplicitWrapper>, + ...values: T[] + ): this; } //_.pullAt @@ -2859,37 +1943,203 @@ declare namespace _ { * @return Returns the new array of removed elements. */ pullAt( - array: List, + array: T[], ...indexes: Array> ): T[]; - } - interface LoDashImplicitArrayWrapper { /** * @see _.pullAt */ - pullAt(...indexes: Array>): LoDashImplicitArrayWrapper; + pullAt( + array: List, + ...indexes: Array> + ): List; } - interface LoDashImplicitObjectWrapper { + interface LoDashWrapper { /** * @see _.pullAt */ - pullAt(...indexes: Array>): LoDashImplicitArrayWrapper; + pullAt(...indexes: Array>): this; } - interface LoDashExplicitArrayWrapper { + //_.pullAll + interface LoDashStatic { /** - * @see _.pullAt + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, [2, 3]); + * console.log(array); + * // => [1, 1] */ - pullAt(...indexes: Array>): LoDashExplicitArrayWrapper; + pullAll( + array: T[], + values?: List, + ): T[]; + + /** + * @see _.pullAll + */ + pullAll( + array: List, + values?: List, + ): List; } - interface LoDashExplicitObjectWrapper { + interface LoDashImplicitWrapper { /** - * @see _.pullAt + * @see _.pullAll */ - pullAt(...indexes: Array>): LoDashExplicitArrayWrapper; + pullAll( + this: LoDashImplicitWrapper>, + values?: List + ): this; + } + + interface LoDashExplicitWrapper { + /** + * @see _.pullAll + */ + pullAll( + this: LoDashExplicitWrapper>, + values?: List + ): this; + } + + //_.pullAllBy + interface LoDashStatic { + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + pullAllBy( + array: T[], + values?: List, + iteratee?: ValueIteratee + ): T[]; + + /** + * @see _.pullAllBy + */ + pullAllBy( + array: List, + values?: List, + iteratee?: ValueIteratee + ): List; + } + + interface LoDashImplicitWrapper { + /** + * @see _.pullAllBy + */ + pullAllBy( + this: LoDashImplicitWrapper>, + values?: List, + iteratee?: ValueIteratee + ): this; + } + + interface LoDashExplicitWrapper { + /** + * @see _.pullAllBy + */ + pullAllBy( + this: LoDashExplicitWrapper>, + values?: List, + iteratee?: ValueIteratee + ): this; + } + + //_.pullAllWith + interface LoDashStatic { + /** + * This method is like `_.pullAll` except that it accepts `comparator` which is + * invoked to compare elements of array to values. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + pullAllWith( + array: T[], + values?: List, + comparator?: Comparator + ): T[]; + + /** + * @see _.pullAllWith + */ + pullAllWith( + array: List, + values?: List, + comparator?: Comparator + ): List; + } + + interface LoDashImplicitWrapper { + /** + * @see _.pullAllWith + */ + pullAllWith( + this: LoDashImplicitWrapper>, + values?: List, + comparator?: Comparator + ): this; + } + + interface LoDashExplicitWrapper { + /** + * @see _.pullAllWith + */ + pullAllWith( + this: LoDashExplicitWrapper>, + values?: List, + comparator?: Comparator + ): this; } //_.remove @@ -2916,116 +2166,28 @@ declare namespace _ { */ remove( array: List, - predicate?: ListIterator + predicate?: ListIteratee ): T[]; + } + interface LoDashImplicitWrapper { /** * @see _.remove */ remove( - array: List, - predicate?: string - ): T[]; - - /** - * @see _.remove - */ - remove( - array: List, - predicate?: W - ): T[]; + this: LoDashImplicitWrapper>, + predicate?: ListIteratee + ): LoDashImplicitWrapper; } - interface LoDashImplicitArrayWrapper { + interface LoDashExplicitWrapper { /** * @see _.remove */ - remove( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashExplicitArrayWrapper; + remove( + this: LoDashExplicitWrapper>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; } //_.tail @@ -3033,40 +2195,24 @@ declare namespace _ { /** * Gets all but the first element of array. * - * @alias _.tail - * * @param array The array to query. * @return Returns the slice of array. */ tail(array: List | null | undefined): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.tail */ - tail(): LoDashImplicitArrayWrapper; + tail(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.tail */ - tail(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.tail - */ - tail(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.tail - */ - tail(): LoDashExplicitArrayWrapper; + tail(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.slice @@ -3080,30 +2226,32 @@ declare namespace _ { * @return Returns the slice of array. */ slice( - array: T[] | null | undefined, + array: List | null | undefined, start?: number, end?: number ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.slice */ - slice( + slice( + this: LoDashImplicitWrapper | null | undefined>, start?: number, end?: number - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.slice */ - slice( + slice( + this: LoDashExplicitWrapper | null | undefined>, start?: number, end?: number - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; } //_.sortedIndex @@ -3132,56 +2280,22 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: string - ): number; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - } - - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.sortedIndex */ sortedIndex( + this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } - interface LoDashExplicitWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: string - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sortedIndex */ sortedIndex( + this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } @@ -3211,202 +2325,32 @@ declare namespace _ { * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); * // => 0 */ - sortedIndexBy( - array: List | null | undefined, - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedIndexBy - */ sortedIndexBy( array: List | null | undefined, value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List | null | undefined, - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List | null | undefined, - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List | null | undefined, - value: T, - iteratee: Object + iteratee?: ValueIteratee ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.sortedIndexBy */ - sortedIndexBy( - value: string, - iteratee: (x: string) => TSort + sortedIndexBy( + this: LoDashImplicitWrapper | null | undefined>, + value: T, + iteratee?: ValueIteratee ): number; } - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): number; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - + interface LoDashExplicitWrapper { /** * @see _.sortedIndexBy */ sortedIndexBy( + this: LoDashExplicitWrapper | null | undefined>, value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: Object - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: string, - iteratee: (x: string) => TSort - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => any - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: Object + iteratee?: ValueIteratee ): LoDashExplicitWrapper; } @@ -3434,56 +2378,22 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: string - ): number; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - } - - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.sortedLastIndex */ sortedLastIndex( + this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } - interface LoDashExplicitWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: string - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sortedLastIndex */ sortedLastIndex( + this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } @@ -3508,206 +2418,36 @@ declare namespace _ { * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); * // => 1 */ - sortedLastIndexBy( - array: List | null | undefined, - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedLastIndexBy - */ sortedLastIndexBy( array: List | null | undefined, value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List | null | undefined, - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List | null | undefined, - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List | null | undefined, - value: T, - iteratee: Object + iteratee: ValueIteratee ): number; } - interface LoDashImplicitWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: string, - iteratee: (x: string) => TSort - ): number; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): number; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - + interface LoDashImplicitWrapper { /** * @see _.sortedLastIndexBy */ sortedLastIndexBy( + this: LoDashImplicitWrapper | null | undefined>, value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: Object + iteratee: ValueIteratee ): number; } - interface LoDashExplicitWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: string, - iteratee: (x: string) => TSort - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - + interface LoDashExplicitWrapper { /** * @see _.sortedLastIndexBy */ sortedLastIndexBy( + this: LoDashExplicitWrapper | null | undefined>, value: T, - iteratee: (x: T) => any - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: Object + iteratee: ValueIteratee ): LoDashExplicitWrapper; } - //_.sortedLastIndexOf DUMMY + //_.sortedLastIndexOf interface LoDashStatic { /** * This method is like `_.lastIndexOf` except that it performs a binary @@ -3730,40 +2470,24 @@ declare namespace _ { ): number; } - //_.tail - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * @see _.rest + * @see _.sortedLastIndexOf */ - tail(array: List | null | undefined): T[]; + sortedLastIndexOf( + this: LoDashImplicitWrapper | null | undefined>, + value: T + ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** - * @see _.rest + * @see _.sortedLastIndexOf */ - tail(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.rest - */ - tail(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.rest - */ - tail(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.rest - */ - tail(): LoDashExplicitArrayWrapper; + sortedLastIndexOf( + this: LoDashExplicitWrapper | null | undefined>, + value: T + ): LoDashExplicitWrapper; } //_.take @@ -3781,32 +2505,24 @@ declare namespace _ { ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.take */ - take(n?: number): LoDashImplicitArrayWrapper; + take( + this: LoDashImplicitWrapper | null | undefined>, + n?: number + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.take */ - take(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.take - */ - take(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.take - */ - take(n?: number): LoDashExplicitArrayWrapper; + take( + this: LoDashExplicitWrapper | null | undefined>, + n?: number + ): LoDashExplicitWrapper; } //_.takeRight @@ -3824,32 +2540,24 @@ declare namespace _ { ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.takeRight */ - takeRight(n?: number): LoDashImplicitArrayWrapper; + takeRight( + this: LoDashImplicitWrapper | null | undefined>, + n?: number + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.takeRight */ - takeRight(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashExplicitArrayWrapper; + takeRight( + this: LoDashExplicitWrapper | null | undefined>, + n?: number + ): LoDashExplicitWrapper; } //_.takeRightWhile @@ -3872,118 +2580,30 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the slice of array. */ - takeRightWhile( - array: List | null | undefined, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - array: List | null | undefined, - predicate?: string - ): TValue[]; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - array: List | null | undefined, - predicate?: TWhere - ): TValue[]; + takeRightWhile( + array: List | null | undefined, + predicate?: ListIteratee + ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.takeRightWhile */ - takeRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; + takeRightWhile( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.takeRightWhile */ - takeRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + takeRightWhile( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; } //_.takeWhile @@ -4006,118 +2626,30 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the slice of array. */ - takeWhile( - array: List | null | undefined, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.takeWhile - */ - takeWhile( - array: List | null | undefined, - predicate?: string - ): TValue[]; - - /** - * @see _.takeWhile - */ - takeWhile( - array: List | null | undefined, - predicate?: TWhere - ): TValue[]; + takeWhile( + array: List | null | undefined, + predicate?: ListIteratee + ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.takeWhile */ - takeWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; + takeWhile( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.takeWhile */ - takeWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + takeWhile( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; } //_.union @@ -4132,42 +2664,24 @@ declare namespace _ { union(...arrays: Array | null | undefined>): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.union */ - union(...arrays: Array | null | undefined>): LoDashImplicitArrayWrapper; - - /** - * @see _.union - */ - union(...arrays: Array | null | undefined>): LoDashImplicitArrayWrapper; + union( + this: LoDashImplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.union */ - union(...arrays: Array | null | undefined>): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.union - */ - union(...arrays: Array | null | undefined>): LoDashExplicitArrayWrapper; - - /** - * @see _.union - */ - union(...arrays: Array | null | undefined>): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.union - */ - union(...arrays: Array | null | undefined>): LoDashExplicitArrayWrapper; + union( + this: LoDashExplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashExplicitWrapper; } //_.unionBy @@ -4183,504 +2697,258 @@ declare namespace _ { */ unionBy( arrays: List | null | undefined, - iteratee?: (value: T) => any + iteratee?: ValueIteratee ): T[]; /** * @see _.unionBy */ - unionBy( + unionBy( + arrays1: List | null | undefined, + arrays2: List | null | undefined, + iteratee?: ValueIteratee + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + iteratee?: ValueIteratee + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + iteratee?: ValueIteratee + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + arrays5: List | null | undefined, + ...iteratee: Array | List | null | undefined> + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.unionBy + */ + unionBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + arrays5: List | null | undefined, + ...iteratee: Array | List | null | undefined> + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.unionBy + */ + unionBy( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.unionBy + */ + unionBy( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + arrays5: List | null | undefined, + ...iteratee: Array | List | null | undefined> + ): LoDashExplicitWrapper; + } + + //_.unionWith + interface LoDashStatic { + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + unionWith( arrays: List | null | undefined, - iteratee?: W + comparator?: Comparator ): T[]; /** * @see _.unionBy */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: List | null | undefined, - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( + unionWith( arrays: List | null | undefined, - ...iteratee: any[] + arrays2: List | null | undefined, + comparator?: Comparator + ): T[]; + + /** + * @see _.unionWith + */ + unionWith( + arrays: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + ...comparator: Array | List | null | undefined> ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** - * @see _.unionBy + * @see _.unionWith */ - unionBy( - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + unionWith( + this: LoDashImplicitWrapper | null | undefined>, + comparator?: Comparator + ): LoDashImplicitWrapper; /** - * @see _.unionBy + * @see _.unionWith */ - unionBy( - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( + unionWith( + this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + comparator?: Comparator + ): LoDashImplicitWrapper; /** - * @see _.unionBy + * @see _.unionWith */ - unionBy( - arrays2: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( + unionWith( + this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashImplicitArrayWrapper; + ...comparator: Array | List | null | undefined> + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** - * @see _.unionBy + * @see _.unionWith */ - unionBy( - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + unionWith( + this: LoDashExplicitWrapper | null | undefined>, + comparator?: Comparator + ): LoDashExplicitWrapper; /** - * @see _.unionBy + * @see _.unionWith */ - unionBy( - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( + unionWith( + this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + comparator?: Comparator + ): LoDashExplicitWrapper; /** - * @see _.unionBy + * @see _.unionWith */ - unionBy( - arrays2: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( + unionWith( + this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: List | null | undefined, - arrays3: List | null | undefined, - arrays4: List | null | undefined, - arrays5: List | null | undefined, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashExplicitArrayWrapper; + ...comparator: Array | List | null | undefined> + ): LoDashExplicitWrapper; } //_.uniq @@ -4704,72 +2972,20 @@ declare namespace _ { uniq( array: List | null | undefined ): T[]; - - /** - * @see _.uniq - */ - uniq( - array: List | null | undefined - ): T[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.uniq */ - uniq(): LoDashImplicitArrayWrapper; + uniq(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.uniq */ - uniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - uniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; + uniq(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.uniqBy @@ -4794,206 +3010,100 @@ declare namespace _ { * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ - uniqBy( - array: TString, + uniqBy( + array: string | null | undefined, iteratee: StringIterator - ): TString[]; + ): string[]; /** * @see _.uniqBy */ uniqBy( array: List | null | undefined, - iteratee: ListIterator - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List | null | undefined, - iteratee: ListIterator - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List | null | undefined, - iteratee: string - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List | null | undefined, - iteratee: Object - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List | null | undefined, - iteratee: TWhere + iteratee: ListIteratee ): T[]; } - interface LoDashImplicitStringWrapper { + interface LoDashImplicitWrapper { /** * @see _.uniqBy */ uniqBy( + this: LoDashImplicitWrapper, iteratee: StringIterator - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee: ListIteratee + ): LoDashImplicitWrapper; } - interface LoDashExplicitStringWrapper { + interface LoDashExplicitWrapper { /** * @see _.uniqBy */ uniqBy( + this: LoDashExplicitWrapper, iteratee: StringIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashImplicitWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + ): LoDashExplicitWrapper; /** * @see _.uniqBy */ uniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: Object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + iteratee: ListIteratee + ): LoDashExplicitWrapper; } - interface LoDashExplicitWrapper { + //_.uniqWith + interface LoDashStatic { /** - * @see _.uniqBy + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + uniqWith( + array: List | null | undefined, + comparator?: Comparator + ): T[]; } - interface LoDashExplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** - * @see _.uniqBy + * @see _.uniqWith */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; + uniqWith( + this: LoDashImplicitWrapper | null | undefined>, + comparator?: Comparator + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** - * @see _.uniqBy + * @see _.uniqWith */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: Object - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; + uniqWith( + this: LoDashExplicitWrapper | null | undefined>, + comparator?: Comparator + ): LoDashExplicitWrapper; } //_.sortedUniq @@ -5015,72 +3125,20 @@ declare namespace _ { sortedUniq( array: List | null | undefined ): T[]; - - /** - * @see _.sortedUniq - */ - sortedUniq( - array: List | null | undefined - ): T[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.sortedUniq */ - sortedUniq(): LoDashImplicitArrayWrapper; + sortedUniq(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sortedUniq */ - sortedUniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - sortedUniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; + sortedUniq(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.sortedUniqBy @@ -5100,259 +3158,54 @@ declare namespace _ { * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); * // => [1.1, 2.2] */ - sortedUniqBy( - array: TString, + sortedUniqBy( + array: string | null | undefined, iteratee: StringIterator - ): TString[]; + ): string[]; /** * @see _.sortedUniqBy */ sortedUniqBy( array: List | null | undefined, - iteratee: ListIterator - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List | null | undefined, - iteratee: ListIterator - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List | null | undefined, - iteratee: string - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List | null | undefined, - iteratee: Object - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List | null | undefined, - iteratee: TWhere + iteratee: ListIteratee ): T[]; } - interface LoDashImplicitStringWrapper { + interface LoDashImplicitWrapper { /** * @see _.sortedUniqBy */ sortedUniqBy( + this: LoDashImplicitWrapper, iteratee: StringIterator - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee: ListIteratee + ): LoDashImplicitWrapper; } - interface LoDashExplicitStringWrapper { + interface LoDashExplicitWrapper { /** * @see _.sortedUniqBy */ sortedUniqBy( + this: LoDashExplicitWrapper, iteratee: StringIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + ): LoDashExplicitWrapper; /** * @see _.sortedUniqBy */ sortedUniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: Object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: Object - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - } - - //_.unionWith DUMMY - interface LoDashStatic { - /** - * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.unionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - unionWith( - array: List, - ...values: any[] - ): any[]; - } - - //_.uniqWith DUMMY - interface LoDashStatic { - /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] - */ - uniqWith( - array: List, - ...values: any[] - ): any[]; + this: LoDashExplicitWrapper | null | undefined>, + iteratee: ListIteratee + ): LoDashExplicitWrapper; } //_.unzip @@ -5364,35 +3217,21 @@ declare namespace _ { * @param array The array of grouped elements to process. * @return Returns the new array of regrouped elements. */ - unzip(array: List> | null | undefined): T[][]; + unzip(array: T[][] | List> | null | undefined): T[][]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.unzip */ - unzip(): LoDashImplicitArrayWrapper; + unzip(this: LoDashImplicitWrapper> | null | undefined>): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.unzip */ - unzip(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.unzip - */ - unzip(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.unzip - */ - unzip(): LoDashExplicitArrayWrapper; + unzip(this: LoDashExplicitWrapper> | null | undefined>): LoDashExplicitWrapper; } //_.unzipWith @@ -5407,28 +3246,51 @@ declare namespace _ { * @param thisArg The this binding of iteratee. * @return Returns the new array of regrouped elements. */ - unzipWith( - array: List> | null | undefined, - iteratee?: MemoIterator + unzipWith( + array: List> | null | undefined, + iteratee: (...values: T[]) => TResult ): TResult[]; - } - interface LoDashImplicitArrayWrapperBase { /** * @see _.unzipWith */ - unzipWith( - iteratee?: MemoIterator - ): LoDashImplicitArrayWrapper; + unzipWith( + array: List> | null | undefined + ): T[][]; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.unzipWith */ - unzipWith( - iteratee?: MemoIterator - ): LoDashImplicitArrayWrapper; + unzipWith( + this: LoDashImplicitWrapper> | null | undefined>, + iteratee: (...values: T[]) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.unzipWith + */ + unzipWith( + this: LoDashImplicitWrapper> | null | undefined> + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.unzipWith + */ + unzipWith( + this: LoDashExplicitWrapper> | null | undefined>, + iteratee: (...values: T[]) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.unzipWith + */ + unzipWith( + this: LoDashExplicitWrapper> | null | undefined> + ): LoDashExplicitWrapper; } //_.without @@ -5446,32 +3308,24 @@ declare namespace _ { ): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.without */ - without(...values: T[]): LoDashImplicitArrayWrapper; + without( + this: LoDashImplicitWrapper | null | undefined>, + ...values: T[] + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.without */ - without(...values: T[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.without - */ - without(...values: T[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.without - */ - without(...values: T[]): LoDashExplicitArrayWrapper; + without( + this: LoDashExplicitWrapper | null | undefined>, + ...values: T[] + ): LoDashExplicitWrapper; } //_.xor @@ -5485,35 +3339,27 @@ declare namespace _ { xor(...arrays: Array | null | undefined>): T[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.xor */ - xor(...arrays: Array | null | undefined>): LoDashImplicitArrayWrapper; + xor( + this: LoDashImplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.xor */ - xor(...arrays: Array | null | undefined>): LoDashImplicitArrayWrapper; + xor( + this: LoDashExplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashExplicitWrapper; } - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.xor - */ - xor(...arrays: Array | null | undefined>): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.xor - */ - xor(...arrays: Array | null | undefined>): LoDashExplicitArrayWrapper; - } - - //_.xorBy DUMMY + //_.xorBy interface LoDashStatic { /** * This method is like `_.xor` except that it accepts `iteratee` which is @@ -5535,13 +3381,90 @@ declare namespace _ { * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ - xorBy( - array: List, - ...values: any[] - ): any[]; + xorBy( + arrays?: List | null | undefined, + iteratee?: ValueIteratee + ): T[]; + + /** + * @see _.xorBy + */ + xorBy( + arrays: List | null | undefined, + arrays2: List | null | undefined, + iteratee?: ValueIteratee + ): T[]; + + /** + * @see _.xorBy + */ + xorBy( + arrays: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + ...iteratee: Array | List | null | undefined> + ): T[]; } - //_.xorWith DUMMY + interface LoDashImplicitWrapper { + /** + * @see _.xor + */ + xorBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.xorBy + */ + xorBy( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.xorBy + */ + xorBy( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + ...iteratee: Array | List | null | undefined> + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.xorBy + */ + xorBy( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.xorBy + */ + xorBy( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + iteratee?: ValueIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.xorBy + */ + xorBy( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + ...iteratee: Array | List | null | undefined> + ): LoDashExplicitWrapper; + } + + //_.xorWith interface LoDashStatic { /** * This method is like `_.xor` except that it accepts `comparator` which is @@ -5562,10 +3485,87 @@ declare namespace _ { * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - xorWith( - array: List, - ...values: any[] - ): any[]; + xorWith( + arrays?: List | null | undefined, + comparator?: Comparator + ): T[]; + + /** + * @see _.xorWith + */ + xorWith( + arrays: List | null | undefined, + arrays2: List | null | undefined, + comparator?: Comparator + ): T[]; + + /** + * @see _.xorWith + */ + xorWith( + arrays: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + ...comparator: Array | List | null | undefined> + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.xorWith + */ + xorWith( + this: LoDashImplicitWrapper | null | undefined>, + comparator?: Comparator + ): LoDashImplicitWrapper; + + /** + * @see _.xorWith + */ + xorWith( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + comparator?: Comparator + ): LoDashImplicitWrapper; + + /** + * @see _.xorWith + */ + xorWith( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + ...comparator: Array | List | null | undefined> + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.xorWith + */ + xorWith( + this: LoDashExplicitWrapper | null | undefined>, + comparator?: Comparator + ): LoDashExplicitWrapper; + + /** + * @see _.xorWith + */ + xorWith( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + comparator?: Comparator + ): LoDashExplicitWrapper; + + /** + * @see _.xorWith + */ + xorWith( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + ...comparator: Array | List | null | undefined> + ): LoDashExplicitWrapper; } //_.zip @@ -5580,32 +3580,24 @@ declare namespace _ { zip(...arrays: Array | null | undefined>): T[][]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.zip */ - zip(...arrays: Array | null | undefined>): _.LoDashImplicitArrayWrapper; + zip( + this: LoDashImplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.zip */ - zip(...arrays: Array | null | undefined>): _.LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.zip - */ - zip(...arrays: Array | null | undefined>): _.LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.zip - */ - zip(...arrays: Array | null | undefined>): _.LoDashExplicitArrayWrapper; + zip( + this: LoDashExplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashExplicitWrapper; } //_.zipObject @@ -5618,10 +3610,24 @@ declare namespace _ { * @param values The property values. * @return Returns the new object. */ - zipObject( - props: List|List>, - values?: List + zipObject( + props: List, + values: List ): TResult; + + /** + * @see _.zipObject + */ + zipObject( + props: List|List>, + values?: List + ): any; + + /** + * @see _.zipObject + */ + zipObject(): {}; + /** * This method is like _.zipObject except that it supports property paths. * @@ -5629,204 +3635,83 @@ declare namespace _ { * @param values The property values. * @return Returns the new object. */ - zipObjectDeep( - props: List|List>, - values?: List - ): TResult; - - /** - * @see _.zipObject - */ - zipObject( - props: List|List>, - values?: List - ): TResult; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - props: List|List>, - values?: List - ): TResult; - - /** - * @see _.zipObject - */ - zipObject( - props: List|List>, - values?: List - ): _.Dictionary; - /** - * @see _.zipObjectDeep - */ zipObjectDeep( props: List|List>, values?: List - ): _.Dictionary; + ): any; + + /** + * @see _.zipObjectDeep + */ + zipObjectDeep(): {}; } - interface LoDashImplicitArrayWrapper { + interface LoDashImplicitWrapper { /** * @see _.zipObject */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashImplicitObjectWrapper; + zipObject( + this: LoDashImplicitWrapper>, + values: List + ): LoDashImplicitWrapper; /** * @see _.zipObject */ zipObject( + this: LoDashImplicitWrapper|List>>, values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + ): LoDashImplicitWrapper; + /** * @see _.zipObjectDeep */ zipObjectDeep( + this: LoDashImplicitWrapper|List>>, values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + ): LoDashImplicitWrapper; + + /** + * @see _.zipObjectDeep + */ + zipObjectDeep( + this: LoDashImplicitWrapper|List>>, + values?: List + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.zipObject */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashImplicitObjectWrapper; + zipObject( + this: LoDashExplicitWrapper>, + values: List + ): LoDashExplicitWrapper; /** * @see _.zipObject */ zipObject( + this: LoDashExplicitWrapper|List>>, values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + ): LoDashExplicitWrapper; + /** * @see _.zipObjectDeep */ zipObjectDeep( + this: LoDashExplicitWrapper|List>>, values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; - } + ): LoDashExplicitWrapper; - interface LoDashExplicitArrayWrapper { - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; /** * @see _.zipObjectDeep */ - zipObjectDeep( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( + zipObjectDeep( + this: LoDashExplicitWrapper|List>>, values?: List - ): _.LoDashExplicitObjectWrapper; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; - /** - * @see _.zipObjectDeep - */ - zipObjectDeep( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + ): LoDashExplicitWrapper; } //_.zipWith @@ -5840,14 +3725,179 @@ declare namespace _ { * @param {*} [thisArg] The `this` binding of `iteratee`. * @return Returns the new array of grouped elements. */ - zipWith(...args: any[]): TResult[]; - } + zipWith( + ...arrays: Array | null | undefined> + ): T[][]; - interface LoDashImplicitArrayWrapper { /** * @see _.zipWith */ - zipWith(...args: any[]): LoDashImplicitArrayWrapper; + zipWith( + arrays: List | null | undefined, + iteratee: (value1: T) => TResult + ): TResult[]; + + /** + * @see _.zipWith + */ + zipWith( + arrays: List | null | undefined, + arrays2: List | null | undefined, + iteratee: (value1: T, value2: T) => TResult + ): TResult[]; + + /** + * @see _.zipWith + */ + zipWith( + arrays: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + iteratee: (value1: T, value2: T, value3: T) => TResult + ): TResult[]; + + /** + * @see _.zipWith + */ + zipWith( + arrays: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + iteratee: (value1: T, value2: T, value3: T, value4: T) => TResult + ): TResult[]; + + /** + * @see _.zipWith + */ + zipWith( + arrays: List | null | undefined, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + arrays5: List | null | undefined, + ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> + ): TResult[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper | null | undefined>, + iteratee: (value1: T) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + iteratee: (value1: T, value2: T) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + iteratee: (value1: T, value2: T, value3: T) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + iteratee: (value1: T, value2: T, value3: T, value4: T) => TResult + ): LoDashImplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashImplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + arrays5: List | null | undefined, + ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper | null | undefined>, + ...arrays: Array | null | undefined> + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: (value1: T) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + iteratee: (value1: T, value2: T) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + iteratee: (value1: T, value2: T, value3: T) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + iteratee: (value1: T, value2: T, value3: T, value4: T) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.zipWith + */ + zipWith( + this: LoDashExplicitWrapper | null | undefined>, + arrays2: List | null | undefined, + arrays3: List | null | undefined, + arrays4: List | null | undefined, + arrays5: List | null | undefined, + ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> + ): LoDashExplicitWrapper; } /********* @@ -5862,66 +3912,21 @@ declare namespace _ { * @param value The value to wrap. * @return Returns the new lodash wrapper instance. */ - chain(value: number): LoDashExplicitWrapper; - chain(value: string): LoDashExplicitWrapper; - chain(value: boolean): LoDashExplicitWrapper; - chain(value: null | undefined): LoDashExplicitWrapper; - chain(value: T[]): LoDashExplicitArrayWrapper; - chain(value: ReadonlyArray): LoDashExplicitArrayWrapper; - chain(value: T[] | null | undefined): LoDashExplicitNillableArrayWrapper; - chain(value: ReadonlyArray | null | undefined): LoDashExplicitNillableArrayWrapper; - chain(value: T): LoDashExplicitObjectWrapper; - chain(value: T | null | undefined): LoDashExplicitObjectWrapper; - chain(value: any): LoDashExplicitWrapper; + chain(value: T): LoDashExplicitWrapper; } - interface LoDashImplicitStringWrapper { + interface LoDashImplicitWrapper { /** * @see _.chain */ - chain(): LoDashExplicitStringWrapper; + chain(): LoDashExplicitWrapper; } - interface LoDashImplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.chain */ - chain(): LoDashExplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.chain - */ - chain(): LoDashExplicitArrayWrapper; - } - - interface LoDashImplicitNillableArrayWrapper { - /** - * @see _.chain - */ - chain(): LoDashExplicitNillableArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.chain - */ - chain(): LoDashExplicitObjectWrapper; - } - - interface LoDashImplicitNillableObjectWrapper { - /** - * @see _.chain - */ - chain(): LoDashExplicitNillableObjectWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.chain - */ - chain(): TWrapper; + chain(): this; } //_.tap @@ -5942,22 +3947,13 @@ declare namespace _ { ): T; } - interface LoDashImplicitWrapperBase { + interface LoDashWrapper { /** * @see _.tap */ tap( - interceptor: (value: T) => void - ): TWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.tap - */ - tap( - interceptor: (value: T) => void - ): TWrapper; + interceptor: (value: TValue) => void + ): this; } //_.thru @@ -5976,237 +3972,57 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.thru */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitObjectWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult[]): LoDashImplicitArrayWrapper; + thru(interceptor: (value: TValue) => TResult): LoDashImplicitWrapper; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.thru */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitObjectWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult[] - ): LoDashExplicitArrayWrapper; + thru(interceptor: (value: TValue) => TResult): LoDashExplicitWrapper; } //_.prototype.commit - interface LoDashImplicitWrapperBase { + interface LoDashWrapper { /** * Executes the chained sequence and returns the wrapped result. * * @return Returns the new lodash wrapper instance. */ - commit(): TWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.commit - */ - commit(): TWrapper; - } - - //_.prototype.concat - interface LoDashImplicitWrapperBase { - /** - * Creates a new array joining a wrapped array with any additional arrays and/or values. - * - * @param items - * @return Returns the new concatenated array. - */ - concat(...items: Array>): LoDashImplicitArrayWrapper; - - /** - * @see _.concat - */ - concat(...items: Array>): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.concat - */ - concat(...items: Array>): LoDashExplicitArrayWrapper; - - /** - * @see _.concat - */ - concat(...items: Array>): LoDashExplicitArrayWrapper; + commit(): this; } //_.prototype.plant - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * Creates a clone of the chained sequence planting value as the wrapped value. * @param value The value to plant as the wrapped value. * @return Returns the new lodash wrapper instance. */ - plant(value: number): LoDashImplicitWrapper; - - /** - * @see _.plant - */ - plant(value: string): LoDashImplicitStringWrapper; - - /** - * @see _.plant - */ - plant(value: boolean): LoDashImplicitWrapper; - - /** - * @see _.plant - */ - plant(value: number[]): LoDashImplicitNumberArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T[]): LoDashImplicitArrayWrapper; - - /** - * @see _.plant - */ - plant(value: ReadonlyArray): LoDashImplicitArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T): LoDashImplicitObjectWrapper; - - /** - * @see _.plant - */ - plant(value: any): LoDashImplicitWrapper; + plant(value: T): LoDashImplicitWrapper; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.plant */ - plant(value: number): LoDashExplicitWrapper; - - /** - * @see _.plant - */ - plant(value: string): LoDashExplicitStringWrapper; - - /** - * @see _.plant - */ - plant(value: boolean): LoDashExplicitWrapper; - - /** - * @see _.plant - */ - plant(value: number[]): LoDashExplicitNumberArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T[]): LoDashExplicitArrayWrapper; - - /** - * @see _.plant - */ - plant(value: ReadonlyArray): LoDashExplicitArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T): LoDashExplicitObjectWrapper; - - /** - * @see _.plant - */ - plant(value: any): LoDashExplicitWrapper; - } - - //_.prototype.reverse - interface LoDashImplicitArrayWrapper { - /** - * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to - * last, and so on. - * - * Note: This method mutates the wrapped array. - * - * @return Returns the new reversed lodash wrapper instance. - */ - reverse(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.reverse - */ - reverse(): LoDashExplicitArrayWrapper; + plant(value: T): LoDashExplicitWrapper; } //_.prototype.toJSON - interface LoDashWrapperBase { + interface LoDashWrapper { /** * @see _.value */ - toJSON(): T; + toJSON(): TValue; } //_.prototype.toString - interface LoDashWrapperBase { + interface LoDashWrapper { /** * Produces the result of coercing the unwrapped value to a string. * @@ -6216,7 +4032,7 @@ declare namespace _ { } //_.prototype.value - interface LoDashWrapperBase { + interface LoDashWrapper { /** * Executes the chained sequence to extract the unwrapped value. * @@ -6224,15 +4040,15 @@ declare namespace _ { * * @return Returns the resolved unwrapped value. */ - value(): T; + value(): TValue; } //_.valueOf - interface LoDashWrapperBase { + interface LoDashWrapper { /** * @see _.value */ - valueOf(): T; + valueOf(): TValue; } /************** @@ -6245,42 +4061,58 @@ declare namespace _ { * 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 collection The collection to iterate over. + * @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( - collection: List|Dictionary | null | undefined, + object: List | Dictionary | null | undefined, ...props: Array> ): T[]; - } - interface LoDashImplicitArrayWrapperBase { /** * @see _.at */ - at(...props: Array>): LoDashImplicitArrayWrapper; + at( + object: T | null | undefined, + ...props: Array> + ): Array; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.at */ - at(...props: Array>): LoDashImplicitArrayWrapper; - } + at( + this: LoDashImplicitWrapper | Dictionary | null | undefined>, + ...props: Array> + ): LoDashImplicitWrapper; - interface LoDashExplicitArrayWrapperBase { /** * @see _.at */ - at(...props: Array>): LoDashExplicitArrayWrapper; + at( + this: LoDashImplicitWrapper, + ...props: Array> + ): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.at */ - at(...props: Array>): LoDashExplicitArrayWrapper; + at( + this: LoDashExplicitWrapper | Dictionary | null | undefined>, + ...props: Array> + ): LoDashExplicitWrapper; + + /** + * @see _.at + */ + at( + this: LoDashExplicitWrapper, + ...props: Array> + ): LoDashExplicitWrapper>; } //_.countBy @@ -6307,15 +4139,7 @@ declare namespace _ { */ countBy( collection: List | null | undefined, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator + iteratee?: ListIteratee ): Dictionary; /** @@ -6323,260 +4147,146 @@ declare namespace _ { */ countBy( collection: NumericDictionary | null | undefined, - iteratee?: NumericDictionaryIterator + iteratee?: NumericDictionaryIteratee ): Dictionary; /** * @see _.countBy */ - countBy( - collection: List|Dictionary|NumericDictionary | null | undefined, - iteratee?: string - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary | null | undefined, - iteratee?: W - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary | null | undefined, - iteratee?: Object + countBy( + collection: T | null | undefined, + iteratee?: ObjectIteratee ): Dictionary; } - interface LoDashImplicitWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.countBy */ countBy( - iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashImplicitObjectWrapper>; + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashImplicitWrapper>; /** * @see _.countBy */ - countBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; + countBy( + this: LoDashImplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashImplicitWrapper>; - /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapperBase { /** * @see _.countBy */ countBy( - iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitObjectWrapper>; + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIteratee + ): LoDashImplicitWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.countBy + */ + countBy( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashExplicitWrapper>; /** * @see _.countBy */ - countBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; + countBy( + this: LoDashExplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashExplicitWrapper>; /** * @see _.countBy */ - countBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; + countBy( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIteratee + ): LoDashExplicitWrapper>; } //_.each interface LoDashStatic { - each: typeof _.forEach; + each: typeof _.forEach; // tslint:disable-line:no-unnecessary-qualifier } - interface LoDashImplicitWrapper { + interface LoDashWrapper { + /** + * @see _.forEach + */ + each( + this: LoDashWrapper, + iteratee?: ArrayIterator + ): this; + /** * @see _.forEach */ each( - iteratee: StringIterator - ): LoDashImplicitWrapper; - } + this: LoDashWrapper, + iteratee?: StringIterator + ): this; - interface LoDashImplicitArrayWrapperBase { /** * @see _.forEach */ - each( - iteratee: ListIterator - ): TWrapper; - } + each( + this: LoDashWrapper | null | undefined>, + iteratee?: ListIterator + ): this; - interface LoDashImplicitObjectWrapperBase { /** * @see _.forEach */ - each( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEach - */ - each( - iteratee: StringIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forEach - */ - each( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; + each( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.eachRight interface LoDashStatic { - eachRight: typeof _.forEachRight; + eachRight: typeof _.forEachRight; // tslint:disable-line:no-unnecessary-qualifier } - interface LoDashImplicitWrapper { + interface LoDashWrapper { + /** + * @see _.forEachRight + */ + eachRight( + this: LoDashWrapper, + iteratee?: ArrayIterator + ): this; + /** * @see _.forEachRight */ eachRight( - iteratee: StringIterator - ): LoDashImplicitWrapper; - } + this: LoDashWrapper, + iteratee?: StringIterator + ): this; - interface LoDashImplicitArrayWrapperBase { /** * @see _.forEachRight */ - eachRight( - iteratee: ListIterator - ): TWrapper; - } + eachRight( + this: LoDashWrapper | null | undefined>, + iteratee?: ListIterator + ): this; - interface LoDashImplicitObjectWrapperBase { /** * @see _.forEachRight */ - eachRight( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEachRight - */ - eachRight( - iteratee: StringIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forEachRight - */ - eachRight( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; + eachRight( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.every @@ -6591,15 +4301,7 @@ declare namespace _ { */ every( collection: List | null | undefined, - predicate?: ListIterator - ): boolean; - - /** - * @see _.every - */ - every( - collection: Dictionary | null | undefined, - predicate?: DictionaryIterator + predicate?: ListIteratee ): boolean; /** @@ -6607,107 +4309,67 @@ declare namespace _ { */ every( collection: NumericDictionary | null | undefined, - predicate?: NumericDictionaryIterator + predicate?: NumericDictionaryIteratee + ): boolean; + + /** + * @see _.every + */ + every( + collection: T | null | undefined, + predicate?: ObjectIteratee + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.every + */ + every( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): boolean; + + /** + * @see _.every + */ + every( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee ): boolean; /** * @see _.every */ every( - collection: List|Dictionary|NumericDictionary | null | undefined, - predicate?: string|any[]|PartialObject + this: LoDashImplicitWrapper | null | undefined>, + predicate?: NumericDictionaryIteratee ): boolean; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.every */ - every( - predicate?: ListIterator|NumericDictionaryIterator - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: string|any[] - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: PartialObject - ): boolean; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.every - */ - every( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: string|any[] - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: PartialObject - ): boolean; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.every - */ - every( - predicate?: ListIterator|NumericDictionaryIterator + every( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee ): LoDashExplicitWrapper; /** * @see _.every */ - every( - predicate?: string|any[] + every( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee ): LoDashExplicitWrapper; /** * @see _.every */ - every( - predicate?: PartialObject - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.every - */ - every( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - every( - predicate?: string|any[] - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - every( - predicate?: PartialObject + every( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: NumericDictionaryIteratee ): LoDashExplicitWrapper; } @@ -6731,132 +4393,126 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the new filtered array. */ - filter( - collection: List | null | undefined, - predicate: ListIteratorTypeGuard - ): S[]; - - /** - * @see _.filter - */ - filter( - collection: List | null | undefined, - predicate?: ListIterator - ): T[]; - - /** - * @see _.filter - */ - filter( - collection: Dictionary | null | undefined, - predicate: DictionaryIteratorTypeGuard - ): S[]; - - /** - * @see _.filter - */ - filter( - collection: Dictionary | null | undefined, - predicate?: DictionaryIterator - ): T[]; - - /** - * @see _.filter - */ filter( collection: string | null | undefined, - predicate?: StringIterator + predicate?: StringIterator ): string[]; + /** + * @see _.filter + */ + filter( + collection: List | null | undefined, + predicate: ListIteratorTypeGuard + ): S[]; + /** * @see _.filter */ filter( - collection: List|Dictionary | null | undefined, - predicate: string | [string, any] | RegExp | PartialObject + collection: List | null | undefined, + predicate?: ListIteratee ): T[]; + + /** + * @see _.filter + */ + filter( + collection: T | null | undefined, + predicate: ObjectIteratorTypeGuard + ): S[]; + + /** + * @see _.filter + */ + filter( + collection: T | null | undefined, + predicate?: ObjectIteratee + ): Array; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.filter */ filter( - predicate?: StringIterator - ): LoDashImplicitArrayWrapper; - } + this: LoDashImplicitWrapper, + predicate?: StringIterator + ): LoDashImplicitWrapper; - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.filter - */ - filter( - predicate: ListIteratorTypeGuard - ): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - */ - filter( - predicate: ListIterator | string | [string, any] | RegExp | PartialObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { /** * @see _.filter */ filter( + this: LoDashImplicitWrapper | null | undefined>, predicate: ListIteratorTypeGuard - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; /** * @see _.filter */ filter( - predicate: ListIterator | DictionaryIterator | string | [string, any] | RegExp | PartialObject - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.filter + */ + filter( + this: LoDashImplicitWrapper, + predicate: ObjectIteratorTypeGuard + ): LoDashImplicitWrapper; + + /** + * @see _.filter + */ + filter( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee + ): LoDashImplicitWrapper>; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.filter */ filter( - predicate?: StringIterator - ): LoDashExplicitArrayWrapper; - } + this: LoDashExplicitWrapper, + predicate?: StringIterator + ): LoDashExplicitWrapper; - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.filter - */ - filter( - predicate: ListIteratorTypeGuard - ): LoDashExplicitArrayWrapper; - - /** - * @see _.filter - */ - filter( - predicate: ListIterator | string | [string, any] | RegExp | PartialObject - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { /** * @see _.filter */ filter( + this: LoDashExplicitWrapper | null | undefined>, predicate: ListIteratorTypeGuard - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; /** * @see _.filter */ filter( - predicate: ListIterator | DictionaryIterator | string | [string, any] | RegExp | PartialObject - ): LoDashExplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; + + /** + * @see _.filter + */ + filter( + this: LoDashExplicitWrapper, + predicate: ObjectIteratorTypeGuard + ): LoDashExplicitWrapper; + + /** + * @see _.filter + */ + filter( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee + ): LoDashExplicitWrapper>; } //_.find @@ -6890,43 +4546,35 @@ declare namespace _ { */ find( collection: List | null | undefined, - predicate?: ListIterator, + predicate?: ListIteratee, fromIndex?: number ): T|undefined; /** * @see _.find */ - find( - collection: Dictionary | null | undefined, - predicate: DictionaryIteratorTypeGuard, + find( + collection: T | null | undefined, + predicate: ObjectIteratorTypeGuard, fromIndex?: number ): S|undefined; /** * @see _.find */ - find( - collection: Dictionary | null | undefined, - predicate?: DictionaryIterator, + find( + collection: T | null | undefined, + predicate?: ObjectIteratee, fromIndex?: number - ): T|undefined; - - /** - * @see _.find - */ - find( - collection: List|Dictionary | null | undefined, - predicate?: string | PartialObject | [string, any], - fromIndex?: number - ): T|undefined; + ): T[keyof T]|undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.find */ - find( + find( + this: LoDashImplicitWrapper | null | undefined>, predicate: ListIteratorTypeGuard, fromIndex?: number ): S|undefined; @@ -6934,30 +4582,67 @@ declare namespace _ { /** * @see _.find */ - find( - predicate?: ListIterator | string | PartialObject | [string, any], + find( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee, fromIndex?: number ): T|undefined; - } - interface LoDashImplicitObjectWrapperBase { /** * @see _.find */ - find( - predicate?: ListIterator | DictionaryIterator | string | PartialObject | [string, any], + find( + this: LoDashImplicitWrapper, + predicate: ObjectIteratorTypeGuard, fromIndex?: number - ): TResult|undefined; - } + ): S|undefined; - interface LoDashExplicitWrapperBase { /** * @see _.find */ - find( - predicate?: ListIterator | string | PartialObject | [string, any], + find( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee, fromIndex?: number - ): any; + ): T[keyof T]|undefined; + } + + interface LoDashExplicitWrapper { + /** + * @see _.find + */ + find( + this: LoDashExplicitWrapper | null | undefined>, + predicate: ListIteratorTypeGuard, + fromIndex?: number + ): LoDashExplicitWrapper; + + /** + * @see _.find + */ + find( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee, + fromIndex?: number + ): LoDashExplicitWrapper; + + /** + * @see _.find + */ + find( + this: LoDashExplicitWrapper, + predicate: ObjectIteratorTypeGuard, + fromIndex?: number + ): LoDashExplicitWrapper; + + /** + * @see _.find + */ + find( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee, + fromIndex?: number + ): LoDashExplicitWrapper; } //_.findLast @@ -6981,74 +4666,103 @@ declare namespace _ { */ findLast( collection: List | null | undefined, - predicate?: ListIterator, + predicate?: ListIteratee, fromIndex?: number ): T|undefined; + /** + * @see _.findLast + */ + findLast( + collection: T | null | undefined, + predicate: ObjectIteratorTypeGuard, + fromIndex?: number + ): S|undefined; + + /** + * @see _.findLast + */ + findLast( + collection: T | null | undefined, + predicate?: ObjectIteratee, + fromIndex?: number + ): T[keyof T]|undefined; + } + + interface LoDashImplicitWrapper { /** * @see _.findLast */ findLast( - collection: Dictionary | null | undefined, - predicate: DictionaryIteratorTypeGuard, - fromIndex?: number - ): S|undefined; - - /** - * @see _.findLast - */ - findLast( - collection: Dictionary | null | undefined, - predicate?: DictionaryIterator, - fromIndex?: number - ): T|undefined; - - /** - * @see _.findLast - */ - findLast( - collection: List|Dictionary | null | undefined, - predicate?: string | PartialObject | [string, any], - fromIndex?: number - ): T|undefined; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.findLast - */ - findLast( + this: LoDashImplicitWrapper | null | undefined>, predicate: ListIteratorTypeGuard, fromIndex?: number + ): S | undefined; + + /** + * @see _.findLast + */ + findLast( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee, + fromIndex?: number + ): T | undefined; + + /** + * @see _.findLast + */ + findLast( + this: LoDashImplicitWrapper, + predicate: ObjectIteratorTypeGuard, + fromIndex?: number ): S|undefined; /** * @see _.findLast */ - findLast( - predicate?: ListIterator | string | PartialObject | [string, any], + findLast( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee, fromIndex?: number - ): T|undefined; + ): T[keyof T]|undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.findLast */ - findLast( - predicate?: ListIterator | DictionaryIterator | string | PartialObject | [string, any], + findLast( + this: LoDashExplicitWrapper | null | undefined>, + predicate: ListIteratorTypeGuard, fromIndex?: number - ): TResult|undefined; - } + ): LoDashExplicitWrapper; - interface LoDashExplicitWrapperBase { /** * @see _.findLast */ - findLast( - predicate?: ListIterator | string | PartialObject | [string, any], + findLast( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee, fromIndex?: number - ): any; + ): LoDashExplicitWrapper; + + /** + * @see _.findLast + */ + findLast( + this: LoDashExplicitWrapper, + predicate: ObjectIteratorTypeGuard, + fromIndex?: number + ): LoDashExplicitWrapper; + + /** + * @see _.findLast + */ + findLast( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee, + fromIndex?: number + ): LoDashExplicitWrapper; } //_.flatMap @@ -7071,15 +4785,7 @@ declare namespace _ { */ flatMap( collection: List | null | undefined, - iteratee: ListIterator> | string - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Dictionary | null | undefined, - iteratee: DictionaryIterator> | string + iteratee: ListIterator> ): TResult[]; /** @@ -7087,17 +4793,25 @@ declare namespace _ { */ flatMap( collection: NumericDictionary | null | undefined, - iteratee: NumericDictionaryIterator> | string + iteratee: NumericDictionaryIterator> ): TResult[]; /** * @see _.flatMap */ - flatMap( - collection: object | null | undefined, - iteratee?: ObjectIterator> | string + flatMap( + collection: T | null | undefined, + iteratee: ObjectIterator> ): TResult[]; + /** + * @see _.flatMap + */ + flatMap( + collection: object | null | undefined, + iteratee: string + ): any[]; + /** * @see _.flatMap */ @@ -7107,130 +4821,94 @@ declare namespace _ { ): boolean[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.flatMap */ - flatMap( - iteratee: StringIterator> - ): LoDashImplicitArrayWrapper; + flatMap(this: LoDashImplicitWrapper> | Dictionary> | NumericDictionary> | null | undefined>): LoDashImplicitWrapper; - /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator>|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { /** * @see _.flatMap */ flatMap( - iteratee: ListIterator>|DictionaryIterator>|NumericDictionaryIterator> - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + iteratee: ListIterator> + ): LoDashImplicitWrapper; /** * @see _.flatMap */ - flatMap( - iteratee: ObjectIterator>|string - ): LoDashImplicitArrayWrapper; + flatMap( + this: LoDashImplicitWrapper, + iteratee: ObjectIterator> + ): LoDashImplicitWrapper; - /** - * @see _.flatMap - */ - flatMap( - iteratee: object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: StringIterator> - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator>|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: object - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { /** * @see _.flatMap */ flatMap( - iteratee: ListIterator>|DictionaryIterator>|NumericDictionaryIterator> - ): LoDashExplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + iteratee: NumericDictionaryIterator> + ): LoDashImplicitWrapper; /** * @see _.flatMap */ - flatMap( - iteratee: ObjectIterator>|string - ): LoDashExplicitArrayWrapper; + flatMap( + iteratee: string + ): LoDashImplicitWrapper; /** * @see _.flatMap */ flatMap( iteratee: object - ): LoDashExplicitArrayWrapper; + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flatMap + */ + flatMap(this: LoDashExplicitWrapper> | Dictionary> | NumericDictionary> | null | undefined>): LoDashExplicitWrapper; /** * @see _.flatMap */ - flatMap(): LoDashExplicitArrayWrapper; + flatMap( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: ListIterator> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMap + */ + flatMap( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: NumericDictionaryIterator> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMap + */ + flatMap( + this: LoDashExplicitWrapper, + iteratee: ObjectIterator> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: object + ): LoDashExplicitWrapper; } //_.flatMapDeep @@ -7256,7 +4934,7 @@ declare namespace _ { * // => [1, 1, 2, 2] */ flatMapDeep( - collection: List> | Dictionary> | NumericDictionary> | null | undefined + collection: List | T> | Dictionary | T> | NumericDictionary | T> | null | undefined ): T[]; /** @@ -7264,15 +4942,7 @@ declare namespace _ { */ flatMapDeep( collection: List | null | undefined, - iteratee: ListIterator> | string - ): TResult[]; - - /** - * @see _.flatMapDeep - */ - flatMapDeep( - collection: Dictionary | null | undefined, - iteratee: DictionaryIterator> | string + iteratee: ListIterator | TResult> ): TResult[]; /** @@ -7280,17 +4950,25 @@ declare namespace _ { */ flatMapDeep( collection: NumericDictionary | null | undefined, - iteratee: NumericDictionaryIterator> | string + iteratee: NumericDictionaryIterator | TResult> ): TResult[]; /** * @see _.flatMapDeep */ - flatMapDeep( - collection: object | null | undefined, - iteratee?: ObjectIterator> | string + flatMapDeep( + collection: T | null | undefined, + iteratee: ObjectIterator | TResult> ): TResult[]; + /** + * @see _.flatMapDeep + */ + flatMapDeep( + collection: object | null | undefined, + iteratee: string + ): any[]; + /** * @see _.flatMapDeep */ @@ -7300,130 +4978,102 @@ declare namespace _ { ): boolean[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.flatMapDeep */ - flatMapDeep( - iteratee: StringIterator> - ): LoDashImplicitArrayWrapper; + flatMapDeep( + this: LoDashImplicitWrapper | T> | Dictionary | T> | NumericDictionary | T> | null | undefined> + ): LoDashImplicitWrapper; - /** - * @see _.flatMapDeep - */ - flatMapDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.flatMapDeep - */ - flatMapDeep( - iteratee: ListIterator>|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDeep - */ - flatMapDeep( - iteratee: object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDeep - */ - flatMapDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { /** * @see _.flatMapDeep */ flatMapDeep( - iteratee: ListIterator>|DictionaryIterator>|NumericDictionaryIterator> - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + iteratee: ListIterator | TResult> + ): LoDashImplicitWrapper; - /** - * @see _.flatMapDeep - */ - flatMapDeep( - iteratee: ObjectIterator>|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDeep - */ - flatMapDeep( - iteratee: object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDeep - */ - flatMapDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flatMapDeep - */ - flatMapDeep( - iteratee: StringIterator> - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMapDeep - */ - flatMapDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.flatMapDeep - */ - flatMapDeep( - iteratee: ListIterator>|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMapDeep - */ - flatMapDeep( - iteratee: object - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMapDeep - */ - flatMapDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { /** * @see _.flatMapDeep */ flatMapDeep( - iteratee: ListIterator>|DictionaryIterator>|NumericDictionaryIterator> - ): LoDashExplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + iteratee: NumericDictionaryIterator | TResult> + ): LoDashImplicitWrapper; /** * @see _.flatMapDeep */ - flatMapDeep( - iteratee: ObjectIterator>|string - ): LoDashExplicitArrayWrapper; + flatMapDeep( + this: LoDashImplicitWrapper, + iteratee: ObjectIterator | TResult> + ): LoDashImplicitWrapper; /** * @see _.flatMapDeep */ flatMapDeep( - iteratee: object - ): LoDashExplicitArrayWrapper; + this: LoDashImplicitWrapper, + iteratee: string + ): LoDashImplicitWrapper; /** * @see _.flatMapDeep */ - flatMapDeep(): LoDashExplicitArrayWrapper; + flatMapDeep( + this: LoDashImplicitWrapper, + iteratee: object + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flatMapDeep + */ + flatMapDeep( + this: LoDashExplicitWrapper | T> | Dictionary | T> | NumericDictionary | T> | null | undefined> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDeep + */ + flatMapDeep( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: ListIterator | TResult> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDeep + */ + flatMapDeep( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: NumericDictionaryIterator | TResult> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDeep + */ + flatMapDeep( + this: LoDashExplicitWrapper, + iteratee: ObjectIterator | TResult> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDeep + */ + flatMapDeep( + this: LoDashExplicitWrapper, + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDeep + */ + flatMapDeep( + this: LoDashExplicitWrapper, + iteratee: object + ): LoDashExplicitWrapper; } //_.flatMapDepth @@ -7450,8 +5100,7 @@ declare namespace _ { * // => [[1, 1], [2, 2]] */ flatMapDepth( - collection: List> | Dictionary> | NumericDictionary> | null | undefined, - depth?: number + collection: List | T> | Dictionary | T> | NumericDictionary | T> | null | undefined ): T[]; /** @@ -7459,16 +5108,7 @@ declare namespace _ { */ flatMapDepth( collection: List | null | undefined, - iteratee: ListIterator> | string, - depth?: number - ): TResult[]; - - /** - * @see _.flatMapDepth - */ - flatMapDepth( - collection: Dictionary | null | undefined, - iteratee: DictionaryIterator> | string, + iteratee: ListIterator | TResult>, depth?: number ): TResult[]; @@ -7477,19 +5117,28 @@ declare namespace _ { */ flatMapDepth( collection: NumericDictionary | null | undefined, - iteratee: NumericDictionaryIterator> | string, + iteratee: NumericDictionaryIterator | TResult>, depth?: number ): TResult[]; /** * @see _.flatMapDepth */ - flatMapDepth( - collection: object | null | undefined, - iteratee?: ObjectIterator> | string, + flatMapDepth( + collection: T | null | undefined, + iteratee: ObjectIterator | TResult>, depth?: number ): TResult[]; + /** + * @see _.flatMapDepth + */ + flatMapDepth( + collection: object | null | undefined, + iteratee: string, + depth?: number + ): any[]; + /** * @see _.flatMapDepth */ @@ -7500,142 +5149,112 @@ declare namespace _ { ): boolean[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.flatMapDepth */ - flatMapDepth( - iteratee: StringIterator>, - depth?: number - ): LoDashImplicitArrayWrapper; + flatMapDepth( + this: LoDashImplicitWrapper | T> | Dictionary | T> | NumericDictionary | T> | null | undefined> + ): LoDashImplicitWrapper; - /** - * @see _.flatMapDepth - */ - flatMapDepth(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.flatMapDepth - */ - flatMapDepth( - iteratee: ListIterator>|string, - depth?: number - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDepth - */ - flatMapDepth( - iteratee: object, - depth?: number - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDepth - */ - flatMapDepth(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { /** * @see _.flatMapDepth */ flatMapDepth( - iteratee: ListIterator>|DictionaryIterator>|NumericDictionaryIterator>, + this: LoDashImplicitWrapper | null | undefined>, + iteratee: ListIterator | TResult>, depth?: number - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; - /** - * @see _.flatMapDepth - */ - flatMapDepth( - iteratee: ObjectIterator>|string, - depth?: number - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDepth - */ - flatMapDepth( - iteratee: object, - depth?: number - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMapDepth - */ - flatMapDepth(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flatMapDepth - */ - flatMapDepth( - iteratee: StringIterator>, - depth?: number - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMapDepth - */ - flatMapDepth(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.flatMapDepth - */ - flatMapDepth( - iteratee: ListIterator>|string, - depth?: number - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMapDepth - */ - flatMapDepth( - iteratee: object, - depth?: number - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMapDepth - */ - flatMapDepth(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { /** * @see _.flatMapDepth */ flatMapDepth( - iteratee: ListIterator>|DictionaryIterator>|NumericDictionaryIterator>, + this: LoDashImplicitWrapper | null | undefined>, + iteratee: NumericDictionaryIterator | TResult>, depth?: number - ): LoDashExplicitArrayWrapper; + ): LoDashImplicitWrapper; /** * @see _.flatMapDepth */ - flatMapDepth( - iteratee: ObjectIterator>|string, + flatMapDepth( + this: LoDashImplicitWrapper, + iteratee: ObjectIterator | TResult>, depth?: number - ): LoDashExplicitArrayWrapper; + ): LoDashImplicitWrapper; /** * @see _.flatMapDepth */ flatMapDepth( - iteratee: object, + this: LoDashImplicitWrapper, + iteratee: string, depth?: number - ): LoDashExplicitArrayWrapper; + ): LoDashImplicitWrapper; /** * @see _.flatMapDepth */ - flatMapDepth(): LoDashExplicitArrayWrapper; + flatMapDepth( + this: LoDashImplicitWrapper, + iteratee: object, + depth?: number + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flatMapDepth + */ + flatMapDepth( + this: LoDashExplicitWrapper | T> | Dictionary | T> | NumericDictionary | T> | null | undefined> + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDepth + */ + flatMapDepth( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: ListIterator | TResult>, + depth?: number + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDepth + */ + flatMapDepth( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: NumericDictionaryIterator | TResult>, + depth?: number + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDepth + */ + flatMapDepth( + this: LoDashExplicitWrapper, + iteratee: ObjectIterator | TResult>, + depth?: number + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDepth + */ + flatMapDepth( + this: LoDashExplicitWrapper, + iteratee: string, + depth?: number + ): LoDashExplicitWrapper; + + /** + * @see _.flatMapDepth + */ + flatMapDepth( + this: LoDashExplicitWrapper, + iteratee: object, + depth?: number + ): LoDashExplicitWrapper; } //_.forEach @@ -7654,6 +5273,46 @@ declare namespace _ { * @param iteratee The function invoked per iteration. * @param thisArg The this binding of iteratee. */ + forEach( + collection: T[], + iteratee?: ArrayIterator + ): T[]; + + /** + * @see _.forEach + */ + forEach( + collection: string, + iteratee?: StringIterator + ): string; + + /** + * @see _.forEach + */ + forEach( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEach + */ + forEach( + collection: TArray & (T[] | null | undefined), + iteratee?: ArrayIterator + ): TArray; + + /** + * @see _.forEach + */ forEach( collection: TString, iteratee?: StringIterator @@ -7670,72 +5329,44 @@ declare namespace _ { /** * @see _.forEach */ - forEach | null | undefined>( - collection: TDictionary & (Dictionary | null | undefined), - iteratee?: DictionaryIterator - ): TDictionary; + forEach( + collection: T | null | undefined, + iteratee?: ObjectIterator + ): T | null | undefined; + } + interface LoDashWrapper { /** * @see _.forEach */ - forEach( - collection: T, - iteratee?: ObjectIterator - ): T; - } + forEach( + this: LoDashWrapper, + iteratee?: ArrayIterator + ): this; - interface LoDashImplicitWrapper { /** * @see _.forEach */ forEach( - iteratee: StringIterator - ): LoDashImplicitWrapper; - } + this: LoDashWrapper, + iteratee?: StringIterator + ): this; - interface LoDashImplicitArrayWrapperBase { /** * @see _.forEach */ - forEach( - iteratee: ListIterator - ): TWrapper; - } + forEach( + this: LoDashWrapper | null | undefined>, + iteratee?: ListIterator + ): this; - interface LoDashImplicitObjectWrapperBase { /** * @see _.forEach */ - forEach( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: StringIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forEach - */ - forEach( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; + forEach( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.forEachRight @@ -7749,6 +5380,46 @@ declare namespace _ { * @param iteratee The function called per iteration. * @param thisArg The this binding of callback. */ + forEachRight( + collection: T[], + iteratee?: ArrayIterator + ): T[]; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: string, + iteratee?: StringIterator + ): string; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: TArray & (T[] | null | undefined), + iteratee?: ArrayIterator + ): TArray; + + /** + * @see _.forEachRight + */ forEachRight( collection: TString, iteratee?: StringIterator @@ -7765,72 +5436,44 @@ declare namespace _ { /** * @see _.forEachRight */ - forEachRight | null | undefined>( - collection: TDictionary & (Dictionary | null | undefined), - iteratee?: DictionaryIterator - ): TDictionary; + forEachRight( + collection: T | null | undefined, + iteratee?: ObjectIterator + ): T | null | undefined; + } + interface LoDashWrapper { /** * @see _.forEachRight */ - forEachRight( - collection: T, - iteratee?: ObjectIterator - ): T; - } + forEachRight( + this: LoDashWrapper, + iteratee?: ArrayIterator + ): this; - interface LoDashImplicitWrapper { /** * @see _.forEachRight */ forEachRight( - iteratee: StringIterator - ): LoDashImplicitWrapper; - } + this: LoDashWrapper, + iteratee?: StringIterator + ): this; - interface LoDashImplicitArrayWrapperBase { /** * @see _.forEachRight */ - forEachRight( - iteratee: ListIterator - ): TWrapper; - } + forEachRight( + this: LoDashWrapper | null | undefined>, + iteratee?: ListIterator + ): this; - interface LoDashImplicitObjectWrapperBase { /** * @see _.forEachRight */ - forEachRight( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: StringIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee?: ListIterator|DictionaryIterator - ): TWrapper; + forEachRight( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.groupBy @@ -7855,226 +5498,102 @@ declare namespace _ { * @param thisArg The this binding of iteratee. * @return Returns the composed aggregate object. */ - groupBy( - collection: TString, - iteratee?: StringIterator - ): Dictionary; + groupBy( + collection: string | null | undefined, + iteratee?: StringIterator + ): Dictionary; /** * @see _.groupBy */ - groupBy( + groupBy( collection: List | null | undefined, - iteratee?: ListIterator + iteratee?: ListIteratee ): Dictionary; /** * @see _.groupBy */ groupBy( - collection: List | null | undefined, - iteratee?: ListIterator + collection: NumericDictionary | null | undefined, + iteratee?: NumericDictionaryIteratee ): Dictionary; /** * @see _.groupBy */ - groupBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary | null | undefined, - iteratee?: string - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary | null | undefined, - iteratee?: string - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary | null | undefined, - iteratee?: TWhere - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary | null | undefined, - iteratee?: Object - ): Dictionary; + groupBy( + collection: T | null | undefined, + iteratee?: ObjectIteratee + ): Dictionary>; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.groupBy */ - groupBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; + groupBy( + this: LoDashImplicitWrapper, + iteratee?: StringIterator + ): LoDashImplicitWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashImplicitWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + this: LoDashImplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashImplicitWrapper>>; + + /** + * @see _.groupBy + */ + groupBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIteratee + ): LoDashImplicitWrapper>; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.groupBy */ - groupBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; + groupBy( + this: LoDashExplicitWrapper, + iteratee?: StringIterator + ): LoDashExplicitWrapper>; /** * @see _.groupBy */ groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashExplicitWrapper>; /** * @see _.groupBy */ groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIteratee + ): LoDashExplicitWrapper>; /** * @see _.groupBy */ - groupBy( - iteratee?: TWhere - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: Object - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: Object - ): LoDashExplicitObjectWrapper>; + groupBy( + this: LoDashExplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashExplicitWrapper>>; } //_.includes @@ -8093,77 +5612,30 @@ declare namespace _ { target: T, fromIndex?: number ): boolean; - - /** - * @see _.includes - */ - includes( - collection: string | null | undefined, - target: string, - fromIndex?: number - ): boolean; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.includes */ - includes( + includes( + this: LoDashImplicitWrapper | Dictionary | null | undefined>, target: T, fromIndex?: number ): boolean; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.includes */ - includes( - target: TValue, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.includes - */ - includes( - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.includes - */ - includes( + includes( + this: LoDashExplicitWrapper | Dictionary | null | undefined>, target: T, fromIndex?: number ): LoDashExplicitWrapper; } - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.includes - */ - includes( - target: TValue, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.includes - */ - includes( - target: string, - fromIndex?: number - ): LoDashExplicitWrapper; - } - //_.keyBy interface LoDashStatic { /** @@ -8188,190 +5660,76 @@ declare namespace _ { */ keyBy( collection: List | null | undefined, - iteratee?: ListIterator + iteratee?: ListIteratee ): Dictionary; + /** + * @see _.keyBy + */ + keyBy( + collection: T | null | undefined, + iteratee?: ObjectIteratee + ): Dictionary; + /** * @see _.keyBy */ keyBy( collection: NumericDictionary | null | undefined, - iteratee?: NumericDictionaryIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary | null | undefined, - iteratee?: string - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary | null | undefined, - iteratee?: W - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary | null | undefined, - iteratee?: Object + iteratee?: NumericDictionaryIteratee ): Dictionary; } - interface LoDashImplicitStringWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: StringIterator | undefined - ): LoDashImplicitObjectWrapper> - } - - interface LoDashExplicitStringWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: StringIterator | undefined - ): LoDashExplicitObjectWrapper> - } - - interface LoDashImplicitWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.keyBy */ keyBy( - iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashImplicitWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + this: LoDashImplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashImplicitWrapper>; /** * @see _.keyBy */ keyBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: Object - ): LoDashImplicitObjectWrapper>; + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIteratee + ): LoDashImplicitWrapper>; } - interface LoDashExplicitWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.keyBy */ keyBy( - iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashExplicitWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + this: LoDashExplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashExplicitWrapper>; /** * @see _.keyBy */ keyBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: Object - ): LoDashExplicitObjectWrapper>; + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIteratee + ): LoDashExplicitWrapper>; } //_.invoke @@ -8382,62 +5740,28 @@ declare namespace _ { * @param path The path of the method to invoke. * @param args The arguments to invoke the method with. **/ - invoke( - object: TObject, - path: Many, - ...args: any[]): TResult; - - /** - * @see _.invoke - **/ - invoke( - object: Dictionary|TValue[], - path: Many, - ...args: any[]): TResult; - - /** - * @see _.invoke - **/ - invoke( + invoke( object: any, path: Many, - ...args: any[]): TResult; + ...args: any[]): any; } - interface LoDashImplicitArrayWrapper { + interface LoDashImplicitWrapper { /** * @see _.invoke **/ - invoke( + invoke( path: Many, - ...args: any[]): TResult; + ...args: any[]): any; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.invoke **/ - invoke( + invoke( path: Many, - ...args: any[]): TResult; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invoke - **/ - invoke( - path: Many, - ...args: any[]): TResult; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invoke - **/ - invoke( - path: Many, - ...args: any[]): TResult; + ...args: any[]): LoDashExplicitWrapper; } //_.invokeMap @@ -8451,130 +5775,50 @@ declare namespace _ { * @param methodName The name of the method to invoke. * @param args Arguments to invoke the method with. **/ - invokeMap( - collection: TValue[] | null | undefined, + invokeMap( + collection: object | null | undefined, methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary | null | undefined, - methodName: string, - ...args: any[]): TResult[]; + ...args: any[]): any[]; /** * @see _.invokeMap **/ invokeMap( - collection: Array<{}> | null | undefined, - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary<{}> | null | undefined, - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: TValue[] | null | undefined, - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary | null | undefined, - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Array<{}> | null | undefined, - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary<{}> | null | undefined, + collection: object | null | undefined, method: (...args: any[]) => TResult, ...args: any[]): TResult[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.invokeMap **/ - invokeMap( + invokeMap( methodName: string, - ...args: any[]): LoDashImplicitArrayWrapper; + ...args: any[]): LoDashImplicitWrapper; /** * @see _.invokeMap **/ invokeMap( method: (...args: any[]) => TResult, - ...args: any[]): LoDashImplicitArrayWrapper; + ...args: any[]): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.invokeMap **/ - invokeMap( + invokeMap( methodName: string, - ...args: any[]): LoDashImplicitArrayWrapper; + ...args: any[]): LoDashExplicitWrapper; /** * @see _.invokeMap **/ invokeMap( method: (...args: any[]) => TResult, - ...args: any[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashExplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashExplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashExplicitArrayWrapper; + ...args: any[]): LoDashExplicitWrapper; } //_.map @@ -8613,33 +5857,28 @@ declare namespace _ { /** * @see _.map */ - map(collection: List | null | undefined): T[]; + map(collection: List | Dictionary | null | undefined): T[]; /** * @see _.map */ - map( + map( collection: Dictionary | null | undefined, iteratee: DictionaryIterator ): TResult[]; /** @see _.map */ map( - collection: Dictionary | null | undefined, + collection: List | Dictionary | null | undefined, iteratee: K - ): T[K][]; + ): Array; /** @see _.map */ - map(collection: Dictionary | null | undefined): T[]; - - map( + map( collection: NumericDictionary | null | undefined, iteratee?: NumericDictionaryIterator ): TResult[]; - /** @see _.map */ - map(collection: List | null | undefined, iteratee: K): T[K][]; - /** * @see _.map */ @@ -8651,125 +5890,114 @@ declare namespace _ { /** * @see _.map */ - map( + map( collection: List|Dictionary|NumericDictionary | null | undefined, - iteratee?: TObject + iteratee?: object ): boolean[]; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.map */ - map( + map( + this: LoDashImplicitWrapper | null | undefined>, iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; /** * @see _.map */ - map(): LoDashImplicitArrayWrapper; + map(this: LoDashImplicitWrapper | Dictionary | null | undefined>): LoDashImplicitWrapper; + + /** + * @see _.map + */ + map( + this: LoDashImplicitWrapper | null | undefined>, + iteratee: DictionaryIterator + ): LoDashImplicitWrapper; /** @see _.map */ - map(iteratee: K): LoDashImplicitArrayWrapper; + map( + this: LoDashImplicitWrapper | Dictionary | null | undefined>, + iteratee: K + ): LoDashImplicitWrapper>; + + /** @see _.map */ + map( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIterator + ): LoDashImplicitWrapper; /** * @see _.map */ - map( - iteratee: string - ): LoDashImplicitArrayWrapper; + map( + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, + iteratee?: string + ): LoDashImplicitWrapper; /** * @see _.map */ - map( - iteratee: TObject - ): LoDashImplicitArrayWrapper; + map( + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, + iteratee?: object + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.map */ - map( - iteratee: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** @see _.map */ - map(): LoDashImplicitArrayWrapper; - - /** @see _.map */ - map(iteratee: K): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee: TObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.map - */ - map( + map( + this: LoDashExplicitWrapper | null | undefined>, iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; + + /** + * @see _.map + */ + map(this: LoDashExplicitWrapper | Dictionary | null | undefined>): LoDashExplicitWrapper; + + /** + * @see _.map + */ + map( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: DictionaryIterator + ): LoDashExplicitWrapper; /** @see _.map */ - map(): LoDashExplicitArrayWrapper; - - /** @see _.map */ - map(iteratee: K): LoDashExplicitArrayWrapper; + map( + this: LoDashExplicitWrapper | Dictionary | null | undefined>, + iteratee: K + ): LoDashExplicitWrapper>; /** * @see _.map */ - map( - iteratee: string - ): LoDashExplicitArrayWrapper; + map( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: NumericDictionaryIterator + ): LoDashExplicitWrapper; /** * @see _.map */ - map( - iteratee: TObject - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.map - */ - map( - iteratee: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** @see _.map */ - map(): LoDashExplicitArrayWrapper; + map( + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, + iteratee?: string + ): LoDashExplicitWrapper; /** * @see _.map */ - map( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee: TObject - ): LoDashExplicitArrayWrapper; + map( + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, + iteratee?: object + ): LoDashExplicitWrapper; } //_.partition @@ -8795,123 +6023,52 @@ declare namespace _ { **/ partition( collection: List | null | undefined, - callback: ListIterator): T[][]; + callback: ValueIteratee + ): T[][]; /** * @see _.partition - **/ - partition( - collection: Dictionary | null | undefined, - callback: DictionaryIterator): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List | null | undefined, - whereValue: W): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary | null | undefined, - whereValue: W): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List | null | undefined, - path: string, - srcValue: any): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary | null | undefined, - path: string, - srcValue: any): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List | null | undefined, - pluckValue: string): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary | null | undefined, - pluckValue: string): T[][]; + */ + partition( + collection: T | null | undefined, + callback: ValueIteratee + ): Array>; } - interface LoDashImplicitStringWrapper { + interface LoDashImplicitWrapper { /** * @see _.partition */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; + partition( + this: LoDashImplicitWrapper | null | undefined>, + callback: ValueIteratee + ): LoDashImplicitWrapper; + + /** + * @see _.partition + */ + partition( + this: LoDashImplicitWrapper, + callback: ValueIteratee + ): LoDashImplicitWrapper>>; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.partition */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - whereValue: W): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - path: string, - srcValue: any): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - pluckValue: string): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.partition - */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; + partition( + this: LoDashExplicitWrapper | null | undefined>, + callback: ValueIteratee + ): LoDashExplicitWrapper; /** * @see _.partition */ - partition( - callback: DictionaryIterator): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - path: string, - srcValue: any): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - pluckValue: string): LoDashImplicitArrayWrapper; + partition( + this: LoDashExplicitWrapper, + callback: ValueIteratee + ): LoDashExplicitWrapper>>; } //_.reduce @@ -8925,125 +6082,212 @@ declare namespace _ { * @param collection The collection to iterate over. * @param callback The function called per iteration. * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. * @return Returns the accumulated value. **/ reduce( collection: T[] | null | undefined, - callback: MemoIterator, - accumulator: TResult): TResult; + callback: MemoListIterator, + accumulator: TResult + ): TResult; /** - * @see _.reduce - **/ + * @see _.reduce + **/ reduce( collection: List | null | undefined, - callback: MemoIterator, - accumulator: TResult): TResult; + callback: MemoListIterator>, + accumulator: TResult + ): TResult; /** - * @see _.reduce - **/ - reduce( - collection: Dictionary | null | undefined, - callback: MemoIterator, - accumulator: TResult): TResult; + * @see _.reduce + **/ + reduce( + collection: T | null | undefined, + callback: MemoObjectIterator, + accumulator: TResult + ): TResult; /** - * @see _.reduce - **/ + * @see _.reduce + **/ reduce( collection: NumericDictionary | null | undefined, - callback: MemoIterator, - accumulator: TResult): TResult; + callback: MemoListIterator>, + accumulator: TResult + ): TResult; /** - * @see _.reduce - **/ + * @see _.reduce + **/ reduce( collection: T[] | null | undefined, - callback: MemoIterator): TResult | undefined; + callback: MemoListIterator + ): TResult | undefined; /** * @see _.reduce **/ reduce( collection: List | null | undefined, - callback: MemoIterator): TResult | undefined; + callback: MemoListIterator> + ): TResult | undefined; /** - * @see _.reduce - **/ - reduce( - collection: Dictionary | null | undefined, - callback: MemoIterator): TResult | undefined; + * @see _.reduce + **/ + reduce( + collection: T | null | undefined, + callback: MemoObjectIterator + ): TResult | undefined; /** * @see _.reduce **/ reduce( collection: NumericDictionary | null | undefined, - callback: MemoIterator): TResult | undefined; + callback: MemoListIterator> + ): TResult | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.reduce **/ - reduce( - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): TResult | undefined; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): TResult | undefined; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): LoDashExplicitObjectWrapper; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /**LoDashExplicitWrapper - * @see _.reduce - */ - reduce( - callback: MemoIterator, - accumulator: TResult): LoDashExplicitWrapper; + reduce( + this: LoDashImplicitWrapper, + callback: MemoListIterator, + accumulator: TResult + ): TResult; /** * @see _.reduce - */ - reduce( - callback: MemoIterator): LoDashExplicitWrapper; + **/ + reduce( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): TResult; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashImplicitWrapper, + callback: MemoObjectIterator, + accumulator: TResult + ): TResult; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): TResult; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashImplicitWrapper, + callback: MemoListIterator + ): TResult | undefined; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): TResult | undefined; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashImplicitWrapper, + callback: MemoObjectIterator + ): TResult | undefined; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): TResult | undefined; + } + + interface LoDashExplicitWrapper { + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper, + callback: MemoListIterator, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper, + callback: MemoObjectIterator, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper, + callback: MemoListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): LoDashExplicitWrapper; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper, + callback: MemoObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.reduce + **/ + reduce( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): LoDashExplicitWrapper; } //_.reduceRight @@ -9054,50 +6298,212 @@ declare namespace _ { * @param collection The collection to iterate over. * @param callback The function called per iteration. * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. * @return The accumulated value. **/ reduceRight( collection: T[] | null | undefined, - callback: MemoIterator, - accumulator: TResult): TResult; + callback: MemoListIterator, + accumulator: TResult + ): TResult; /** * @see _.reduceRight **/ reduceRight( collection: List | null | undefined, - callback: MemoIterator, - accumulator: TResult): TResult; + callback: MemoListIterator>, + accumulator: TResult + ): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: T | null | undefined, + callback: MemoObjectIterator, + accumulator: TResult + ): TResult; /** * @see _.reduceRight **/ reduceRight( - collection: Dictionary | null | undefined, - callback: MemoIterator, - accumulator: TResult): TResult; + collection: NumericDictionary | null | undefined, + callback: MemoListIterator>, + accumulator: TResult + ): TResult; /** * @see _.reduceRight **/ reduceRight( collection: T[] | null | undefined, - callback: MemoIterator): TResult | undefined; + callback: MemoListIterator + ): TResult | undefined; /** * @see _.reduceRight **/ reduceRight( collection: List | null | undefined, - callback: MemoIterator): TResult | undefined; + callback: MemoListIterator> + ): TResult | undefined; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: T | null | undefined, + callback: MemoObjectIterator + ): TResult | undefined; /** * @see _.reduceRight **/ reduceRight( - collection: Dictionary | null | undefined, - callback: MemoIterator): TResult | undefined; + collection: NumericDictionary | null | undefined, + callback: MemoListIterator> + ): TResult | undefined; + } + + interface LoDashImplicitWrapper { + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper, + callback: MemoListIterator, + accumulator: TResult + ): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper, + callback: MemoObjectIterator, + accumulator: TResult + ): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper, + callback: MemoListIterator + ): TResult | undefined; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): TResult | undefined; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper, + callback: MemoObjectIterator + ): TResult | undefined; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashImplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): TResult | undefined; + } + + interface LoDashExplicitWrapper { + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper, + callback: MemoListIterator, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper, + callback: MemoObjectIterator, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator>, + accumulator: TResult + ): LoDashExplicitWrapper; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper, + callback: MemoListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): LoDashExplicitWrapper; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper, + callback: MemoObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.reduceRight + **/ + reduceRight( + this: LoDashExplicitWrapper | null | undefined>, + callback: MemoListIterator> + ): LoDashExplicitWrapper; } //_.reject @@ -9111,144 +6517,78 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the new filtered array. */ - reject( - collection: List | null | undefined, - predicate?: ListIterator - ): T[]; - - /** - * @see _.reject - */ - reject( - collection: Dictionary | null | undefined, - predicate?: DictionaryIterator - ): T[]; - - /** - * @see _.reject - */ reject( collection: string | null | undefined, - predicate?: StringIterator + predicate?: StringIterator ): string[]; /** * @see _.reject */ reject( - collection: List|Dictionary | null | undefined, - predicate: string + collection: List | null | undefined, + predicate?: ListIteratee ): T[]; /** * @see _.reject */ - reject( - collection: List|Dictionary | null | undefined, - predicate: W - ): T[]; + reject( + collection: T | null | undefined, + predicate?: ObjectIteratee + ): Array; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.reject */ reject( - predicate?: StringIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.reject - */ - reject( - predicate: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.reject - */ - reject( - predicate: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper, + predicate?: StringIterator + ): LoDashImplicitWrapper; /** * @see _.reject */ reject( - predicate: string - ): LoDashImplicitArrayWrapper; + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashImplicitWrapper; /** * @see _.reject */ - reject(predicate: W): LoDashImplicitArrayWrapper; + reject( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee + ): LoDashImplicitWrapper>; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.reject */ reject( - predicate?: StringIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.reject - */ - reject( - predicate: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.reject - */ - reject( - predicate: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; + this: LoDashExplicitWrapper, + predicate?: StringIterator + ): LoDashExplicitWrapper; /** * @see _.reject */ reject( - predicate: string - ): LoDashExplicitArrayWrapper; + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; /** * @see _.reject */ - reject(predicate: W): LoDashExplicitArrayWrapper; + reject( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee + ): LoDashExplicitWrapper>; } //_.sample @@ -9260,50 +6600,68 @@ declare namespace _ { * @return Returns the random element. */ sample( - collection: List | Dictionary | NumericDictionary | object | null | undefined + collection: List | Dictionary | NumericDictionary | null | undefined ): T | undefined; - } - interface LoDashImplicitWrapper { /** * @see _.sample */ - sample(): string | undefined; - } + sample( + collection: T + ): T[keyof T]; - interface LoDashImplicitArrayWrapperBase { /** * @see _.sample */ - sample(): T | undefined; + sample( + collection: T | null | undefined + ): T[keyof T] | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.sample */ - sample(): T | undefined; - } + sample( + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined> + ): T | undefined; - interface LoDashExplicitWrapper { /** * @see _.sample */ - sample(): LoDashExplicitWrapper; - } + sample( + this: LoDashImplicitWrapper, + ): T[keyof T]; - interface LoDashExplicitArrayWrapperBase { /** * @see _.sample */ - sample(): TWrapper; + sample( + this: LoDashImplicitWrapper + ): T[keyof T] | undefined; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sample */ - sample(): TWrapper; + sample( + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined> + ): LoDashExplicitWrapper; + + /** + * @see _.sample + */ + sample( + this: LoDashExplicitWrapper, + ): LoDashExplicitWrapper; + + /** + * @see _.sample + */ + sample( + this: LoDashExplicitWrapper + ): LoDashExplicitWrapper; } //_.sampleSize @@ -9323,72 +6681,46 @@ declare namespace _ { /** * @see _.sampleSize */ - sampleSize( - collection: O | null | undefined, + sampleSize( + collection: T | null | undefined, n?: number - ): T[]; + ): Array; + } + interface LoDashImplicitWrapper { /** * @see _.sampleSize */ sampleSize( - collection: Object | null | undefined, + this: LoDashImplicitWrapper|Dictionary|NumericDictionary | null | undefined>, n?: number - ): T[]; - } + ): LoDashImplicitWrapper; - interface LoDashImplicitWrapper { /** * @see _.sampleSize */ - sampleSize( + sampleSize( + this: LoDashImplicitWrapper, n?: number - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper>; } - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sampleSize */ sampleSize( + this: LoDashExplicitWrapper|Dictionary|NumericDictionary | null | undefined>, n?: number - ): LoDashImplicitArrayWrapper; - } + ): LoDashExplicitWrapper; - interface LoDashExplicitWrapper { /** * @see _.sampleSize */ - sampleSize( + sampleSize( + this: LoDashExplicitWrapper, n?: number - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper>; } //_.shuffle @@ -9399,54 +6731,36 @@ declare namespace _ { * @param collection The collection to shuffle. * @return Returns the new shuffled array. */ - shuffle(collection: List|Dictionary | null | undefined): T[]; + shuffle(collection: List | null | undefined): T[]; /** * @see _.shuffle */ - shuffle(collection: string | null | undefined): string[]; + shuffle(collection: T | null | undefined): Array; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.shuffle */ - shuffle(): LoDashImplicitArrayWrapper; + shuffle(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; + + /** + * @see _.shuffle + */ + shuffle(this: LoDashImplicitWrapper): LoDashImplicitWrapper>; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.shuffle */ - shuffle(): LoDashImplicitArrayWrapper; - } + shuffle(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; - interface LoDashImplicitObjectWrapperBase { /** * @see _.shuffle */ - shuffle(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; + shuffle(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; } //_.size @@ -9458,50 +6772,17 @@ declare namespace _ { * @param collection The collection to inspect. * @return Returns the size of collection. */ - size(collection: List|Dictionary | null | undefined): number; - - /** - * @see _.size - */ - size(collection: string | null | undefined): number; + size(collection: object | string | null | undefined): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.size */ size(): number; } - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.size */ @@ -9520,15 +6801,15 @@ declare namespace _ { */ some( collection: List | null | undefined, - predicate?: ListIterator + predicate?: ListIteratee ): boolean; /** * @see _.some */ - some( - collection: Dictionary | null | undefined, - predicate?: DictionaryIterator + some( + collection: T | null | undefined, + predicate?: ObjectIteratee ): boolean; /** @@ -9536,146 +6817,59 @@ declare namespace _ { */ some( collection: NumericDictionary | null | undefined, - predicate?: NumericDictionaryIterator + predicate?: NumericDictionaryIteratee + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.some + */ + some( + this: LoDashImplicitWrapper | null | undefined>, + predicate?: ListIteratee ): boolean; /** * @see _.some */ - some( - collection: Object | null | undefined, - predicate?: ObjectIterator + some( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee ): boolean; /** * @see _.some */ some( - collection: List|Dictionary|NumericDictionary | null | undefined, - predicate?: string|[string, any] + this: LoDashImplicitWrapper | null | undefined>, + predicate?: NumericDictionaryIteratee ): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.some + */ + some( + this: LoDashExplicitWrapper | null | undefined>, + predicate?: ListIteratee + ): LoDashExplicitWrapper; /** * @see _.some */ - some( - collection: Object | null | undefined, - predicate?: string|[string, any] - ): boolean; + some( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee + ): LoDashExplicitWrapper; /** * @see _.some */ some( - collection: List|Dictionary|NumericDictionary | null | undefined, - predicate?: PartialObject - ): boolean; - - /** - * @see _.some - */ - some( - collection: List|Dictionary|NumericDictionary | null | undefined, - predicate?: PartialObject - ): boolean; - - /** - * @see _.some - */ - some( - collection: Object | null | undefined, - predicate?: PartialObject - ): boolean; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.some - */ - some( - predicate?: ListIterator|NumericDictionaryIterator - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: PartialObject - ): boolean; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.some - */ - some( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator - ): boolean; - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: PartialObject - ): boolean; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.some - */ - some( - predicate?: ListIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: PartialObject - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.some - */ - some( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: PartialObject + this: LoDashExplicitWrapper | null | undefined>, + predicate?: NumericDictionaryIteratee ): LoDashExplicitWrapper; } @@ -9714,163 +6908,54 @@ declare namespace _ { * }); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] */ - sortBy( - collection: List | null | undefined, - iteratee?: ListIterator - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary | null | undefined, - iteratee: string - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary | null | undefined, - whereValue: W - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary | null | undefined - ): T[]; - - /** - * @see _.sortBy - */ sortBy( collection: List | null | undefined, - iteratees: Array|string|Object> + ...iteratees: Array>> ): T[]; + /** + * @see _.sortBy + */ + sortBy( + collection: T | null | undefined, + ...iteratees: Array>> + ): Array; + } + + interface LoDashImplicitWrapper { /** * @see _.sortBy */ sortBy( - collection: List | null | undefined, - ...iteratees: Array|Object|string> - ): T[]; + this: LoDashImplicitWrapper | null | undefined>, + ...iteratees: Array>> + ): LoDashImplicitWrapper; + + /** + * @see _.sortBy + */ + sortBy( + this: LoDashImplicitWrapper, + ...iteratees: Array>> + ): LoDashImplicitWrapper>; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sortBy */ - sortBy( - iteratee?: ListIterator - ): LoDashImplicitArrayWrapper; + sortBy( + this: LoDashExplicitWrapper | null | undefined>, + ...iteratees: Array>> + ): LoDashExplicitWrapper; /** * @see _.sortBy */ - sortBy(iteratee: string): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(...iteratees: Array|Object|string>): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - **/ - sortBy(iteratees: Array|string|Object>): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashExplicitArrayWrapper; + sortBy( + this: LoDashExplicitWrapper, + ...iteratees: Array>> + ): LoDashExplicitWrapper>; } //_.orderBy @@ -9902,9 +6987,9 @@ declare namespace _ { * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] */ - orderBy( + orderBy( collection: List | null | undefined, - iteratees?: Many|string|W>, + iteratees?: Many>, orders?: Many ): T[]; @@ -9913,16 +6998,34 @@ declare namespace _ { */ orderBy( collection: List | null | undefined, - iteratees?: Many|string|Object>, + iteratees?: Many>, orders?: Many ): T[]; /** * @see _.orderBy */ - orderBy( + orderBy( + collection: T | null | undefined, + iteratees?: Many>, + orders?: Many + ): Array; + + /** + * @see _.orderBy + */ + orderBy( + collection: T | null | undefined, + iteratees?: Many>, + orders?: Many + ): Array; + + /** + * @see _.orderBy + */ + orderBy( collection: NumericDictionary | null | undefined, - iteratees?: Many|string|W>, + iteratees?: Many>, orders?: Many ): T[]; @@ -9931,167 +7034,121 @@ declare namespace _ { */ orderBy( collection: NumericDictionary | null | undefined, - iteratees?: Many|string|Object>, - orders?: Many - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: Dictionary | null | undefined, - iteratees?: Many|string|W>, - orders?: Many - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: Dictionary | null | undefined, - iteratees?: Many|string|Object>, + iteratees?: Many>, orders?: Many ): T[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.orderBy */ - orderBy( - iteratees?: Many|string>, + orderBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratees?: Many>, orders?: Many - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; + + /** + * @see _.orderBy + */ + orderBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratees?: Many>, + orders?: Many + ): LoDashImplicitWrapper; + + /** + * @see _.orderBy + */ + orderBy( + this: LoDashImplicitWrapper, + iteratees?: Many>, + orders?: Many + ): LoDashImplicitWrapper>; + + /** + * @see _.orderBy + */ + orderBy( + this: LoDashImplicitWrapper, + iteratees?: Many>, + orders?: Many + ): LoDashImplicitWrapper>; + + /** + * @see _.orderBy + */ + orderBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratees?: Many>, + orders?: Many + ): LoDashImplicitWrapper; + + /** + * @see _.orderBy + */ + orderBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratees?: Many>, + orders?: Many + ): LoDashImplicitWrapper; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.orderBy */ - orderBy( - iteratees?: Many|string|W>, + orderBy( + this: LoDashExplicitWrapper | null | undefined>, + iteratees?: Many>, orders?: Many - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|W>, - orders?: Many - ): LoDashImplicitArrayWrapper; + ): LoDashExplicitWrapper; /** * @see _.orderBy */ orderBy( - iteratees?: Many|string|Object>, + this: LoDashExplicitWrapper | null | undefined>, + iteratees?: Many>, orders?: Many - ): LoDashImplicitArrayWrapper; + ): LoDashExplicitWrapper; /** * @see _.orderBy */ - orderBy( - iteratees?: Many|string|W>, + orderBy( + this: LoDashExplicitWrapper, + iteratees?: Many>, orders?: Many - ): LoDashImplicitArrayWrapper; + ): LoDashExplicitWrapper>; + + /** + * @see _.orderBy + */ + orderBy( + this: LoDashExplicitWrapper, + iteratees?: Many>, + orders?: Many + ): LoDashExplicitWrapper>; /** * @see _.orderBy */ orderBy( - iteratees?: Many|string|Object>, + this: LoDashExplicitWrapper | null | undefined>, + iteratees?: Many>, orders?: Many - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|W>, - orders?: Many - ): LoDashImplicitArrayWrapper; + ): LoDashExplicitWrapper; /** * @see _.orderBy */ orderBy( - iteratees?: Many|string|Object>, + this: LoDashExplicitWrapper | null | undefined>, + iteratees?: Many>, orders?: Many - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string>, - orders?: Many - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|W|(ListIterator|string|W)>, - orders?: Many - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|W>, - orders?: Many - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|Object>, - orders?: Many - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|W>, - orders?: Many - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|Object>, - orders?: Many - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|W>, - orders?: Many - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees?: Many|string|Object>, - orders?: Many - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; } /******** @@ -10108,14 +7165,14 @@ declare namespace _ { now(): number; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.now */ now(): number; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.now */ @@ -10135,24 +7192,24 @@ declare namespace _ { * @param func The function to restrict. * @return Returns the new restricted function. */ - after( + after any>( n: number, func: TFunc ): TFunc; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.after **/ - after(func: TFunc): LoDashImplicitObjectWrapper; + after any>(func: TFunc): LoDashImplicitWrapper; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.after **/ - after(func: TFunc): LoDashExplicitObjectWrapper; + after any>(func: TFunc): LoDashExplicitWrapper; } //_.ary @@ -10164,29 +7221,24 @@ declare namespace _ { * @param n The arity cap. * @returns Returns the new function. */ - ary( - func: Function, + ary( + func: (...args: any[]) => any, n?: number - ): TResult; - - ary( - func: T, - n?: number - ): TResult; + ): (...args: any[]) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.ary */ - ary(n?: number): LoDashImplicitObjectWrapper; + ary(n?: number): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.ary */ - ary(n?: number): LoDashExplicitObjectWrapper; + ary(n?: number): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.before @@ -10200,41 +7252,35 @@ declare namespace _ { * @param func The function to restrict. * @return Returns the new restricted function. */ - before( + before any>( n: number, func: TFunc ): TFunc; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.before **/ - before(func: TFunc): LoDashImplicitObjectWrapper; + before any>(func: TFunc): LoDashImplicitWrapper; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.before **/ - before(func: TFunc): LoDashExplicitObjectWrapper; + before any>(func: TFunc): LoDashExplicitWrapper; } //_.bind interface FunctionBind { placeholder: any; - ( - func: T, + ( + func: (...args: any[]) => any, thisArg: any, ...partials: any[] - ): TResult; - - ( - func: Function, - thisArg: any, - ...partials: any[] - ): TResult; + ): (...args: any[]) => any; } interface LoDashStatic { @@ -10255,24 +7301,24 @@ declare namespace _ { bind: FunctionBind; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.bind */ - bind( + bind( thisArg: any, ...partials: any[] - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.bind */ - bind( + bind( thisArg: any, ...partials: any[] - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.bindAll @@ -10295,35 +7341,22 @@ declare namespace _ { ): T; } - interface LoDashImplicitObjectWrapper { + interface LoDashWrapper { /** * @see _.bindAll */ - bindAll(...methodNames: Array>): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.bindAll - */ - bindAll(...methodNames: Array>): LoDashExplicitObjectWrapper; + bindAll(...methodNames: Array>): this; } //_.bindKey interface FunctionBindKey { placeholder: any; - ( - object: T, - key: any, + ( + object: object, + key: string, ...partials: any[] - ): TResult; - - ( - object: Object, - key: any, - ...partials: any[] - ): TResult; + ): (...args: any[]) => any; } interface LoDashStatic { @@ -10345,64 +7378,24 @@ declare namespace _ { bindKey: FunctionBindKey; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.bindKey */ - bindKey( - key: any, + bindKey( + key: string, ...partials: any[] - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.bindKey */ - bindKey( - key: any, + bindKey( + key: string, ...partials: any[] - ): LoDashExplicitObjectWrapper; - } - - //_.createCallback - interface LoDashStatic { - /** - * Produces a callback bound to an optional thisArg. If func is a property name the created - * callback will return the property value for a given element. If func is an object the created - * callback will return true for elements that contain the equivalent object properties, - * otherwise it will return false. - * @param func The value to convert to a callback. - * @param thisArg The this binding of the created callback. - * @param argCount The number of arguments the callback accepts. - * @return A callback function. - **/ - createCallback( - func: string, - argCount?: number): () => any; - - /** - * @see _.createCallback - **/ - createCallback( - func: Dictionary, - argCount?: number): () => boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.createCallback - **/ - createCallback( - argCount?: number): LoDashImplicitObjectWrapper<() => any>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.createCallback - **/ - createCallback( - argCount?: number): LoDashImplicitObjectWrapper<() => any>; + ): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.curry @@ -10412,45 +7405,50 @@ declare namespace _ { * its result, if all func arguments have been provided, or returns a function that accepts one or more of the * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1) => R): + curry(func: (t1: T1) => R, arity?: number): CurriedFunction1; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning * its result, if all func arguments have been provided, or returns a function that accepts one or more of the * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2) => R): + curry(func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning * its result, if all func arguments have been provided, or returns a function that accepts one or more of the * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2, t3: T3) => R): + curry(func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning * its result, if all func arguments have been provided, or returns a function that accepts one or more of the * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning * its result, if all func arguments have been provided, or returns a function that accepts one or more of the * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): CurriedFunction5; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning @@ -10460,9 +7458,7 @@ declare namespace _ { * @param arity The arity of func. * @return Returns the new curried function. */ - curry( - func: Function, - arity?: number): TResult; + curry(func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; } interface CurriedFunction1 { @@ -10499,42 +7495,109 @@ declare namespace _ { (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1; (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; } - interface RightCurriedFunction1{ - ():RightCurriedFunction1 - (t1:T1):R - } - interface RightCurriedFunction2{ - ():RightCurriedFunction2 - (t2:T2):RightCurriedFunction1 - (t1:T1,t2:T2):R + interface RightCurriedFunction1 { + (): RightCurriedFunction1; + (t1: T1): R; } - interface RightCurriedFunction3{ - ():RightCurriedFunction3 - (t3:T3):RightCurriedFunction2 - (t2:T2,t3:T3):RightCurriedFunction1 - (t1:T1,t2:T2,t3:T3):R + interface RightCurriedFunction2 { + (): RightCurriedFunction2; + (t2: T2): RightCurriedFunction1; + (t1: T1, t2: T2): R; } - interface RightCurriedFunction4{ - ():RightCurriedFunction4 - (t4:T4):RightCurriedFunction3 - (t3:T3,t4:T4):RightCurriedFunction2 - (t2:T2,t3:T3,t4:T4):RightCurriedFunction1 - (t1:T1,t2:T2,t3:T3,t4:T4):R + interface RightCurriedFunction3 { + (): RightCurriedFunction3; + (t3: T3): RightCurriedFunction2; + (t2: T2, t3: T3): RightCurriedFunction1; + (t1: T1, t2: T2, t3: T3): R; } - interface RightCurriedFunction5{ - ():RightCurriedFunction5 - (t5:T5):RightCurriedFunction4 - (t4:T4,t5:T5):RightCurriedFunction3 - (t3:T3,t4:T4,t5:T5):RightCurriedFunction2 - (t2:T2,t3:T3,t4:T4,t5:T5):RightCurriedFunction1 - (t1:T1,t2:T2,t3:T3,t4:T4,t5:T5):R + interface RightCurriedFunction4 { + (): RightCurriedFunction4; + (t4: T4): RightCurriedFunction3; + (t3: T3, t4: T4): RightCurriedFunction2; + (t2: T2, t3: T3, t4: T4): RightCurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4): R; + } + interface RightCurriedFunction5 { + (): RightCurriedFunction5; + (t5: T5): RightCurriedFunction4; + (t4: T4, t5: T5): RightCurriedFunction3; + (t3: T3, t4: T4, t5: T5): RightCurriedFunction2; + (t2: T2, t3: T3, t4: T4, t5: T5): RightCurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.curry **/ - curry(arity?: number): LoDashImplicitObjectWrapper; + curry(this: LoDashImplicitWrapper<(t1: T1) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashImplicitWrapper<(t1: T1, t2: T2) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashImplicitWrapper<(t1: T1, t2: T2, t3: T3) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashImplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashImplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curry + **/ + curry(arity?: number): LoDashImplicitWrapper<(...args: any[]) => any>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.curry + **/ + curry(this: LoDashExplicitWrapper<(t1: T1) => R>): + LoDashExplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashExplicitWrapper<(t1: T1, t2: T2) => R>): + LoDashExplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashExplicitWrapper<(t1: T1, t2: T2, t3: T3) => R>): + LoDashExplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashExplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4) => R>): + LoDashExplicitWrapper>; + + /** + * @see _.curry + **/ + curry(this: LoDashExplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R>): + LoDashExplicitWrapper>; + + /** + * @see _.curry + **/ + curry(arity?: number): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.curryRight @@ -10543,41 +7606,46 @@ declare namespace _ { * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight * instead of _.partial. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1) => R): + curryRight(func: (t1: T1) => R, arity?: number): RightCurriedFunction1; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight * instead of _.partial. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2) => R): + curryRight(func: (t1: T1, t2: T2) => R, arity?: number): RightCurriedFunction2; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight * instead of _.partial. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2, t3: T3) => R): + curryRight(func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): RightCurriedFunction3; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight * instead of _.partial. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): RightCurriedFunction4; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight * instead of _.partial. * @param func The function to curry. + * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): RightCurriedFunction5; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight @@ -10586,16 +7654,81 @@ declare namespace _ { * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight( - func: Function, - arity?: number): TResult; + curryRight(func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.curryRight **/ - curryRight(arity?: number): LoDashImplicitObjectWrapper; + curryRight(this: LoDashImplicitWrapper<(t1: T1) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashImplicitWrapper<(t1: T1, t2: T2) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashImplicitWrapper<(t1: T1, t2: T2, t3: T3) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashImplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashImplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R>, arity?: number): + LoDashImplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(arity?: number): LoDashImplicitWrapper<(...args: any[]) => any>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.curryRight + **/ + curryRight(this: LoDashExplicitWrapper<(t1: T1) => R>, arity?: number): + LoDashExplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashExplicitWrapper<(t1: T1, t2: T2) => R>, arity?: number): + LoDashExplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashExplicitWrapper<(t1: T1, t2: T2, t3: T3) => R>, arity?: number): + LoDashExplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashExplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4) => R>, arity?: number): + LoDashExplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(this: LoDashExplicitWrapper<(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R>, arity?: number): + LoDashExplicitWrapper>; + + /** + * @see _.curryRight + **/ + curryRight(arity?: number): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.debounce @@ -10637,31 +7770,31 @@ declare namespace _ { * @param options.trailing Specify invoking on the trailing edge of the timeout. * @return Returns the new debounced function. */ - debounce( + debounce any>( func: T, wait?: number, options?: DebounceSettings ): T & Cancelable; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.debounce */ debounce( wait?: number, options?: DebounceSettings - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.debounce */ debounce( wait?: number, options?: DebounceSettings - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; } //_.defer @@ -10674,20 +7807,20 @@ declare namespace _ { * @param args The arguments to invoke the function with. * @return Returns the timer id. */ - defer( - func: T, + defer( + func: (...args: any[]) => any, ...args: any[] ): number; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.defer */ defer(...args: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.defer */ @@ -10704,14 +7837,14 @@ declare namespace _ { * @param args The arguments to invoke the function with. * @return Returns the timer id. */ - delay( - func: T, + delay( + func: (...args: any[]) => any, wait: number, ...args: any[] ): number; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.delay */ @@ -10721,7 +7854,7 @@ declare namespace _ { ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.delay */ @@ -10749,21 +7882,14 @@ declare namespace _ { * flipped('a', 'b', 'c', 'd'); * // => ['d', 'c', 'b', 'a'] */ - flip(func: T): T; + flip any>(func: T): T; } - interface LoDashImplicitObjectWrapper { + interface LoDashWrapper { /** * @see _.flip */ - flip(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flip - */ - flip(): LoDashExplicitObjectWrapper; + flip(): this; } //_.flow @@ -10811,30 +7937,93 @@ declare namespace _ { flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3, a4: A4) => R6; flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7; // generic function - flow(...funcs: Function[]): TResult; - flow(funcs: Function[]): TResult; + flow(...funcs: Array any>>): (...args: any[]) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.flow */ - flow(...funcs: Function[]): LoDashImplicitObjectWrapper; - /** - * @see _.flow - */ - flow(funcs: Function[]): LoDashImplicitObjectWrapper; + // 0-argument first function + flow(this: LoDashImplicitWrapper<() => R1>, f2: (a: R1) => R2): LoDashImplicitWrapper<() => R2>; + flow(this: LoDashImplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashImplicitWrapper<() => R3>; + flow(this: LoDashImplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashImplicitWrapper<() => R4>; + flow(this: LoDashImplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashImplicitWrapper<() => R5>; + flow(this: LoDashImplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashImplicitWrapper<() => R6>; + flow(this: LoDashImplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashImplicitWrapper<() => R7>; + // 1-argument first function + flow(this: LoDashImplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2): LoDashImplicitWrapper<(a1: A1) => R2>; + flow(this: LoDashImplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashImplicitWrapper<(a1: A1) => R3>; + flow(this: LoDashImplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashImplicitWrapper<(a1: A1) => R4>; + flow(this: LoDashImplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashImplicitWrapper<(a1: A1) => R5>; + flow(this: LoDashImplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashImplicitWrapper<(a1: A1) => R6>; + flow(this: LoDashImplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashImplicitWrapper<(a1: A1) => R7>; + // 2-argument first function + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2): LoDashImplicitWrapper<(a1: A1, a2: A2) => R2>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashImplicitWrapper<(a1: A1, a2: A2) => R3>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashImplicitWrapper<(a1: A1, a2: A2) => R4>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashImplicitWrapper<(a1: A1, a2: A2) => R5>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashImplicitWrapper<(a1: A1, a2: A2) => R6>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashImplicitWrapper<(a1: A1, a2: A2) => R7>; + // 3-argument first function + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R2>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R3>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R4>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R5>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R6>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3) => R7>; + // 4-argument first function + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R2>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R3>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R4>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R5>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R6>; + flow(this: LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashImplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R7>; + // generic function + flow(...funcs: Array any>>): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.flow */ - flow(...funcs: Function[]): LoDashExplicitObjectWrapper; - /** - * @see _.flow - */ - flow(funcs: Function[]): LoDashExplicitObjectWrapper; + // 0-argument first function + flow(this: LoDashExplicitWrapper<() => R1>, f2: (a: R1) => R2): LoDashExplicitWrapper<() => R2>; + flow(this: LoDashExplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashExplicitWrapper<() => R3>; + flow(this: LoDashExplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashExplicitWrapper<() => R4>; + flow(this: LoDashExplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashExplicitWrapper<() => R5>; + flow(this: LoDashExplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashExplicitWrapper<() => R6>; + flow(this: LoDashExplicitWrapper<() => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashExplicitWrapper<() => R7>; + // 1-argument first function + flow(this: LoDashExplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2): LoDashExplicitWrapper<(a1: A1) => R2>; + flow(this: LoDashExplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashExplicitWrapper<(a1: A1) => R3>; + flow(this: LoDashExplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashExplicitWrapper<(a1: A1) => R4>; + flow(this: LoDashExplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashExplicitWrapper<(a1: A1) => R5>; + flow(this: LoDashExplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashExplicitWrapper<(a1: A1) => R6>; + flow(this: LoDashExplicitWrapper<(a1: A1) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashExplicitWrapper<(a1: A1) => R7>; + // 2-argument first function + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2): LoDashExplicitWrapper<(a1: A1, a2: A2) => R2>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashExplicitWrapper<(a1: A1, a2: A2) => R3>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashExplicitWrapper<(a1: A1, a2: A2) => R4>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashExplicitWrapper<(a1: A1, a2: A2) => R5>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashExplicitWrapper<(a1: A1, a2: A2) => R6>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashExplicitWrapper<(a1: A1, a2: A2) => R7>; + // 3-argument first function + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R2>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R3>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R4>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R5>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R6>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3) => R7>; + // 4-argument first function + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R2>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R3>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R4>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R5>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R6>; + flow(this: LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R1>, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): LoDashExplicitWrapper<(a1: A1, a2: A2, a3: A3, a4: A4) => R7>; + // generic function + flow(...funcs: Array any>>): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.flowRight @@ -10846,37 +8035,25 @@ declare namespace _ { * @param funcs Functions to invoke. * @return Returns the new function. */ - flowRight(...funcs: Function[]): TResult; - /** - * @see _.flowRight - */ - flowRight(funcs: Function[]): TResult; + flowRight(...funcs: Array any>>): (...args: any[]) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.flowRight */ - flowRight(...funcs: Function[]): LoDashImplicitObjectWrapper; - /** - * @see _.flowRight - */ - flowRight(funcs: Function[]): LoDashImplicitObjectWrapper; + flowRight(...funcs: Array any>>): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.flowRight */ - flowRight(...funcs: Function[]): LoDashExplicitObjectWrapper; - /** - * @see _.flowRight - */ - flowRight(funcs: Function[]): LoDashExplicitObjectWrapper; + flowRight(...funcs: Array any>>): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.memoize - interface MemoizedFunction extends Function { + interface MemoizedFunction { cache: MapCache; } @@ -10892,23 +8069,23 @@ declare namespace _ { * @return Returns the new memoizing function. */ memoize: { - (func: T, resolver?: Function): T & MemoizedFunction; + any>(func: T, resolver?: (...args: any[]) => any): T & MemoizedFunction; Cache: MapCacheConstructor; }; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.memoize */ - memoize(resolver?: Function): LoDashImplicitObjectWrapper; + memoize(resolver?: (...args: any[]) => any): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.memoize */ - memoize(resolver?: Function): LoDashExplicitObjectWrapper; + memoize(resolver?: (...args: any[]) => any): LoDashExplicitWrapper; } //_.overArgs (was _.modArgs) @@ -10921,42 +8098,24 @@ declare namespace _ { * of functions. * @return Returns the new function. */ - overArgs( - func: T, - ...transforms: Function[] - ): TResult; - - /** - * @see _.overArgs - */ - overArgs( - func: T, - transforms: Function[] - ): TResult; + overArgs( + func: (...args: any[]) => any, + ...transforms: Array any>> + ): (...args: any[]) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.overArgs */ - overArgs(...transforms: Function[]): LoDashImplicitObjectWrapper; - - /** - * @see _.overArgs - */ - overArgs(transforms: Function[]): LoDashImplicitObjectWrapper; + overArgs(...transforms: Array any>>): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.overArgs */ - overArgs(...transforms: Function[]): LoDashExplicitObjectWrapper; - - /** - * @see _.overArgs - */ - overArgs(transforms: Function[]): LoDashExplicitObjectWrapper; + overArgs(...transforms: Array any>>): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.negate @@ -10968,36 +8127,14 @@ declare namespace _ { * @param predicate The predicate to negate. * @return Returns the new function. */ - negate(predicate: T): (...args: any[]) => boolean; - - /** - * @see _.negate - */ - negate(predicate: T): TResult; + negate any>(predicate: T): T; } - interface LoDashImplicitObjectWrapper { + interface LoDashWrapper { /** * @see _.negate */ - negate(): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - - /** - * @see _.negate - */ - negate(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.negate - */ - negate(): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - - /** - * @see _.negate - */ - negate(): LoDashExplicitObjectWrapper; + negate(): this; } //_.once @@ -11009,21 +8146,14 @@ declare namespace _ { * @param func The function to restrict. * @return Returns the new restricted function. */ - once(func: T): T; + once any>(func: T): T; } - interface LoDashImplicitObjectWrapper { + interface LoDashWrapper { /** * @see _.once */ - once(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.once - */ - once(): LoDashExplicitObjectWrapper; + once(): this; } //_.partial @@ -11039,6 +8169,20 @@ declare namespace _ { partial: Partial; } + interface LoDashImplicitWrapper { + /** + * @see _.partial + */ + partial: ImplicitPartial; + } + + interface LoDashExplicitWrapper { + /** + * @see _.partial + */ + partial: ExplicitPartial; + } + type PH = LoDashStatic; type Function0 = () => R; @@ -11085,7 +8229,89 @@ declare namespace _ { (func: Function4, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1; (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; // catch-all - (func: Function, ...args: any[]): Function; + (func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any; + } + + interface ImplicitPartial { + // arity 0 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + // arity 1 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; + // arity 2 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; + // arity 3 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + // arity 4 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + // catch-all + (...args: any[]): LoDashImplicitWrapper<(...args: any[]) => any>; + } + + interface ExplicitPartial { + // arity 0 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + // arity 1 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; + // arity 2 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; + // arity 3 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + // arity 4 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + // catch-all + (...args: any[]): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.partialRight @@ -11100,6 +8326,20 @@ declare namespace _ { partialRight: PartialRight; } + interface LoDashImplicitWrapper { + /** + * @see _.partialRight + */ + partialRight: ImplicitPartialRight; + } + + interface LoDashExplicitWrapper { + /** + * @see _.partialRight + */ + partialRight: ExplicitPartialRight; + } + interface PartialRight { // arity 0 (func: Function0): Function0; @@ -11138,7 +8378,89 @@ declare namespace _ { (func: Function4, arg2: T2, arg3: T3, arg4: T4): Function1; (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; // catch-all - (func: Function, ...args: any[]): Function; + (func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any; + } + + interface ImplicitPartialRight { + // arity 0 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + // arity 1 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; + // arity 2 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; + // arity 3 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, plc3: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + // arity 4 + (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, plc3: PH, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg3: T3, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, arg3: T3, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + // catch-all + (...args: any[]): LoDashImplicitWrapper<(...args: any[]) => any>; + } + + interface ExplicitPartialRight { + // arity 0 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + // arity 1 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; + // arity 2 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; + // arity 3 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, plc3: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + // arity 4 + (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, plc3: PH, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg3: T3, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, arg3: T3, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + // catch-all + (...args: any[]): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.rearg @@ -11151,24 +8473,21 @@ declare namespace _ { * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes. * @return Returns the new function. */ - rearg(func: Function, indexes: number[]): TResult; - - /** - * @see _.rearg - */ - rearg(func: Function, ...indexes: number[]): TResult; + rearg(func: (...args: any[]) => any, ...indexes: Array>): (...args: any[]) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.rearg */ - rearg(indexes: number[]): LoDashImplicitObjectWrapper; + rearg(...indexes: Array>): LoDashImplicitWrapper<(...args: any[]) => any>; + } + interface LoDashExplicitWrapper { /** * @see _.rearg */ - rearg(...indexes: number[]): LoDashImplicitObjectWrapper; + rearg(...indexes: Array>): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.rest @@ -11183,32 +8502,24 @@ declare namespace _ { * @param start The start position of the rest parameter. * @return Returns the new function. */ - rest( - func: Function, + rest( + func: (...args: any[]) => any, start?: number - ): TResult; - - /** - * @see _.rest - */ - rest( - func: TFunc, - start?: number - ): TResult; + ): (...args: any[]) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.rest */ - rest(start?: number): LoDashImplicitObjectWrapper; + rest(start?: number): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.rest */ - rest(start?: number): LoDashExplicitObjectWrapper; + rest(start?: number): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.spread @@ -11222,26 +8533,36 @@ declare namespace _ { * @param func The function to spread arguments over. * @return Returns the new function. */ - spread(func: F): T; + spread(func: (...args: any[]) => TResult): (...args: any[]) => TResult; /** * @see _.spread */ - spread(func: Function): T; + spread(func: (...args: any[]) => TResult, start: number): (...args: any[]) => TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.spread */ - spread(): LoDashImplicitObjectWrapper; + spread(this: LoDashImplicitWrapper<(...args: any[]) => TResult>): LoDashImplicitWrapper<(...args: any[]) => TResult>; + + /** + * @see _.spread + */ + spread(this: LoDashImplicitWrapper<(...args: any[]) => TResult>, start: number): LoDashImplicitWrapper<(...args: any[]) => TResult>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.spread */ - spread(): LoDashExplicitObjectWrapper; + spread(this: LoDashExplicitWrapper<(...args: any[]) => TResult>): LoDashExplicitWrapper<(...args: any[]) => TResult>; + + /** + * @see _.spread + */ + spread(this: LoDashExplicitWrapper<(...args: any[]) => TResult>, start: number): LoDashExplicitWrapper<(...args: any[]) => TResult>; } //_.throttle @@ -11274,31 +8595,31 @@ declare namespace _ { * @param options.trailing Specify invoking on the trailing edge of the timeout. * @return Returns the new throttled function. */ - throttle( + throttle any>( func: T, wait?: number, options?: ThrottleSettings ): T & Cancelable; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.throttle */ throttle( wait?: number, options?: ThrottleSettings - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.throttle */ throttle( wait?: number, options?: ThrottleSettings - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; } //_.unary @@ -11317,21 +8638,21 @@ declare namespace _ { * _.map(['6', '8', '10'], _.unary(parseInt)); * // => [6, 8, 10] */ - unary(func: T): T; + unary(func: (arg1: T, ...args: any[]) => TResult): (arg1: T) => TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.unary */ - unary(): LoDashImplicitObjectWrapper; + unary(this: LoDashImplicitWrapper<(arg1: T, ...args: any[]) => TResult>): LoDashImplicitWrapper<(arg1: T) => TResult>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.unary */ - unary(): LoDashExplicitObjectWrapper; + unary(this: LoDashExplicitWrapper<(arg1: T, ...args: any[]) => TResult>): LoDashExplicitWrapper<(arg1: T) => TResult>; } //_.wrap @@ -11345,98 +8666,53 @@ declare namespace _ { * @param wrapper The wrapper function. * @return Returns the new function. */ - wrap( - value: V, - wrapper: W - ): R; + wrap( + value: T, + wrapper: (value: T, ...args: TArgs[]) => TResult + ): (...args: TArgs[]) => TResult; /** * @see _.wrap */ - wrap( - value: V, - wrapper: Function - ): R; - - /** - * @see _.wrap - */ - wrap( - value: any, - wrapper: Function - ): R; + wrap( + value: T, + wrapper: (value: T, ...args: any[]) => TResult + ): (...args: any[]) => TResult; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.wrap */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; + wrap( + wrapper: (value: TValue, ...args: TArgs[]) => TResult + ): LoDashImplicitWrapper<(...args: TArgs[]) => TResult>; /** * @see _.wrap */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; + wrap( + wrapper: (value: TValue, ...args: any[]) => TResult + ): LoDashImplicitWrapper<(...args: any[]) => TResult>; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.wrap */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; + /** + * @see _.wrap + */ + wrap( + wrapper: (value: TValue, ...args: TArgs[]) => TResult + ): LoDashExplicitWrapper<(...args: TArgs[]) => TResult>; /** * @see _.wrap */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; + wrap( + wrapper: (value: TValue, ...args: any[]) => TResult + ): LoDashExplicitWrapper<(...args: any[]) => TResult>; } /******** @@ -11454,46 +8730,18 @@ declare namespace _ { castArray(value?: Many): T[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.castArray */ - castArray(): LoDashImplicitArrayWrapper; + castArray(this: LoDashImplicitWrapper>): LoDashImplicitWrapper; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.castArray */ - castArray(): TWrapper; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.castArray - */ - castArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.castArray - */ - castArray(): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; + castArray(this: LoDashExplicitWrapper>): LoDashExplicitWrapper; } //_.clone @@ -11512,46 +8760,18 @@ declare namespace _ { clone(value: T): T; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.clone */ - clone(): T; + clone(): TValue; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.clone */ - clone(): TArray; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.clone - */ - clone(): TObject; - } - - interface LoDashExplicitWrapper { - /** - * @see _.clone - */ - clone(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.clone - */ - clone(): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.clone - */ - clone(): TWrapper; + clone(): this; } //_.cloneDeep @@ -11565,50 +8785,22 @@ declare namespace _ { cloneDeep(value: T): T; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.cloneDeep */ - cloneDeep(): T; + cloneDeep(): TValue; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.cloneDeep */ - cloneDeep(): TArray; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.cloneDeep - */ - cloneDeep(): TObject; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.cloneDeep - */ - cloneDeep(): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.cloneDeep - */ - cloneDeep(): TWrapper; + cloneDeep(): this; } //_.cloneDeepWith - type CloneDeepWithCustomizer = (value: TValue, key?: number|string, object?: any, stack?: any) => TResult; + type CloneDeepWithCustomizer = (value: any, key: number | string | undefined, object: TObject | undefined, stack: any) => any; interface LoDashStatic { /** @@ -11618,118 +8810,47 @@ declare namespace _ { * @param customizer The function to customize cloning. * @return Returns the deep cloned value. */ - cloneDeepWith( - value: any, - customizer?: CloneDeepWithCustomizer - ): TResult; - - /** - * @see _.clonDeepeWith - */ - cloneDeepWith( + cloneDeepWith( value: T, - customizer?: CloneDeepWithCustomizer - ): TResult; + customizer: CloneDeepWithCustomizer + ): any; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith(value: T): T; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.cloneDeepWith */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; + cloneDeepWith( + customizer: CloneDeepWithCustomizer + ): any; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith(): TValue; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.cloneDeepWith */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; + cloneDeepWith( + customizer: CloneDeepWithCustomizer + ): LoDashExplicitWrapper; /** * @see _.cloneDeepWith */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; + cloneDeepWith(): this; } //_.cloneWith - type CloneWithCustomizer = (value: TValue, key?: number|string, object?: any, stack?: any) => TResult; + type CloneWithCustomizer = (value: TValue, key: number | string | undefined, object: any, stack: any) => TResult; interface LoDashStatic { /** @@ -11740,9 +8861,9 @@ declare namespace _ { * @param customizer The function to customize cloning. * @return Returns the cloned value. */ - cloneWith( - value: any, - customizer?: CloneWithCustomizer + cloneWith( + value: T, + customizer: CloneWithCustomizer ): TResult; /** @@ -11750,111 +8871,62 @@ declare namespace _ { */ cloneWith( value: T, - customizer?: CloneWithCustomizer - ): TResult; + customizer: CloneWithCustomizer + ): TResult | T; + + /** + * @see _.cloneWith + */ + cloneWith(value: T): T; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer: CloneWithCustomizer + ): TResult; + /** * @see _.cloneWith */ cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } + customizer: CloneWithCustomizer + ): TResult | TValue; - interface LoDashImplicitArrayWrapperBase { /** * @see _.cloneWith */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; + cloneWith(): TValue; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.cloneWith */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer + cloneWith( + customizer: CloneWithCustomizer ): LoDashExplicitWrapper; /** * @see _.cloneWith */ cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; + customizer: CloneWithCustomizer + ): LoDashExplicitWrapper; /** * @see _.cloneWith */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; + cloneWith(): this; } /** * An object containing predicate functions for each property of T */ type ConformsPredicateObject = { - [P in keyof T]: (val: T[P]) => boolean; + [P in keyof T]?: (val: T[P]) => boolean; }; //_.conforms @@ -11863,7 +8935,21 @@ declare namespace _ { * Creates a function that invokes the predicate properties of `source` with the corresponding * property values of a given object, returning true if all predicates return truthy, else false. */ - conforms(source: ConformsPredicateObject): (Target: T) => boolean; + conforms(source: ConformsPredicateObject): (value: T) => boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.conforms + */ + conforms(this: LoDashImplicitWrapper>): LoDashImplicitWrapper<(value: T) => boolean>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.conforms + */ + conforms(this: LoDashExplicitWrapper>): LoDashExplicitWrapper<(value: T) => boolean>; } //_.conformsTo @@ -11877,6 +8963,20 @@ declare namespace _ { conformsTo(object: T, source: ConformsPredicateObject): boolean; } + interface LoDashImplicitWrapper { + /** + * @see _.conformsTo + */ + conformsTo(source: ConformsPredicateObject): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.conformsTo + */ + conformsTo(source: ConformsPredicateObject): LoDashExplicitWrapper; + } + type CondPair = [(val: T) => boolean, (val: T) => R] //_.cond @@ -11951,18 +9051,18 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** - * @see _.isEqual + * @see _.eq */ eq( other: any ): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** - * @see _.isEqual + * @see _.eq */ eq( other: any @@ -11984,14 +9084,14 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.gt */ gt(other: any): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.gt */ @@ -12013,14 +9113,14 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.gte */ gte(other: any): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.gte */ @@ -12038,14 +9138,14 @@ declare namespace _ { isArguments(value?: any): value is IArguments; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isArguments */ isArguments(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isArguments */ @@ -12068,14 +9168,14 @@ declare namespace _ { isArray(value?: any): value is any[]; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isArray */ isArray(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isArray */ @@ -12093,14 +9193,14 @@ declare namespace _ { isArrayBuffer(value?: any): value is ArrayBuffer; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isArrayBuffer */ isArrayBuffer(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isArrayBuffer */ @@ -12139,27 +9239,22 @@ declare namespace _ { /** * @see _.isArrayLike */ - isArrayLike(value?: Function): value is never; + isArrayLike(value?: ((...args: any[]) => any) | Function | null | undefined): value is never; /** * @see _.isArrayLike */ - isArrayLike(value: T | Function): value is T & { length: number }; - - /** - * DEPRECATED - */ - isArrayLike(value?: any): value is any[]; + isArrayLike(value: any): value is { length: number }; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isArrayLike */ isArrayLike(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isArrayLike */ @@ -12197,27 +9292,22 @@ declare namespace _ { /** * @see _.isArrayLike */ - isArrayLikeObject(value?: Function | string | boolean | number): value is never; + isArrayLikeObject(value?: ((...args: any[]) => any) | Function | string | boolean | number | null | undefined): value is never; /** * @see _.isArrayLike */ - isArrayLikeObject(value: T | Function | string | boolean | number): value is T & { length: number }; - - /** - * DEPRECATED - */ - isArrayLikeObject(value?: any): value is any[]; + isArrayLikeObject(value: T | string | boolean | number | null | undefined): value is T & { length: number }; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isArrayLikeObject */ isArrayLikeObject(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isArrayLikeObject */ @@ -12235,14 +9325,14 @@ declare namespace _ { isBoolean(value?: any): value is boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isBoolean */ isBoolean(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isBoolean */ @@ -12260,14 +9350,14 @@ declare namespace _ { isBuffer(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isBuffer */ isBuffer(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isBuffer */ @@ -12285,14 +9375,14 @@ declare namespace _ { isDate(value?: any): value is Date; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isDate */ isDate(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isDate */ @@ -12310,14 +9400,14 @@ declare namespace _ { isElement(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isElement */ isElement(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isElement */ @@ -12336,14 +9426,14 @@ declare namespace _ { isEmpty(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isEmpty */ isEmpty(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isEmpty */ @@ -12385,7 +9475,7 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isEqual */ @@ -12394,7 +9484,7 @@ declare namespace _ { ): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isEqual */ @@ -12445,7 +9535,7 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isEqualWith */ @@ -12455,7 +9545,7 @@ declare namespace _ { ): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isEqualWith */ @@ -12477,14 +9567,14 @@ declare namespace _ { isError(value: any): value is Error; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isError */ isError(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isError */ @@ -12504,14 +9594,14 @@ declare namespace _ { isFinite(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isFinite */ isFinite(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isFinite */ @@ -12526,17 +9616,17 @@ declare namespace _ { * @param value The value to check. * @return Returns true if value is correctly classified, else false. */ - isFunction(value?: any): value is Function; + isFunction(value?: any): value is ((...args: any[]) => any) | Function; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isFunction */ isFunction(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isFunction */ @@ -12572,14 +9662,14 @@ declare namespace _ { isInteger(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isInteger */ isInteger(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isInteger */ @@ -12615,14 +9705,14 @@ declare namespace _ { isLength(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isLength */ isLength(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isLength */ @@ -12637,17 +9727,17 @@ declare namespace _ { * @param value The value to check. * @returns Returns true if value is correctly classified, else false. */ - isMap(value?: any): value is Map; + isMap(value?: any): value is Map; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isMap */ isMap(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isMap */ @@ -12680,14 +9770,14 @@ declare namespace _ { * _.isMatch(object, { 'age': 36 }); * // => false */ - isMatch(object: Object, source: Object): boolean; + isMatch(object: object, source: object): boolean; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.isMatch */ - isMatch(source: Object): boolean; + isMatch(source: object): boolean; } //_.isMatchWith @@ -12725,14 +9815,14 @@ declare namespace _ { * _.isMatchWith(object, source, customizer); * // => true */ - isMatchWith(object: Object, source: Object, customizer: isMatchWithCustomizer): boolean; + isMatchWith(object: object, source: object, customizer: isMatchWithCustomizer): boolean; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.isMatchWith */ - isMatchWith(source: Object, customizer: isMatchWithCustomizer): boolean; + isMatchWith(source: object, customizer: isMatchWithCustomizer): boolean; } //_.isNaN @@ -12748,14 +9838,14 @@ declare namespace _ { isNaN(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isNaN */ isNaN(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isNaN */ @@ -12770,17 +9860,17 @@ declare namespace _ { * * @retrun Returns true if value is a native function, else false. */ - isNative(value: any): value is Function; + isNative(value: any): value is ((...args: any[]) => any) | Function; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isNative */ isNative(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isNative */ @@ -12811,14 +9901,14 @@ declare namespace _ { isNil(value: any): value is null | undefined; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isNil */ isNil(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isNil */ @@ -12836,14 +9926,14 @@ declare namespace _ { isNull(value: any): value is null; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isNull */ isNull(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isNull */ @@ -12863,14 +9953,14 @@ declare namespace _ { isNumber(value?: any): value is number; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isNumber */ isNumber(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isNumber */ @@ -12889,14 +9979,14 @@ declare namespace _ { isObject(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isObject */ isObject(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isObject */ @@ -12931,14 +10021,14 @@ declare namespace _ { isObjectLike(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isObjectLike */ isObjectLike(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isObjectLike */ @@ -12959,14 +10049,14 @@ declare namespace _ { isPlainObject(value?: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isPlainObject */ isPlainObject(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isPlainObject */ @@ -12984,14 +10074,14 @@ declare namespace _ { isRegExp(value?: any): value is RegExp; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isRegExp */ isRegExp(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isRegExp */ @@ -13028,14 +10118,14 @@ declare namespace _ { isSafeInteger(value: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isSafeInteger */ isSafeInteger(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isSafeInteger */ @@ -13050,17 +10140,17 @@ declare namespace _ { * @param value The value to check. * @returns Returns true if value is correctly classified, else false. */ - isSet(value?: any): value is Set; + isSet(value?: any): value is Set; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isSet */ isSet(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isSet */ @@ -13078,14 +10168,14 @@ declare namespace _ { isString(value?: any): value is string; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isString */ isString(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isString */ @@ -13113,14 +10203,14 @@ declare namespace _ { isSymbol(value: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isSymbol */ isSymbol(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isSymbol */ @@ -13138,14 +10228,14 @@ declare namespace _ { isTypedArray(value: any): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isTypedArray */ isTypedArray(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isTypedArray */ @@ -13163,14 +10253,14 @@ declare namespace _ { isUndefined(value: any): value is undefined; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * see _.isUndefined */ isUndefined(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * see _.isUndefined */ @@ -13185,17 +10275,17 @@ declare namespace _ { * @param value The value to check. * @returns Returns true if value is correctly classified, else false. */ - isWeakMap(value?: any): value is WeakMap; + isWeakMap(value?: any): value is WeakMap; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isSet */ isWeakMap(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isSet */ @@ -13213,14 +10303,14 @@ declare namespace _ { isWeakSet(value?: any): value is WeakSet; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.isWeakSet */ isWeakSet(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.isWeakSet */ @@ -13242,14 +10332,14 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.lt */ lt(other: any): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.lt */ @@ -13271,14 +10361,14 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.lte */ lte(other: any): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.lte */ @@ -13293,59 +10383,41 @@ declare namespace _ { * @param value The value to convert. * @return Returns the converted array. */ - toArray(value: List|Dictionary|NumericDictionary): T[]; + toArray(value: List | Dictionary | NumericDictionary | null | undefined): T[]; /** * @see _.toArray */ - toArray(value: TValue): TResult[]; + toArray(value: T): Array; /** * @see _.toArray */ - toArray(value?: any): TResult[]; + toArray(): any[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.toArray */ - toArray(): LoDashImplicitArrayWrapper; + toArray(this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>): LoDashImplicitWrapper; + + /** + * @see _.toArray + */ + toArray(): LoDashImplicitWrapper>; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.toArray */ - toArray(): LoDashImplicitArrayWrapper; - } + toArray(this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>): LoDashExplicitWrapper; - interface LoDashImplicitObjectWrapperBase { /** * @see _.toArray */ - toArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; + toArray(): LoDashExplicitWrapper>; } //_.toPlainObject @@ -13357,14 +10429,21 @@ declare namespace _ { * @param value The value to convert. * @return Returns the converted plain object. */ - toPlainObject(value?: any): TResult; + toPlainObject(value?: any): any; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.toPlainObject */ - toPlainObject(): LoDashImplicitObjectWrapper; + toPlainObject(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toPlainObject + */ + toPlainObject(): LoDashExplicitWrapper; } //_.toFinite @@ -13395,14 +10474,14 @@ declare namespace _ { toFinite(value: any): number; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.toFinite */ - toFinite(): LoDashImplicitWrapper; + toFinite(): number; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.toFinite */ @@ -13438,14 +10517,14 @@ declare namespace _ { toInteger(value: any): number; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.toInteger */ - toInteger(): LoDashImplicitWrapper; + toInteger(): number; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.toInteger */ @@ -13482,14 +10561,14 @@ declare namespace _ { toLength(value: any): number; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.toLength */ - toLength(): LoDashImplicitWrapper; + toLength(): number; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.toLength */ @@ -13523,14 +10602,14 @@ declare namespace _ { toNumber(value: any): number; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.toNumber */ - toNumber(): LoDashImplicitWrapper; + toNumber(): number; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.toNumber */ @@ -13565,21 +10644,21 @@ declare namespace _ { toSafeInteger(value: any): number; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.toSafeInteger */ - toSafeInteger(): LoDashImplicitWrapper; + toSafeInteger(): number; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.toSafeInteger */ toSafeInteger(): LoDashExplicitWrapper; } - //_.toString DUMMY + //_.toString interface LoDashStatic { /** * Converts `value` to a string if it's not one. An empty string is returned @@ -13623,14 +10702,14 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.add */ add(addend: number): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.add */ @@ -13652,14 +10731,14 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.ceil */ ceil(precision?: number): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.ceil */ @@ -13681,14 +10760,14 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.divide */ divide(divisor: number): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.divide */ @@ -13710,14 +10789,14 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.floor */ floor(precision?: number): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.floor */ @@ -13741,18 +10820,18 @@ declare namespace _ { ): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.max */ - max(): T | undefined; + max(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.max */ - max(): T | undefined; + max(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.maxBy @@ -13781,78 +10860,28 @@ declare namespace _ { */ maxBy( collection: List | null | undefined, - iteratee?: ListIterator - ): T | undefined; - - /** - * @see _.maxBy - */ - maxBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): T | undefined; - - /** - * @see _.maxBy - */ - maxBy( - collection: List|Dictionary | null | undefined, - iteratee?: string - ): T | undefined; - - /** - * @see _.maxBy - */ - maxBy( - collection: List|Dictionary | null | undefined, - whereValue?: TObject + iteratee?: ListIteratee ): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.maxBy */ - maxBy( - iteratee?: ListIterator - ): T | undefined; - - /** - * @see _.maxBy - */ - maxBy( - iteratee?: string - ): T | undefined; - - /** - * @see _.maxBy - */ - maxBy( - whereValue?: TObject + maxBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ListIteratee ): T | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.maxBy */ maxBy( - iteratee?: ListIterator|DictionaryIterator - ): T | undefined; - - /** - * @see _.maxBy - */ - maxBy( - iteratee?: string - ): T | undefined; - - /** - * @see _.maxBy - */ - maxBy( - whereValue?: TObject - ): T | undefined; + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashExplicitWrapper; } //_.mean @@ -13870,11 +10899,25 @@ declare namespace _ { * _.mean([4, 2, 8, 6]); * // => 5 */ - mean( - collection: List | null | undefined + mean( + collection: List | null | undefined ): number; } + interface LoDashImplicitWrapper { + /** + * @see _.mean + */ + mean(): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.mean + */ + mean(): LoDashExplicitWrapper; + } + //_.meanBy interface LoDashStatic { /** @@ -13891,27 +10934,30 @@ declare namespace _ { * _.mean([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], 'n'); * // => 5 */ - meanBy( - collection: List | null | undefined, - iteratee?: ListIterator | string - ): number; - - meanBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator | string - ): number; + meanBy( + collection: List | null | undefined, + iteratee?: ListIteratee + ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** - * @see _.mean + * @see _.meanBy */ - mean(): number; + meanBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): number; + } + interface LoDashExplicitWrapper { /** - * @see _.mean + * @see _.meanBy */ - mean(): number; + meanBy( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashExplicitWrapper; } //_.min @@ -13931,18 +10977,18 @@ declare namespace _ { ): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.min */ - min(): T | undefined; + min(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.min */ - min(): T | undefined; + min(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } //_.minBy @@ -13971,78 +11017,28 @@ declare namespace _ { */ minBy( collection: List | null | undefined, - iteratee?: ListIterator - ): T | undefined; - - /** - * @see _.minBy - */ - minBy( - collection: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): T | undefined; - - /** - * @see _.minBy - */ - minBy( - collection: List|Dictionary | null | undefined, - iteratee?: string - ): T | undefined; - - /** - * @see _.minBy - */ - minBy( - collection: List|Dictionary | null | undefined, - whereValue?: TObject + iteratee?: ListIteratee ): T | undefined; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.minBy */ - minBy( - iteratee?: ListIterator - ): T | undefined; - - /** - * @see _.minBy - */ - minBy( - iteratee?: string - ): T | undefined; - - /** - * @see _.minBy - */ - minBy( - whereValue?: TObject + minBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ListIteratee ): T | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.minBy */ minBy( - iteratee?: ListIterator|DictionaryIterator - ): T | undefined; - - /** - * @see _.minBy - */ - minBy( - iteratee?: string - ): T | undefined; - - /** - * @see _.minBy - */ - minBy( - whereValue?: TObject - ): T | undefined; + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashExplicitWrapper; } //_.multiply @@ -14059,14 +11055,14 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.multiply */ multiply(multiplicand: number): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.multiply */ @@ -14088,14 +11084,14 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.round */ round(precision?: number): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.round */ @@ -14117,46 +11113,17 @@ declare namespace _ { * _.sum([4, 2, 8, 6]); * // => 20 */ - sum(collection: List | null | undefined): number; - - /** - * @see _.sum - */ - sum(collection: List|Dictionary | null | undefined): number; + sum(collection: List | null | undefined): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.sum */ sum(): number; } - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.sum - **/ - sum(): number; - - /** - * @see _.sum - */ - sum(): number; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - + interface LoDashExplicitWrapper { /** * @see _.sum */ @@ -14189,112 +11156,28 @@ declare namespace _ { */ sumBy( collection: List | null | undefined, - iteratee: ListIterator - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List<{}> | null | undefined, - iteratee: string - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List | null | undefined - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List<{}> | null | undefined, - iteratee: Dictionary<{}> + iteratee?: ((value: T) => number) | string ): number; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.sumBy */ - sumBy( - iteratee: ListIterator + sumBy( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ((value: T) => number) | string ): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): number; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.sumBy */ - sumBy( - iteratee: ListIterator - ): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): number; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator + sumBy( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ((value: T) => number) | string ): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator - ): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; } /********** @@ -14323,7 +11206,7 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.subtract */ @@ -14332,7 +11215,7 @@ declare namespace _ { ): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.subtract */ @@ -14368,7 +11251,7 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.clamp */ @@ -14378,7 +11261,7 @@ declare namespace _ { ): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.clamp */ @@ -14402,46 +11285,28 @@ declare namespace _ { inRange( n: number, start: number, - end: number - ): boolean; - - /** - * @see _.inRange - */ - inRange( - n: number, - end: number + end?: number ): boolean; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.inRange */ inRange( start: number, - end: number + end?: number ): boolean; - - /** - * @see _.inRange - */ - inRange(end: number): boolean; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.inRange */ inRange( start: number, - end: number + end?: number ): LoDashExplicitWrapper; - - /** - * @see _.inRange - */ - inRange(end: number): LoDashExplicitWrapper; } //_.random @@ -14476,7 +11341,7 @@ declare namespace _ { random(floating?: boolean): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.random */ @@ -14491,7 +11356,7 @@ declare namespace _ { random(floating?: boolean): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.random */ @@ -14585,19 +11450,19 @@ declare namespace _ { /** * @see _.assign */ - assign( + assign( object: any, ...otherArgs: any[] - ): TResult; + ): any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.assign */ assign( source: TSource - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assign @@ -14605,7 +11470,7 @@ declare namespace _ { assign( source1: TSource1, source2: TSource2 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assign @@ -14614,7 +11479,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assign @@ -14624,26 +11489,26 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assign */ - assign(): LoDashImplicitObjectWrapper; + assign(): LoDashImplicitWrapper; /** * @see _.assign */ - assign(...otherArgs: any[]): LoDashImplicitObjectWrapper; + assign(...otherArgs: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.assign */ assign( source: TSource - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assign @@ -14651,7 +11516,7 @@ declare namespace _ { assign( source1: TSource1, source2: TSource2 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assign @@ -14660,7 +11525,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assign @@ -14670,17 +11535,17 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assign */ - assign(): LoDashExplicitObjectWrapper; + assign(): LoDashExplicitWrapper; /** * @see _.assign */ - assign(...otherArgs: any[]): LoDashExplicitObjectWrapper; + assign(...otherArgs: any[]): LoDashExplicitWrapper; } interface LoDashStatic { @@ -14763,14 +11628,14 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.assignWith */ assignWith( source: TSource, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignWith @@ -14779,7 +11644,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignWith @@ -14789,7 +11654,7 @@ declare namespace _ { source2: TSource2, source3: TSource3, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignWith @@ -14800,27 +11665,27 @@ declare namespace _ { source3: TSource3, source4: TSource4, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignWith */ - assignWith(): LoDashImplicitObjectWrapper; + assignWith(): LoDashImplicitWrapper; /** * @see _.assignWith */ - assignWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + assignWith(...otherArgs: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.assignWith */ assignWith( source: TSource, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignWith @@ -14829,7 +11694,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignWith @@ -14839,7 +11704,7 @@ declare namespace _ { source2: TSource2, source3: TSource3, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignWith @@ -14850,17 +11715,17 @@ declare namespace _ { source3: TSource3, source4: TSource4, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignWith */ - assignWith(): LoDashExplicitObjectWrapper; + assignWith(): LoDashExplicitWrapper; /** * @see _.assignWith */ - assignWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + assignWith(...otherArgs: any[]): LoDashExplicitWrapper; } //_.assignIn @@ -14943,13 +11808,13 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.assignIn */ assignIn( source: TSource - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignIn @@ -14957,7 +11822,7 @@ declare namespace _ { assignIn( source1: TSource1, source2: TSource2 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignIn @@ -14966,7 +11831,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignIn @@ -14976,26 +11841,26 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignIn */ - assignIn(): LoDashImplicitObjectWrapper; + assignIn(): LoDashImplicitWrapper; /** * @see _.assignIn */ - assignIn(...otherArgs: any[]): LoDashImplicitObjectWrapper; + assignIn(...otherArgs: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.assignIn */ assignIn( source: TSource - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignIn @@ -15003,7 +11868,7 @@ declare namespace _ { assignIn( source1: TSource1, source2: TSource2 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignIn @@ -15012,7 +11877,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignIn @@ -15022,17 +11887,17 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignIn */ - assignIn(): LoDashExplicitObjectWrapper; + assignIn(): LoDashExplicitWrapper; /** * @see _.assignIn */ - assignIn(...otherArgs: any[]): LoDashExplicitObjectWrapper; + assignIn(...otherArgs: any[]): LoDashExplicitWrapper; } //_.assignInWith @@ -15119,14 +11984,14 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.assignInWith */ assignInWith( source: TSource, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignInWith @@ -15135,7 +12000,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignInWith @@ -15145,7 +12010,7 @@ declare namespace _ { source2: TSource2, source3: TSource3, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see assignInWith @@ -15156,27 +12021,27 @@ declare namespace _ { source3: TSource3, source4: TSource4, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignInWith */ - assignInWith(): LoDashImplicitObjectWrapper; + assignInWith(): LoDashImplicitWrapper; /** * @see _.assignInWith */ - assignInWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + assignInWith(...otherArgs: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.assignInWith */ assignInWith( source: TSource, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignInWith @@ -15185,7 +12050,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignInWith @@ -15195,7 +12060,7 @@ declare namespace _ { source2: TSource2, source3: TSource3, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see assignInWith @@ -15206,17 +12071,17 @@ declare namespace _ { source3: TSource3, source4: TSource4, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignInWith */ - assignInWith(): LoDashExplicitObjectWrapper; + assignInWith(): LoDashExplicitWrapper; /** * @see _.assignInWith */ - assignInWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + assignInWith(...otherArgs: any[]): LoDashExplicitWrapper; } //_.create @@ -15229,24 +12094,24 @@ declare namespace _ { * @param properties The properties to assign to the object. * @return Returns the new object. */ - create( + create( prototype: T, properties?: U ): T & U; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.create */ - create(properties?: U): LoDashImplicitObjectWrapper; + create(properties?: U): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.create */ - create(properties?: U): LoDashExplicitObjectWrapper; + create(properties?: U): LoDashExplicitWrapper; } //_.defaults @@ -15305,19 +12170,19 @@ declare namespace _ { /** * @see _.defaults */ - defaults( + defaults( object: any, ...sources: any[] - ): TResult; + ): any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.defaults */ defaults( source: TSource - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.defaults @@ -15325,7 +12190,7 @@ declare namespace _ { defaults( source1: TSource1, source2: TSource2 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.defaults @@ -15334,7 +12199,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.defaults @@ -15344,26 +12209,26 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.defaults */ - defaults(): LoDashImplicitObjectWrapper; + defaults(): LoDashImplicitWrapper; /** * @see _.defaults */ - defaults(...sources: any[]): LoDashImplicitObjectWrapper; + defaults(...sources: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.defaults */ defaults( source: TSource - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.defaults @@ -15371,7 +12236,7 @@ declare namespace _ { defaults( source1: TSource1, source2: TSource2 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.defaults @@ -15380,7 +12245,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.defaults @@ -15390,17 +12255,17 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.defaults */ - defaults(): LoDashExplicitObjectWrapper; + defaults(): LoDashExplicitWrapper; /** * @see _.defaults */ - defaults(...sources: any[]): LoDashExplicitObjectWrapper; + defaults(...sources: any[]): LoDashExplicitWrapper; } //_.defaultsDeep @@ -15411,16 +12276,23 @@ declare namespace _ { * @param sources The source objects. * @return Returns object. **/ - defaultsDeep( - object: T, - ...sources: any[]): TResult; + defaultsDeep( + object: any, + ...sources: any[]): any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.defaultsDeep **/ - defaultsDeep(...sources: any[]): LoDashImplicitObjectWrapper; + defaultsDeep(...sources: any[]): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.defaultsDeep + **/ + defaultsDeep(...sources: any[]): LoDashExplicitWrapper; } //_.entries @@ -15428,23 +12300,36 @@ declare namespace _ { /** * @see _.toPairs */ - entries(object?: T): [string, any][]; + entries(object?: Dictionary): Array<[string, T]>; - entries(object?: T): [string, TResult][]; - } - - interface LoDashImplicitObjectWrapper { /** * @see _.toPairs */ - entries(): LoDashImplicitArrayWrapper<[string, TResult]>; + entries(object?: object): Array<[string, any]>; } - interface LoDashExplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.toPairs */ - entries(): LoDashExplicitArrayWrapper<[string, TResult]>; + entries(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + + /** + * @see _.toPairs + */ + entries(): LoDashImplicitWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toPairs + */ + entries(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + + /** + * @see _.toPairs + */ + entries(): LoDashExplicitWrapper>; } //_.entriesIn @@ -15452,23 +12337,36 @@ declare namespace _ { /** * @see _.toPairsIn */ - entriesIn(object?: T): [string, any][]; + entriesIn(object?: Dictionary): Array<[string, T]>; - entriesIn(object?: T): [string, TResult][]; - } - - interface LoDashImplicitObjectWrapper { /** * @see _.toPairsIn */ - entriesIn(): LoDashImplicitArrayWrapper<[string, TResult]>; + entriesIn(object?: object): Array<[string, any]>; } - interface LoDashExplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.toPairsIn */ - entriesIn(): LoDashExplicitArrayWrapper<[string, TResult]>; + entriesIn(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + + /** + * @see _.toPairsIn + */ + entriesIn(): LoDashImplicitWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toPairsIn + */ + entriesIn(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + + /** + * @see _.toPairsIn + */ + entriesIn(): LoDashExplicitWrapper>; } // _.extend @@ -15525,13 +12423,13 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.assignIn */ extend( source: TSource - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignIn @@ -15539,7 +12437,7 @@ declare namespace _ { extend( source1: TSource1, source2: TSource2 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignIn @@ -15548,7 +12446,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignIn @@ -15558,26 +12456,26 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignIn */ - extend(): LoDashImplicitObjectWrapper; + extend(): LoDashImplicitWrapper; /** * @see _.assignIn */ - extend(...otherArgs: any[]): LoDashImplicitObjectWrapper; + extend(...otherArgs: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.assignIn */ extend( source: TSource - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignIn @@ -15585,7 +12483,7 @@ declare namespace _ { extend( source1: TSource1, source2: TSource2 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignIn @@ -15594,7 +12492,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignIn @@ -15604,17 +12502,17 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignIn */ - extend(): LoDashExplicitObjectWrapper; + extend(): LoDashExplicitWrapper; /** * @see _.assignIn */ - extend(...otherArgs: any[]): LoDashExplicitObjectWrapper; + extend(...otherArgs: any[]): LoDashExplicitWrapper; } interface LoDashStatic { @@ -15674,14 +12572,14 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.assignInWith */ extendWith( source: TSource, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignInWith @@ -15690,7 +12588,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignInWith @@ -15700,7 +12598,7 @@ declare namespace _ { source2: TSource2, source3: TSource3, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignInWith @@ -15711,27 +12609,27 @@ declare namespace _ { source3: TSource3, source4: TSource4, customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.assignInWith */ - extendWith(): LoDashImplicitObjectWrapper; + extendWith(): LoDashImplicitWrapper; /** * @see _.assignInWith */ - extendWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + extendWith(...otherArgs: any[]): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.assignInWith */ extendWith( source: TSource, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignInWith @@ -15740,7 +12638,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignInWith @@ -15750,7 +12648,7 @@ declare namespace _ { source2: TSource2, source3: TSource3, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignInWith @@ -15761,17 +12659,17 @@ declare namespace _ { source3: TSource3, source4: TSource4, customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.assignInWith */ - extendWith(): LoDashExplicitObjectWrapper; + extendWith(): LoDashExplicitWrapper; /** * @see _.assignInWith */ - extendWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + extendWith(...otherArgs: any[]): LoDashExplicitWrapper; } //_.findKey @@ -15794,93 +12692,29 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the key of the matched element, else undefined. */ - findKey( - object: TObject, - predicate?: DictionaryIterator - ): string | undefined; - - /** - * @see _.findKey - */ - findKey( - object: TObject, - predicate?: ObjectIterator - ): string | undefined; - - /** - * @see _.findKey - */ - findKey( - object: TObject, - predicate?: string - ): string | undefined; - - /** - * @see _.findKey - */ - findKey, TObject>( - object: TObject, - predicate?: TWhere + findKey( + object: T | null | undefined, + predicate?: ObjectIteratee ): string | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.findKey */ - findKey( - predicate?: DictionaryIterator - ): string | undefined; - - /** - * @see _.findKey - */ - findKey( - predicate?: ObjectIterator - ): string | undefined; - - /** - * @see _.findKey - */ - findKey( - predicate?: string - ): string | undefined; - - /** - * @see _.findKey - */ - findKey>( - predicate?: TWhere + findKey( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee ): string | undefined; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.findKey */ - findKey( - predicate?: DictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey( - predicate?: ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey>( - predicate?: TWhere + findKey( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee ): LoDashExplicitWrapper; } @@ -15903,93 +12737,29 @@ declare namespace _ { * @param thisArg The this binding of predicate. * @return Returns the key of the matched element, else undefined. */ - findLastKey( - object: TObject, - predicate?: DictionaryIterator - ): string | undefined; - - /** - * @see _.findLastKey - */ - findLastKey( - object: TObject, - predicate?: ObjectIterator - ): string | undefined; - - /** - * @see _.findLastKey - */ - findLastKey( - object: TObject, - predicate?: string - ): string; - - /** - * @see _.findLastKey - */ - findLastKey, TObject>( - object: TObject, - predicate?: TWhere + findLastKey( + object: T | null | undefined, + predicate?: ObjectIteratee ): string | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.findLastKey */ - findLastKey( - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: ObjectIterator - ): string | undefined; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: string - ): string | undefined; - - /** - * @see _.findLastKey - */ - findLastKey>( - predicate?: TWhere + findLastKey( + this: LoDashImplicitWrapper, + predicate?: ObjectIteratee ): string | undefined; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.findLastKey */ - findLastKey( - predicate?: DictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey>( - predicate?: TWhere + findLastKey( + this: LoDashExplicitWrapper, + predicate?: ObjectIteratee ): LoDashExplicitWrapper; } @@ -16006,43 +12776,27 @@ declare namespace _ { * @return Returns object. */ forIn( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; + object: T, + iteratee?: ObjectIterator + ): T; /** * @see _.forIn */ forIn( - object: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary | null | undefined; - - /** - * @see _.forIn - */ - forIn( - object: T, - iteratee?: ObjectIterator - ): T; + object: T | null | undefined, + iteratee?: ObjectIterator + ): T | null | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashWrapper { /** * @see _.forIn */ - forIn( - iteratee?: DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forIn - */ - forIn( - iteratee?: DictionaryIterator - ): TWrapper; + forIn( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.forInRight @@ -16056,43 +12810,27 @@ declare namespace _ { * @return Returns object. */ forInRight( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; + object: T, + iteratee?: ObjectIterator + ): T; /** * @see _.forInRight */ forInRight( - object: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary | null | undefined; - - /** - * @see _.forInRight - */ - forInRight( - object: T, - iteratee?: ObjectIterator - ): T; + object: T | null | undefined, + iteratee?: ObjectIterator + ): T | null | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashWrapper { /** * @see _.forInRight */ - forInRight( - iteratee?: DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forInRight - */ - forInRight( - iteratee?: DictionaryIterator - ): TWrapper; + forInRight( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.forOwn @@ -16108,43 +12846,27 @@ declare namespace _ { * @return Returns object. */ forOwn( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; + object: T, + iteratee?: ObjectIterator + ): T; /** * @see _.forOwn */ forOwn( - object: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary | null | undefined; - - /** - * @see _.forOwn - */ - forOwn( - object: T, - iteratee?: ObjectIterator - ): T; + object: T | null | undefined, + iteratee?: ObjectIterator + ): T | null | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashWrapper { /** * @see _.forOwn */ - forOwn( - iteratee?: DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forOwn - */ - forOwn( - iteratee?: DictionaryIterator - ): TWrapper; + forOwn( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.forOwnRight @@ -16158,43 +12880,27 @@ declare namespace _ { * @return Returns object. */ forOwnRight( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; + object: T, + iteratee?: ObjectIterator + ): T; /** * @see _.forOwnRight */ forOwnRight( - object: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary | null | undefined; - - /** - * @see _.forOwnRight - */ - forOwnRight( - object: T, - iteratee?: ObjectIterator - ): T; + object: T | null | undefined, + iteratee?: ObjectIterator + ): T | null | undefined; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashWrapper { /** * @see _.forOwnRight */ - forOwnRight( - iteratee?: DictionaryIterator - ): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.forOwnRight - */ - forOwnRight( - iteratee?: DictionaryIterator - ): TWrapper; + forOwnRight( + this: LoDashWrapper, + iteratee?: ObjectIterator + ): this; } //_.functions @@ -16220,21 +12926,21 @@ declare namespace _ { * _.functions(new Foo); * // => ['a', 'b'] */ - functions(object: any): string[]; + functions(object: any): string[]; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.functions */ - functions(): _.LoDashImplicitArrayWrapper; + functions(): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.functions */ - functions(): _.LoDashExplicitArrayWrapper; + functions(): LoDashExplicitWrapper; } //_.functionsIn @@ -16263,18 +12969,18 @@ declare namespace _ { functionsIn(object: any): string[]; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.functionsIn */ - functionsIn(): _.LoDashImplicitArrayWrapper; + functionsIn(): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.functionsIn */ - functionsIn(): _.LoDashExplicitArrayWrapper; + functionsIn(): LoDashExplicitWrapper; } //_.get @@ -16288,80 +12994,155 @@ declare namespace _ { * @param defaultValue The value returned if the resolved value is undefined. * @return Returns the resolved value. */ - get( + get( object: TObject, - path: Many, - defaultValue?: TResult - ): TResult; + path: TKey | [TKey] + ): TObject[TKey]; /** * @see _.get */ - get( + get( + object: TObject | null | undefined, + path: TKey | [TKey] + ): TObject[TKey] | undefined; + + /** + * @see _.get + */ + get( + object: TObject | null | undefined, + path: TKey | [TKey], + defaultValue: TDefault + ): TObject[TKey] | TDefault; + + /** + * @see _.get + */ + get( + object: null | undefined, + path: Many, + defaultValue: TDefault + ): TDefault; + + /** + * @see _.get + */ + get( + object: null | undefined, + path: Many + ): undefined; + + /** + * @see _.get + */ + get( object: any, path: Many, - defaultValue?: TResult - ): TResult; + defaultValue?: any + ): any; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { + /** + * @see _.get + */ + get( + path: TKey | [TKey] + ): TValue[TKey]; + + /** + * @see _.get + */ + get( + this: LoDashImplicitWrapper, + path: TKey | [TKey], + ): TObject[TKey] | undefined; + + /** + * @see _.get + */ + get( + this: LoDashImplicitWrapper, + path: TKey | [TKey], + defaultValue: TDefault + ): TObject[TKey] | TDefault; + + /** + * @see _.get + */ + get( + this: LoDashImplicitWrapper, + path: Many, + defaultValue: TDefault + ): TDefault; + + /** + * @see _.get + */ + get( + this: LoDashImplicitWrapper, + path: Many + ): undefined; + /** * @see _.get */ get( path: Many, - defaultValue?: TResult - ): TResult; + defaultValue?: any + ): any; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.get */ - get( + get( + path: TKey | [TKey] + ): LoDashExplicitWrapper; + + /** + * @see _.get + */ + get( + this: LoDashExplicitWrapper, + path: TKey | [TKey], + ): LoDashExplicitWrapper; + + /** + * @see _.get + */ + get( + this: LoDashExplicitWrapper, + path: TKey | [TKey], + defaultValue: TDefault + ): LoDashExplicitWrapper; + + /** + * @see _.get + */ + get( + this: LoDashExplicitWrapper, path: Many, - defaultValue?: TResult - ): TResult; - } + defaultValue: TDefault + ): LoDashExplicitWrapper; - interface LoDashImplicitObjectWrapperBase { /** * @see _.get */ - get( - path: Many, - defaultValue?: TResult - ): TResult; - } + get( + this: LoDashExplicitWrapper, + path: Many + ): LoDashExplicitWrapper; - interface LoDashExplicitWrapper { /** * @see _.get */ - get( + get( path: Many, defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.get - */ - get( - path: Many, - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.get - */ - get( - path: Many, - defaultValue?: any - ): TResultWrapper; + ): LoDashExplicitWrapper; } //_.has @@ -16392,20 +13173,20 @@ declare namespace _ { * _.has(other, 'a'); * // => false */ - has( + has( object: T, path: Many ): boolean; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.has */ has(path: Many): boolean; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.has */ @@ -16439,20 +13220,20 @@ declare namespace _ { * _.hasIn(object, 'b'); * // => false */ - hasIn( + hasIn( object: T, path: Many ): boolean; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.hasIn */ hasIn(path: Many): boolean; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.hasIn */ @@ -16469,37 +13250,26 @@ declare namespace _ { * @param multiValue Allow multiple values per key. * @return Returns the new inverted object. */ - invert( - object: T, - multiValue?: boolean - ): TResult; + invert( + object: object + ): Dictionary; + } + interface LoDashImplicitWrapper { /** * @see _.invert */ - invert( - object: Object, - multiValue?: boolean - ): TResult; + invert(): LoDashImplicitWrapper>; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.invert */ - invert(multiValue?: boolean): LoDashImplicitObjectWrapper; + invert(): LoDashExplicitWrapper>; } - interface LoDashExplicitObjectWrapper { - /** - * @see _.invert - */ - invert(multiValue?: boolean): LoDashExplicitObjectWrapper; - } - - //_.inverBy - type InvertByIterator = (value: T) => any; - + //_.invertBy interface LoDashStatic { /** * This method is like _.invert except that the inverted object is generated from the results of running each @@ -16510,116 +13280,54 @@ declare namespace _ { * @param interatee The iteratee invoked per element. * @return Returns the new inverted object. */ - invertBy( - object: Object, - interatee?: InvertByIterator|string + invertBy( + object: List | Dictionary | NumericDictionary | null | undefined, + interatee?: ValueIteratee ): Dictionary; + /** + * @see _.invertBy + */ + invertBy( + object: T | null | undefined, + interatee?: ValueIteratee + ): Dictionary; + } + + interface LoDashImplicitWrapper { /** * @see _.invertBy */ invertBy( - object: _.Dictionary|_.NumericDictionary, - interatee?: InvertByIterator|string - ): Dictionary; + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, + interatee?: ValueIteratee + ): LoDashImplicitWrapper>; /** * @see _.invertBy */ - invertBy( - object: Object, - interatee?: W - ): Dictionary; - - /** - * @see _.invertBy - */ - invertBy( - object: _.Dictionary, - interatee?: W - ): Dictionary; + invertBy( + this: LoDashImplicitWrapper, + interatee?: ValueIteratee + ): LoDashImplicitWrapper>; } - interface LoDashImplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.invertBy */ - invertBy( - interatee?: InvertByIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashImplicitObjectWrapper>; + invertBy( + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, + interatee?: ValueIteratee + ): LoDashExplicitWrapper>; /** * @see _.invertBy */ - invertBy( - interatee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashExplicitObjectWrapper>; + invertBy( + this: LoDashExplicitWrapper, + interatee?: ValueIteratee + ): LoDashExplicitWrapper>; } //_.keys @@ -16635,18 +13343,18 @@ declare namespace _ { keys(object?: any): string[]; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.keys */ - keys(): LoDashImplicitArrayWrapper; + keys(): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.keys */ - keys(): LoDashExplicitArrayWrapper; + keys(): LoDashExplicitWrapper; } //_.keysIn @@ -16662,18 +13370,18 @@ declare namespace _ { keysIn(object?: any): string[]; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.keysIn */ - keysIn(): LoDashImplicitArrayWrapper; + keysIn(): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.keysIn */ - keysIn(): LoDashExplicitArrayWrapper; + keysIn(): LoDashExplicitWrapper; } //_.mapKeys @@ -16687,126 +13395,78 @@ declare namespace _ { * @param thisArg The this binding of iteratee. * @return Returns the new mapped object. */ - mapKeys( + mapKeys( object: List | null | undefined, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: Dictionary | null | undefined, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: List|Dictionary | null | undefined, - iteratee?: TObject + iteratee?: ListIteratee ): Dictionary; /** * @see _.mapKeys */ mapKeys( - object: List|Dictionary | null | undefined, - iteratee?: string + object: Dictionary | null | undefined, + iteratee?: DictionaryIteratee ): Dictionary; - } - - interface LoDashImplicitArrayWrapperBase { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashImplicitObjectWrapper>; /** * @see _.mapKeys */ mapKeys( - iteratee?: string - ): LoDashImplicitObjectWrapper>; + object: object | null | undefined, + iteratee?: ObjectIteratee + ): Dictionary; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.mapKeys */ - mapKeys( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; + mapKeys( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashImplicitWrapper>; /** * @see _.mapKeys */ - mapKeys( - iteratee?: TObject - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashExplicitObjectWrapper>; + mapKeys( + this: LoDashImplicitWrapper | null | undefined>, + iteratee?: DictionaryIteratee + ): LoDashImplicitWrapper>; /** * @see _.mapKeys */ mapKeys( - iteratee?: string - ): LoDashExplicitObjectWrapper>; + this: LoDashImplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.mapKeys */ - mapKeys( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; + mapKeys( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: ListIteratee + ): LoDashExplicitWrapper>; /** * @see _.mapKeys */ - mapKeys( - iteratee?: TObject - ): LoDashExplicitObjectWrapper>; + mapKeys( + this: LoDashExplicitWrapper | null | undefined>, + iteratee?: DictionaryIteratee + ): LoDashExplicitWrapper>; /** * @see _.mapKeys */ - mapKeys( - iteratee?: string - ): LoDashExplicitObjectWrapper>; + mapKeys( + this: LoDashExplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashExplicitWrapper>; } //_.mapValues @@ -16830,56 +13490,171 @@ declare namespace _ { * @param {Object} [thisArg] The `this` binding of `iteratee`. * @return {Object} Returns the new mapped object. */ - mapValues(obj: Dictionary | null | undefined, callback: ObjectIterator): Dictionary; - mapValues(obj: Dictionary | null | undefined, where: Dictionary): Dictionary; - mapValues(obj: T | null | undefined, pluck?: string): TMapped; - mapValues(obj: T | null | undefined, callback: ObjectIterator): T; + mapValues(obj: T | null | undefined, callback: ObjectIterator): { [P in keyof T]: TResult }; + + /** + * @see _.mapValues + */ + mapValues(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean }; + + /** + * @see _.mapValues + */ + mapValues(obj: Dictionary | null | undefined, iteratee: TKey): Dictionary; + + /** + * @see _.mapValues + */ + mapValues(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any }; + + /** + * @see _.mapValues + */ + mapValues(obj: string | null | undefined, callback: StringIterator): NumericDictionary; + + /** + * @see _.mapValues + */ + mapValues(obj: Dictionary | null | undefined): Dictionary; + + /** + * @see _.mapValues + */ + mapValues(obj: T): T; + + /** + * @see _.mapValues + */ + mapValues(obj: T | null | undefined): T | {}; + + /** + * @see _.mapValues + */ + mapValues(obj: string | null | undefined): NumericDictionary; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.mapValues - * TValue is the type of the property values of T. - * TResult is the type output by the ObjectIterator function */ - mapValues(callback: ObjectIterator): LoDashImplicitObjectWrapper>; + mapValues( + this: LoDashImplicitWrapper, + callback: ObjectIterator + ): LoDashImplicitWrapper<{ [P in keyof T]: TResult }>; /** * @see _.mapValues - * TResult is the type of the property specified by pluck. - * T should be a Dictionary> */ - mapValues(pluck?: string): LoDashImplicitObjectWrapper>; + mapValues( + this: LoDashImplicitWrapper, + iteratee: object + ): LoDashImplicitWrapper<{ [P in keyof T]: boolean }>; /** * @see _.mapValues - * TResult is the type of the properties of each object in the values of T - * T should be a Dictionary> */ - mapValues(where: Dictionary): LoDashImplicitArrayWrapper; + mapValues( + this: LoDashImplicitWrapper | null | undefined>, + iteratee: TKey + ): LoDashImplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues( + this: LoDashImplicitWrapper, + iteratee: string + ): LoDashImplicitWrapper<{ [P in keyof T]: any }>; + + /** + * @see _.mapValues + */ + mapValues( + this: LoDashImplicitWrapper, + callback: StringIterator + ): LoDashImplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashImplicitWrapper): LoDashImplicitWrapper; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashImplicitWrapper): LoDashImplicitWrapper; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashImplicitWrapper): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.mapValues - * TValue is the type of the property values of T. - * TResult is the type output by the ObjectIterator function */ - mapValues(callback: ObjectIterator): LoDashExplicitObjectWrapper>; + mapValues( + this: LoDashExplicitWrapper, + callback: ObjectIterator + ): LoDashExplicitWrapper<{ [P in keyof T]: TResult }>; /** * @see _.mapValues - * TResult is the type of the property specified by pluck. - * T should be a Dictionary> */ - mapValues(pluck?: string): LoDashExplicitObjectWrapper>; + mapValues( + this: LoDashExplicitWrapper, + iteratee: object + ): LoDashExplicitWrapper<{ [P in keyof T]: boolean }>; /** * @see _.mapValues - * TResult is the type of the properties of each object in the values of T - * T should be a Dictionary> */ - mapValues(where: Dictionary): LoDashExplicitObjectWrapper; + mapValues( + this: LoDashExplicitWrapper | null | undefined>, + iteratee: TKey + ): LoDashExplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues( + this: LoDashExplicitWrapper, + iteratee: string + ): LoDashExplicitWrapper<{ [P in keyof T]: any }>; + + /** + * @see _.mapValues + */ + mapValues( + this: LoDashExplicitWrapper, + callback: StringIterator + ): LoDashExplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashExplicitWrapper): LoDashExplicitWrapper; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashExplicitWrapper): LoDashExplicitWrapper; + + /** + * @see _.mapValues + */ + mapValues(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; } //_.merge @@ -16951,19 +13726,19 @@ declare namespace _ { /** * @see _.merge */ - merge( + merge( object: any, ...otherArgs: any[] - ): TResult; + ): any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.merge */ merge( source: TSource - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.merge @@ -16971,7 +13746,7 @@ declare namespace _ { merge( source1: TSource1, source2: TSource2 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.merge @@ -16980,7 +13755,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.merge @@ -16990,23 +13765,23 @@ declare namespace _ { source2: TSource2, source3: TSource3, source4: TSource4 - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.merge */ - merge( + merge( ...otherArgs: any[] - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.merge */ merge( source: TSource - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.merge @@ -17014,7 +13789,7 @@ declare namespace _ { merge( source1: TSource1, source2: TSource2 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.merge @@ -17023,20 +13798,20 @@ declare namespace _ { source1: TSource1, source2: TSource2, source3: TSource3 - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.merge */ merge( - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; /** * @see _.merge */ - merge( + merge( ...otherArgs: any[] - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; } //_.mergeWith @@ -17120,20 +13895,20 @@ declare namespace _ { /** * @see _.mergeWith */ - mergeWith( + mergeWith( object: any, ...otherArgs: any[] - ): TResult; + ): any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.mergeWith */ mergeWith( source: TSource, customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.mergeWith @@ -17142,7 +13917,7 @@ declare namespace _ { source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.mergeWith @@ -17152,7 +13927,7 @@ declare namespace _ { source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.mergeWith @@ -17163,14 +13938,14 @@ declare namespace _ { source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; /** * @see _.mergeWith */ - mergeWith( + mergeWith( ...otherArgs: any[] - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; } //_.omit @@ -17194,28 +13969,30 @@ declare namespace _ { * // => { 'b': '2' } */ - omit( + omit( object: T | null | undefined, - ...predicate: Array> - ): TResult; + ...props: Array> + ): PartialObject; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.omit */ - omit( - ...predicate: Array> - ): LoDashImplicitObjectWrapper; + omit( + this: LoDashImplicitWrapper, + ...props: Array> + ): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.omit */ - omit( + omit( + this: LoDashExplicitWrapper, ...predicate: Array> - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper>; } //_.omitBy @@ -17238,28 +14015,30 @@ declare namespace _ { * _.omitBy(object, _.isNumber); * // => { 'b': '2' } */ - omitBy( + omitBy( object: T | null | undefined, - predicate: ObjectIterator - ): TResult; + predicate: ValueKeyIteratee + ): PartialObject; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.omitBy */ - omitBy( - predicate: ObjectIterator - ): LoDashImplicitObjectWrapper; + omitBy( + this: LoDashImplicitWrapper, + predicate: ValueKeyIteratee + ): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.omitBy */ - omitBy( - predicate: ObjectIterator - ): LoDashExplicitObjectWrapper; + omitBy( + this: LoDashExplicitWrapper, + predicate: ValueKeyIteratee + ): LoDashExplicitWrapper>; } //_.pick @@ -17281,35 +14060,37 @@ declare namespace _ { * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - pick( + pick( object: T | null | undefined, ...predicate: Array> - ): TResult; + ): PartialObject; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.pick */ - pick( + pick( + this: LoDashImplicitWrapper, ...predicate: Array> - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.pick */ - pick( + pick( + this: LoDashExplicitWrapper, ...predicate: Array> - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper>; } //_.pickBy interface LoDashStatic { /** * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with one argument: (value). + * truthy for. The predicate is invoked with two arguments: (value, key). * * @static * @memberOf _ @@ -17324,28 +14105,30 @@ declare namespace _ { * _.pickBy(object, _.isNumber); * // => { 'a': 1, 'c': 3 } */ - pickBy( + pickBy( object: T | null | undefined, - predicate?: ObjectIterator - ): TResult; + predicate?: ValueKeyIteratee + ): PartialObject; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.pickBy */ - pickBy( - predicate?: ObjectIterator - ): LoDashImplicitObjectWrapper; + pickBy( + this: LoDashImplicitWrapper, + predicate?: ValueKeyIteratee + ): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.pickBy */ - pickBy( - predicate?: ObjectIterator - ): LoDashExplicitObjectWrapper; + pickBy( + this: LoDashExplicitWrapper, + predicate?: ValueKeyIteratee + ): LoDashExplicitWrapper>; } //_.result @@ -17359,15 +14142,6 @@ declare namespace _ { * @param defaultValue The value returned if the resolved value is undefined. * @return Returns the resolved value. */ - result( - object: TObject, - path: Many, - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - - /** - * @see _.result - */ result( object: any, path: Many, @@ -17375,7 +14149,7 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.result */ @@ -17385,54 +14159,14 @@ declare namespace _ { ): TResult; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.result */ result( path: Many, defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.result - */ - result( - path: Many, - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.result - */ - result( - path: Many, - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.result - */ - result( - path: Many, - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.result - */ - result( - path: Many, - defaultValue?: any - ): TResultWrapper; + ): LoDashExplicitWrapper; } //_.set @@ -17447,65 +14181,56 @@ declare namespace _ { * @param value The value to set. * @return Returns object. */ - set( - object: Object, + set( + object: T, path: Many, value: any - ): TResult; + ): T; /** * @see _.set */ - set( - object: Object, + set( + object: object, path: Many, - value: V - ): TResult; - - /** - * @see _.set - */ - set( - object: O, - path: Many, - value: V + value: any ): TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { + /** + * @see _.set + */ + set( + path: Many, + value: any + ): this; + /** * @see _.set */ set( path: Many, value: any - ): LoDashImplicitObjectWrapper; - - /** - * @see _.set - */ - set( - path: Many, - value: V - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { + /** + * @see _.set + */ + set( + path: Many, + value: any + ): this; + /** * @see _.set */ set( path: Many, value: any - ): LoDashExplicitObjectWrapper; - - /** - * @see _.set - */ - set( - path: Many, - value: V - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; } //_.setWith @@ -17523,72 +14248,59 @@ declare namespace _ { * @parem customizer The function to customize assigned values. * @return Returns object. */ - setWith( - object: O, - path: Many, - value: V, - customizer?: SetWithCustomizer - ): TResult; - - /** - * @see _.setWith - */ - setWith( - object: any, + setWith( + object: T, path: Many, value: any, - customizer?: SetWithCustomizer - ): TResult; + customizer?: SetWithCustomizer + ): T; - /** - * @see _.setWith - */ - setWith( - object: any, + setWith( + object: T, path: Many, - value: V, - customizer?: SetWithCustomizer + value: any, + customizer?: SetWithCustomizer ): TResult; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { + /** + * @see _.setWith + */ + setWith( + path: Many, + value: any, + customizer?: SetWithCustomizer + ): this; + /** * @see _.setWith */ setWith( path: Many, value: any, - customizer?: SetWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.setWith - */ - setWith( - path: Many, - value: V, - customizer?: SetWithCustomizer - ): LoDashImplicitObjectWrapper; + customizer?: SetWithCustomizer + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { + /** + * @see _.setWith + */ + setWith( + path: Many, + value: any, + customizer?: SetWithCustomizer + ): this; + /** * @see _.setWith */ setWith( path: Many, value: any, - customizer?: SetWithCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.setWith - */ - setWith( - path: Many, - value: V, - customizer?: SetWithCustomizer - ): LoDashExplicitObjectWrapper; + customizer?: SetWithCustomizer + ): LoDashExplicitWrapper; } //_.toPairs @@ -17599,23 +14311,36 @@ declare namespace _ { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairs(object?: T): [string, any][]; + toPairs(object?: Dictionary): Array<[string, T]>; - toPairs(object?: T): [string, TResult][]; - } - - interface LoDashImplicitObjectWrapper { /** * @see _.toPairs */ - toPairs(): LoDashImplicitArrayWrapper<[string, TResult]>; + toPairs(object?: object): Array<[string, any]>; } - interface LoDashExplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.toPairs */ - toPairs(): LoDashExplicitArrayWrapper<[string, TResult]>; + toPairs(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + + /** + * @see _.toPairs + */ + toPairs(): LoDashImplicitWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toPairs + */ + toPairs(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + + /** + * @see _.toPairs + */ + toPairs(): LoDashExplicitWrapper>; } //_.toPairsIn @@ -17626,23 +14351,36 @@ declare namespace _ { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairsIn(object?: T): [string, any][]; + toPairsIn(object?: Dictionary): Array<[string, T]>; - toPairsIn(object?: T): [string, TResult][]; - } - - interface LoDashImplicitObjectWrapper { /** * @see _.toPairsIn */ - toPairsIn(): LoDashImplicitArrayWrapper<[string, TResult]>; + toPairsIn(object?: object): Array<[string, any]>; } - interface LoDashExplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.toPairsIn */ - toPairsIn(): LoDashExplicitArrayWrapper<[string, TResult]>; + toPairsIn(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + + /** + * @see _.toPairsIn + */ + toPairsIn(): LoDashImplicitWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toPairsIn + */ + toPairsIn(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + + /** + * @see _.toPairsIn + */ + toPairsIn(): LoDashExplicitWrapper>; } //_.transform @@ -17661,7 +14399,7 @@ declare namespace _ { */ transform( object: T[], - iteratee?: MemoVoidArrayIterator, + iteratee: MemoVoidArrayIterator, accumulator?: TResult[] ): TResult[]; @@ -17670,7 +14408,16 @@ declare namespace _ { */ transform( object: T[], - iteratee?: MemoVoidArrayIterator>, + iteratee: MemoVoidArrayIterator>, + accumulator: Dictionary + ): Dictionary; + + /** + * @see _.transform + */ + transform( + object: Dictionary, + iteratee: MemoVoidDictionaryIterator>, accumulator?: Dictionary ): Dictionary; @@ -17679,54 +14426,123 @@ declare namespace _ { */ transform( object: Dictionary, - iteratee?: MemoVoidDictionaryIterator>, - accumulator?: Dictionary - ): Dictionary; - - /** - * @see _.transform - */ - transform( - object: Dictionary, - iteratee?: MemoVoidDictionaryIterator, - accumulator?: TResult[] + iteratee: MemoVoidDictionaryIterator, + accumulator: TResult[] ): TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidArrayIterator, - accumulator?: TResult[] - ): LoDashImplicitArrayWrapper; /** * @see _.transform */ - transform( - iteratee?: MemoVoidArrayIterator>, - accumulator?: Dictionary - ): LoDashImplicitObjectWrapper>; + transform( + object: any[], + ): any[]; + + /** + * @see _.transform + */ + transform( + object: object, + ): Dictionary; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.transform */ transform( - iteratee?: MemoVoidDictionaryIterator>, - accumulator?: Dictionary - ): LoDashImplicitObjectWrapper>; + this: LoDashImplicitWrapper, + iteratee: MemoVoidArrayIterator, + accumulator?: TResult[] + ): LoDashImplicitWrapper; /** * @see _.transform */ transform( - iteratee?: MemoVoidDictionaryIterator, + this: LoDashImplicitWrapper, + iteratee: MemoVoidArrayIterator>, + accumulator: Dictionary + ): LoDashImplicitWrapper>; + + /** + * @see _.transform + */ + transform( + this: LoDashImplicitWrapper>, + iteratee: MemoVoidDictionaryIterator>, + accumulator?: Dictionary + ): LoDashImplicitWrapper>; + + /** + * @see _.transform + */ + transform( + this: LoDashImplicitWrapper>, + iteratee: MemoVoidDictionaryIterator, + accumulator: TResult[] + ): LoDashImplicitWrapper; + + /** + * @see _.transform + */ + transform( + this: LoDashImplicitWrapper, + ): LoDashImplicitWrapper; + + /** + * @see _.transform + */ + transform(): LoDashImplicitWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.transform + */ + transform( + this: LoDashExplicitWrapper, + iteratee: MemoVoidArrayIterator, accumulator?: TResult[] - ): LoDashImplicitArrayWrapper; + ): LoDashExplicitWrapper; + + /** + * @see _.transform + */ + transform( + this: LoDashExplicitWrapper, + iteratee: MemoVoidArrayIterator>, + accumulator?: Dictionary + ): LoDashExplicitWrapper>; + + /** + * @see _.transform + */ + transform( + this: LoDashExplicitWrapper>, + iteratee: MemoVoidDictionaryIterator>, + accumulator?: Dictionary + ): LoDashExplicitWrapper>; + + /** + * @see _.transform + */ + transform( + this: LoDashExplicitWrapper>, + iteratee: MemoVoidDictionaryIterator, + accumulator?: TResult[] + ): LoDashExplicitWrapper; + + /** + * @see _.transform + */ + transform( + this: LoDashExplicitWrapper, + ): LoDashExplicitWrapper; + + /** + * @see _.transform + */ + transform(): LoDashExplicitWrapper>; } //_.unset @@ -17740,20 +14556,20 @@ declare namespace _ { * @param path The path of the property to unset. * @return Returns true if the property is deleted, else false. */ - unset( - object: T, + unset( + object: any, path: Many ): boolean; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.unset */ unset(path: Many): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.unset */ @@ -17771,74 +14587,31 @@ declare namespace _ { * @param updater The function to produce the updated value. * @return Returns object. */ - update( - object: Object, + update( + object: object, path: Many, - updater: Function - ): TResult; - - /** - * @see _.update - */ - update( - object: Object, - path: Many, - updater: U - ): TResult; - - /** - * @see _.update - */ - update( - object: O, - path: Many, - updater: Function - ): TResult; - - /** - * @see _.update - */ - update( - object: O, - path: Many, - updater: U - ): TResult; + updater: (value: any) => any + ): any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.update */ - update( + update( path: Many, - updater: any - ): LoDashImplicitObjectWrapper; - - /** - * @see _.update - */ - update( - path: Many, - updater: U - ): LoDashImplicitObjectWrapper; + updater: (value: any) => any + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.update */ - update( + update( path: Many, - updater: any - ): LoDashExplicitObjectWrapper; - - /** - * @see _.update - */ - update( - path: Many, - updater: U - ): LoDashExplicitObjectWrapper; + updater: (value: any) => any + ): LoDashExplicitWrapper; } //_.updateWith @@ -17867,44 +14640,62 @@ declare namespace _ { * _.updateWith(object, '[0][1]', _.constant('a'), Object); * // => { '0': { '1': 'a' } } */ - updateWith( - object: O, - path: Many, - updater: (oldValue: any) => any, - customizer?: SetWithCustomizer - ): TResult; - - /** - * @see _.updateWith - */ - updateWith( - object: any, - path: Many, - updater: (oldValue: any) => any, - customizer?: SetWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.updateWith - */ - updateWith( + updateWith( + object: T, path: Many, updater: (oldValue: any) => any, customizer?: SetWithCustomizer - ): LoDashImplicitObjectWrapper; + ): T; + + /** + * @see _.updateWith + */ + updateWith( + object: T, + path: Many, + updater: (oldValue: any) => any, + customizer?: SetWithCustomizer + ): TResult; } - interface LoDashExplicitObjectWrapper { + interface LoDashImplicitWrapper { + /** + * @see _.updateWith + */ + updateWith( + path: Many, + updater: (oldValue: any) => any, + customizer?: SetWithCustomizer + ): this; + /** * @see _.updateWith */ updateWith( path: Many, updater: (oldValue: any) => any, - customizer?: SetWithCustomizer - ): LoDashExplicitObjectWrapper; + customizer?: SetWithCustomizer + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.updateWith + */ + updateWith( + path: Many, + updater: (oldValue: any) => any, + customizer?: SetWithCustomizer + ): this; + + /** + * @see _.updateWith + */ + updateWith( + path: Many, + updater: (oldValue: any) => any, + customizer?: SetWithCustomizer + ): LoDashExplicitWrapper; } //_.values @@ -17915,61 +14706,51 @@ declare namespace _ { * @param object The object to query. * @return Returns an array of property values. */ - values(object?: Dictionary|NumericDictionary|List | null | undefined): T[]; + values(object: Dictionary|NumericDictionary|List | null | undefined): T[]; /** * @see _.values */ - values(object?: any): T[]; + values(object: T | null | undefined): Array; + + /** + * @see _.values + */ + values(object: any): any[]; } - interface LoDashImplicitStringWrapper { + interface LoDashImplicitWrapper { /** * @see _.values */ - values(): LoDashImplicitArrayWrapper; + values(this: LoDashImplicitWrapper | NumericDictionary | List | null | undefined>): LoDashImplicitWrapper; + + /** + * @see _.values + */ + values(this: LoDashImplicitWrapper): LoDashImplicitWrapper>; + + /** + * @see _.values + */ + values(): LoDashImplicitWrapper; } - interface LoDashImplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.values */ - values(): LoDashImplicitArrayWrapper; - } + values(this: LoDashExplicitWrapper | NumericDictionary | List | null | undefined>): LoDashExplicitWrapper; - interface LoDashImplicitArrayWrapperBase { /** * @see _.values */ - values(): LoDashImplicitArrayWrapper; - } + values(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; - interface LoDashImplicitObjectWrapperBase { /** * @see _.values */ - values(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.values - */ - values(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.values - */ - values(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.values - */ - values(): LoDashExplicitArrayWrapper; + values(): LoDashExplicitWrapper; } //_.valuesIn @@ -17980,26 +14761,36 @@ declare namespace _ { * @param object The object to query. * @return Returns the array of property values. */ - valuesIn(object?: Dictionary): T[]; + valuesIn(object: Dictionary|NumericDictionary|List | null | undefined): T[]; /** * @see _.valuesIn */ - valuesIn(object?: any): T[]; + valuesIn(object: T | null | undefined): Array; } - interface LoDashImplicitObjectWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.valuesIn */ - valuesIn(): LoDashImplicitArrayWrapper; + valuesIn(this: LoDashImplicitWrapper | NumericDictionary | List | null | undefined>): LoDashImplicitWrapper; + + /** + * @see _.valuesIn + */ + valuesIn(this: LoDashImplicitWrapper): LoDashImplicitWrapper>; } - interface LoDashExplicitObjectWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.valuesIn */ - valuesIn(): LoDashExplicitArrayWrapper; + valuesIn(this: LoDashExplicitWrapper | NumericDictionary | List | null | undefined>): LoDashExplicitWrapper; + + /** + * @see _.valuesIn + */ + valuesIn(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; } /********** @@ -18017,14 +14808,14 @@ declare namespace _ { camelCase(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.camelCase */ camelCase(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.camelCase */ @@ -18042,14 +14833,14 @@ declare namespace _ { capitalize(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.capitalize */ capitalize(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.capitalize */ @@ -18068,14 +14859,14 @@ declare namespace _ { deburr(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.deburr */ deburr(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.deburr */ @@ -18099,7 +14890,7 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.endsWith */ @@ -18109,7 +14900,7 @@ declare namespace _ { ): boolean; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.endsWith */ @@ -18141,14 +14932,14 @@ declare namespace _ { escape(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.escape */ escape(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.escape */ @@ -18167,14 +14958,14 @@ declare namespace _ { escapeRegExp(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.escapeRegExp */ escapeRegExp(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.escapeRegExp */ @@ -18192,14 +14983,14 @@ declare namespace _ { kebabCase(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.kebabCase */ kebabCase(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.kebabCase */ @@ -18217,14 +15008,14 @@ declare namespace _ { lowerCase(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.lowerCase */ lowerCase(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.lowerCase */ @@ -18242,14 +15033,14 @@ declare namespace _ { lowerFirst(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.lowerFirst */ lowerFirst(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.lowerFirst */ @@ -18274,7 +15065,7 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.pad */ @@ -18284,7 +15075,7 @@ declare namespace _ { ): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.pad */ @@ -18312,7 +15103,7 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.padEnd */ @@ -18322,7 +15113,7 @@ declare namespace _ { ): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.padEnd */ @@ -18350,7 +15141,7 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.padStart */ @@ -18360,7 +15151,7 @@ declare namespace _ { ): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.padStart */ @@ -18388,14 +15179,14 @@ declare namespace _ { ): number; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.parseInt */ parseInt(radix?: number): number; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.parseInt */ @@ -18417,20 +15208,22 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.repeat */ repeat(n?: number): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.repeat */ repeat(n?: number): LoDashExplicitWrapper; } + type ReplaceFunction = (match: string, ...args: any[]) => string; + //_.replace interface LoDashStatic { /** @@ -18445,84 +15238,50 @@ declare namespace _ { */ replace( string: string, + pattern: RegExp | string, + replacement: ReplaceFunction | string + ): string; + + /** + * @see _.replace + */ + replace( + pattern: RegExp | string, + replacement: ReplaceFunction | string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.replace + */ + replace( pattern: RegExp|string, - replacement: Function|string + replacement: ReplaceFunction | string ): string; /** * @see _.replace */ replace( - pattern?: RegExp|string, - replacement?: Function|string + replacement: ReplaceFunction | string ): string; } - interface LoDashImplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.replace */ replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string + pattern: RegExp | string, + replacement: ReplaceFunction | string ): LoDashExplicitWrapper; /** * @see _.replace */ replace( - replacement?: Function|string - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): LoDashExplicitWrapper; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string + replacement: ReplaceFunction | string ): LoDashExplicitWrapper; } @@ -18537,14 +15296,14 @@ declare namespace _ { snakeCase(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.snakeCase */ snakeCase(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.snakeCase */ @@ -18570,24 +15329,24 @@ declare namespace _ { ): string[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.split */ split( separator?: RegExp|string, limit?: number - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.split */ split( separator?: RegExp|string, limit?: number - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; } //_.startCase @@ -18601,14 +15360,14 @@ declare namespace _ { startCase(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.startCase */ startCase(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.startCase */ @@ -18632,7 +15391,7 @@ declare namespace _ { ): boolean; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.startsWith */ @@ -18642,7 +15401,7 @@ declare namespace _ { ): boolean; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.startsWith */ @@ -18661,7 +15420,7 @@ declare namespace _ { } interface TemplateExecutor { - (data?: Object): string; + (data?: object): string; source: string; } @@ -18693,23 +15452,23 @@ declare namespace _ { * @return Returns the compiled template function. */ template( - string: string, + string?: string, options?: TemplateOptions ): TemplateExecutor; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.template */ template(options?: TemplateOptions): TemplateExecutor; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.template */ - template(options?: TemplateOptions): LoDashExplicitObjectWrapper; + template(options?: TemplateOptions): LoDashExplicitWrapper; } //_.toLower @@ -18723,14 +15482,14 @@ declare namespace _ { toLower(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.toLower */ toLower(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.toLower */ @@ -18748,14 +15507,14 @@ declare namespace _ { toUpper(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.toUpper */ toUpper(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.toUpper */ @@ -18777,14 +15536,14 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.trim */ trim(chars?: string): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.trim */ @@ -18806,14 +15565,14 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.trimEnd */ trimEnd(chars?: string): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.trimEnd */ @@ -18835,14 +15594,14 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.trimStart */ trimStart(chars?: string): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.trimStart */ @@ -18874,14 +15633,14 @@ declare namespace _ { ): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.truncate */ truncate(options?: TruncateOptions): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.truncate */ @@ -18903,14 +15662,14 @@ declare namespace _ { unescape(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.unescape */ unescape(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.unescape */ @@ -18928,14 +15687,14 @@ declare namespace _ { upperCase(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.upperCase */ upperCase(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.upperCase */ @@ -18953,14 +15712,14 @@ declare namespace _ { upperFirst(string?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.upperFirst */ upperFirst(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.upperFirst */ @@ -18982,18 +15741,18 @@ declare namespace _ { ): string[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.words */ words(pattern?: string|RegExp): string[]; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.words */ - words(pattern?: string|RegExp): LoDashExplicitArrayWrapper; + words(pattern?: string|RegExp): LoDashExplicitWrapper; } /*********** @@ -19012,18 +15771,18 @@ declare namespace _ { attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.attempt */ attempt(...args: any[]): TResult|Error; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.attempt */ - attempt(...args: any[]): LoDashExplicitObjectWrapper; + attempt(...args: any[]): LoDashExplicitWrapper; } //_.constant @@ -19037,18 +15796,18 @@ declare namespace _ { constant(value: T): () => T; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.constant */ - constant(): LoDashImplicitObjectWrapper<() => TResult>; + constant(): LoDashImplicitWrapper<() => TValue>; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.constant */ - constant(): LoDashExplicitObjectWrapper<() => TResult>; + constant(): LoDashExplicitWrapper<() => TValue>; } //_.defaultTo @@ -19063,20 +15822,44 @@ declare namespace _ { * @returns Returns the resolved value. */ defaultTo(value: T | null | undefined, defaultValue: T): T; - } - interface LoDashImplicitWrapperBase { /** * @see _.defaultTo */ - defaultTo(value: TResult): LoDashImplicitObjectWrapper; + defaultTo( + value: T | null | undefined, + defaultValue: TDefault + ): T | TDefault; } - interface LoDashExplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.defaultTo */ - defaultTo(value: TResult): LoDashExplicitObjectWrapper; + defaultTo(this: LoDashImplicitWrapper, defaultValue: T): T; + + /** + * @see _.defaultTo + */ + defaultTo( + this: LoDashImplicitWrapper, + defaultValue: TDefault + ): T | TDefault; + } + + interface LoDashExplicitWrapper { + /** + * @see _.defaultTo + */ + defaultTo(this: LoDashExplicitWrapper, defaultValue: T): LoDashExplicitWrapper; + + /** + * @see _.defaultTo + */ + defaultTo( + this: LoDashExplicitWrapper, + defaultValue: TDefault + ): LoDashExplicitWrapper; } //_.identity @@ -19095,46 +15878,18 @@ declare namespace _ { identity(): undefined; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.identity */ - identity(): T; + identity(): TValue; } - interface LoDashImplicitArrayWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.identity */ - identity(): TArray; - } - - interface LoDashImplicitObjectWrapperBase { - /** - * @see _.identity - */ - identity(): TObject; - } - - interface LoDashExplicitWrapper { - /** - * @see _.identity - */ - identity(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapperBase { - /** - * @see _.identity - */ - identity(): TWrapper; - } - - interface LoDashExplicitObjectWrapperBase { - /** - * @see _.identity - */ - identity(): TWrapper; + identity(): this; } //_.iteratee @@ -19168,66 +15923,32 @@ declare namespace _ { * _.filter(users, 'age > 36'); * // => [{ 'user': 'fred', 'age': 40 }] */ - iteratee( - func: TFunction + iteratee any>( + func: TFunction | string | object ): TFunction; /** * @see _.iteratee */ - iteratee( - func: string - ): (object: any) => TResult; - - /** - * @see _.iteratee - */ - iteratee( - func: Object - ): (object: any) => boolean; - - /** - * @see _.iteratee - */ - iteratee(): (value: TResult) => TResult; + iteratee(): typeof _.identity; // tslint:disable-line:no-unnecessary-qualifier } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.iteratee */ - iteratee(): LoDashImplicitObjectWrapper<(object: any) => TResult>; + iteratee any>( + this: LoDashImplicitWrapper + ): LoDashImplicitWrapper; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.iteratee */ - iteratee(): LoDashImplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.iteratee - */ - iteratee(): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; + iteratee any>( + this: LoDashExplicitWrapper + ): LoDashExplicitWrapper; } //_.matches @@ -19251,18 +15972,18 @@ declare namespace _ { matches(source: T): (value: V) => boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.matches */ - matches(): LoDashImplicitObjectWrapper<(value: V) => boolean>; + matches(): LoDashImplicitWrapper<(value: V) => boolean>; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.matches */ - matches(): LoDashExplicitObjectWrapper<(value: V) => boolean>; + matches(): LoDashExplicitWrapper<(value: V) => boolean>; } //_.matchesProperty @@ -19291,36 +16012,36 @@ declare namespace _ { ): (value: V) => boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.matchesProperty */ matchesProperty( srcValue: SrcValue - ): LoDashImplicitObjectWrapper<(value: any) => boolean>; + ): LoDashImplicitWrapper<(value: any) => boolean>; /** * @see _.matchesProperty */ matchesProperty( srcValue: SrcValue - ): LoDashImplicitObjectWrapper<(value: Value) => boolean>; + ): LoDashImplicitWrapper<(value: Value) => boolean>; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.matchesProperty */ matchesProperty( srcValue: SrcValue - ): LoDashExplicitObjectWrapper<(value: any) => boolean>; + ): LoDashExplicitWrapper<(value: any) => boolean>; /** * @see _.matchesProperty */ matchesProperty( srcValue: SrcValue - ): LoDashExplicitObjectWrapper<(value: Value) => boolean>; + ): LoDashExplicitWrapper<(value: Value) => boolean>; } //_.method @@ -19333,66 +16054,24 @@ declare namespace _ { * @param args The arguments to invoke the method with. * @return Returns the new function. */ - method( + method( path: string|StringRepresentable[], ...args: any[] - ): (object: TObject) => TResult; - - /** - * @see _.method - */ - method( - path: string|StringRepresentable[], - ...args: any[] - ): (object: any) => TResult; + ): (object: any) => any; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.method */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; + method(...args: any[]): LoDashImplicitWrapper<(object: any) => any>; } - interface LoDashImplicitArrayWrapper { + interface LoDashExplicitWrapper { /** * @see _.method */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; + method(...args: any[]): LoDashExplicitWrapper<(object: any) => any>; } //_.methodOf @@ -19405,36 +16084,28 @@ declare namespace _ { * @param args The arguments to invoke the method with. * @return Returns the new function. */ - methodOf( - object: TObject, + methodOf( + object: object, ...args: any[] - ): (path: Many) => TResult; - - /** - * @see _.methodOf - */ - methodOf( - object: {}, - ...args: any[] - ): (path: Many) => TResult; + ): (path: Many) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.methodOf */ - methodOf( + methodOf( ...args: any[] - ): LoDashImplicitObjectWrapper<(path: Many) => TResult>; + ): LoDashImplicitWrapper<(path: Many) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.methodOf */ - methodOf( + methodOf( ...args: any[] - ): LoDashExplicitObjectWrapper<(path: Many) => TResult>; + ): LoDashExplicitWrapper<(path: Many) => any>; } //_.mixin @@ -19456,53 +16127,53 @@ declare namespace _ { * @param options.chain Specify whether the functions added are chainable. * @return Returns object. */ - mixin( + mixin( object: TObject, - source: Dictionary, + source: Dictionary<(...args: any[]) => any>, options?: MixinOptions - ): TResult; + ): TObject; /** * @see _.mixin */ mixin( - source: Dictionary, + source: Dictionary<(...args: any[]) => any>, options?: MixinOptions - ): TResult; + ): LoDashStatic; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.mixin */ - mixin( - source: Dictionary, + mixin( + source: Dictionary<(...args: any[]) => any>, options?: MixinOptions - ): LoDashImplicitObjectWrapper; + ): this; /** * @see _.mixin */ - mixin( + mixin( options?: MixinOptions - ): LoDashImplicitObjectWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.mixin */ - mixin( - source: Dictionary, + mixin( + source: Dictionary<(...args: any[]) => any>, options?: MixinOptions - ): LoDashExplicitObjectWrapper; + ): this; /** * @see _.mixin */ - mixin( + mixin( options?: MixinOptions - ): LoDashExplicitObjectWrapper; + ): LoDashExplicitWrapper; } //_.noConflict @@ -19515,18 +16186,18 @@ declare namespace _ { noConflict(): typeof _; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.noConflict */ noConflict(): typeof _; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.noConflict */ - noConflict(): LoDashExplicitObjectWrapper; + noConflict(): LoDashExplicitWrapper; } //_.noop @@ -19539,18 +16210,18 @@ declare namespace _ { noop(...args: any[]): void; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.noop */ noop(...args: any[]): void; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.noop */ - noop(...args: any[]): _.LoDashExplicitWrapper; + noop(...args: any[]): LoDashExplicitWrapper; } //_.nthArg @@ -19561,21 +16232,21 @@ declare namespace _ { * @param n The index of the argument to return. * @return Returns the new function. */ - nthArg(n?: number): TResult; + nthArg(n?: number): (...args: any[]) => any; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.nthArg */ - nthArg(): LoDashImplicitObjectWrapper; + nthArg(): LoDashImplicitWrapper<(...args: any[]) => any>; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.nthArg */ - nthArg(): LoDashExplicitObjectWrapper; + nthArg(): LoDashExplicitWrapper<(...args: any[]) => any>; } //_.over @@ -19587,35 +16258,27 @@ declare namespace _ { * @param iteratees The iteratees to invoke. * @return Returns the new function. */ - over(...iteratees: Array>): (...args: any[]) => TResult[]; + over(...iteratees: Array TResult>>): (...args: any[]) => TResult[]; } - interface LoDashImplicitArrayWrapper { + interface LoDashImplicitWrapper { /** * @see _.over */ - over(...iteratees: Array>): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; + over( + this: LoDashImplicitWrapper TResult>>, + ...iteratees: Array TResult>> + ): LoDashImplicitWrapper<(...args: any[]) => TResult[]>; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.over */ - over(...iteratees: Array>): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.over - */ - over(...iteratees: Array>): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.over - */ - over(...iteratees: Array>): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; + over( + this: LoDashExplicitWrapper TResult>>, + ...iteratees: Array TResult>> + ): LoDashExplicitWrapper<(...args: any[]) => TResult[]>; } //_.overEvery @@ -19627,35 +16290,21 @@ declare namespace _ { * @param predicates The predicates to check. * @return Returns the new function. */ - overEvery(...predicates: Array>): (...args: any[]) => boolean; + overEvery(...predicates: Array any>>): (...args: any[]) => boolean; } - interface LoDashImplicitArrayWrapper { + interface LoDashImplicitWrapper { /** * @see _.overEvery */ - overEvery(...predicates: Array>): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + overEvery(...predicates: Array any>>): LoDashImplicitWrapper<(...args: any[]) => boolean>; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.overEvery */ - overEvery(...predicates: Array>): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: Array>): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: Array>): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + overEvery(...predicates: Array any>>): LoDashExplicitWrapper<(...args: any[]) => boolean>; } //_.overSome @@ -19667,35 +16316,21 @@ declare namespace _ { * @param predicates The predicates to check. * @return Returns the new function. */ - overSome(...predicates: Array>): (...args: any[]) => boolean; + overSome(...predicates: Array any>>): (...args: any[]) => boolean; } - interface LoDashImplicitArrayWrapper { + interface LoDashImplicitWrapper { /** * @see _.overSome */ - overSome(...predicates: Array>): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + overSome(...predicates: Array any>>): LoDashImplicitWrapper<(...args: any[]) => boolean>; } - interface LoDashImplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.overSome */ - overSome(...predicates: Array>): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: Array>): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: Array>): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + overSome(...predicates: Array any>>): LoDashExplicitWrapper<(...args: any[]) => boolean>; } //_.property @@ -19709,32 +16344,18 @@ declare namespace _ { property(path: Many): (obj: TObj) => TResult; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.property */ - property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; + property(): LoDashImplicitWrapper<(obj: TObj) => TResult>; } - interface LoDashImplicitArrayWrapper { + interface LoDashExplicitWrapper { /** * @see _.property */ - property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.property - */ - property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.property - */ - property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + property(): LoDashExplicitWrapper<(obj: TObj) => TResult>; } //_.propertyOf @@ -19749,18 +16370,18 @@ declare namespace _ { propertyOf(object: T): (path: Many) => any; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.propertyOf */ - propertyOf(): LoDashImplicitObjectWrapper<(path: Many) => any>; + propertyOf(): LoDashImplicitWrapper<(path: Many) => any>; } - interface LoDashExplicitObjectWrapper { + interface LoDashExplicitWrapper { /** * @see _.propertyOf */ - propertyOf(): LoDashExplicitObjectWrapper<(path: Many) => any>; + propertyOf(): LoDashExplicitWrapper<(path: Many) => any>; } //_.range @@ -19777,37 +16398,29 @@ declare namespace _ { */ range( start: number, - end: number, - step?: number - ): number[]; - - /** - * @see _.range - */ - range( - end: number, + end?: number, step?: number ): number[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.range */ range( end?: number, step?: number - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.range */ range( end?: number, step?: number - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; } //_.rangeRight @@ -19848,37 +16461,29 @@ declare namespace _ { */ rangeRight( start: number, - end: number, - step?: number - ): number[]; - - /** - * @see _.rangeRight - */ - rangeRight( - end: number, + end?: number, step?: number ): number[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.rangeRight */ rangeRight( end?: number, step?: number - ): LoDashImplicitArrayWrapper; + ): LoDashImplicitWrapper; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.rangeRight */ rangeRight( end?: number, step?: number - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; } //_.runInContext @@ -19889,10 +16494,10 @@ declare namespace _ { * @param context The context object. * @return Returns a new lodash function. */ - runInContext(context?: Object): typeof _; + runInContext(context?: object): typeof _; } - interface LoDashImplicitObjectWrapper { + interface LoDashImplicitWrapper { /** * @see _.runInContext */ @@ -19909,18 +16514,18 @@ declare namespace _ { stubArray(): any[]; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.stubArray */ stubArray(): any[]; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.stubArray */ - stubArray(): _.LoDashExplicitArrayWrapper; + stubArray(): LoDashExplicitWrapper; } // _.stubFalse @@ -19933,18 +16538,18 @@ declare namespace _ { stubFalse(): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.stubFalse */ stubFalse(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.stubFalse */ - stubFalse(): _.LoDashExplicitWrapper; + stubFalse(): LoDashExplicitWrapper; } interface LoDashStatic { @@ -19953,21 +16558,21 @@ declare namespace _ { * * @returns Returns the new empty object. */ - stubObject(): Object; + stubObject(): any; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.stubObject */ - stubObject(): Object; + stubObject(): any; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.stubObject */ - stubObject(): _.LoDashExplicitObjectWrapper; + stubObject(): LoDashExplicitWrapper; } interface LoDashStatic { @@ -19979,18 +16584,18 @@ declare namespace _ { stubString(): string; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.stubString */ stubString(): string; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.stubString */ - stubString(): _.LoDashExplicitWrapper; + stubString(): LoDashExplicitWrapper; } interface LoDashStatic { @@ -20002,18 +16607,18 @@ declare namespace _ { stubTrue(): boolean; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.stubTrue */ stubTrue(): boolean; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.stubTrue */ - stubTrue(): _.LoDashExplicitWrapper; + stubTrue(): LoDashExplicitWrapper; } //_.times @@ -20037,7 +16642,7 @@ declare namespace _ { times(n: number): number[]; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.times */ @@ -20051,18 +16656,18 @@ declare namespace _ { times(): number[]; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.times */ times( iteratee: (num: number) => TResult - ): LoDashExplicitArrayWrapper; + ): LoDashExplicitWrapper; /** * @see _.times */ - times(): LoDashExplicitArrayWrapper; + times(): LoDashExplicitWrapper; } //_.toPath @@ -20095,14 +16700,14 @@ declare namespace _ { toPath(value: any): string[]; } - interface LoDashImplicitWrapperBase { + interface LoDashImplicitWrapper { /** * @see _.toPath */ toPath(): LoDashImplicitWrapper; } - interface LoDashExplicitWrapperBase { + interface LoDashExplicitWrapper { /** * @see _.toPath */ @@ -20120,41 +16725,53 @@ declare namespace _ { uniqueId(prefix?: string): string; } - interface LoDashImplicitWrapper { + interface LoDashImplicitWrapper { /** * @see _.uniqueId */ uniqueId(): string; } - interface LoDashExplicitWrapper { + interface LoDashExplicitWrapper { /** * @see _.uniqueId */ uniqueId(): LoDashExplicitWrapper; } + type ArrayIterator = (value: T, index: number, collection: T[]) => TResult; type ListIterator = (value: T, index: number, collection: List) => TResult; - + type ListIteratee = ListIterator | string | [string, any] | PartialDeep; type ListIteratorTypeGuard = (value: T, index: number, collection: List) => value is S; - type DictionaryIterator = (value: T, key: string, collection: Dictionary) => TResult; + // Note: key should be string, not keyof T, because the actual object may contain extra properties that were not specified in the type. + type ObjectIterator = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult; + type ObjectIteratee = ObjectIterator | string | [string, any] | PartialDeep; + type ObjectIteratorTypeGuard = (value: TObject[keyof TObject], key: string, collection: TObject) => value is S; - type DictionaryIteratorTypeGuard = (value: T, key: string, collection: Dictionary) => value is S; + type DictionaryIterator = ObjectIterator, TResult>; + type DictionaryIteratee = ObjectIteratee>; + type DictionaryIteratorTypeGuard = ObjectIteratorTypeGuard, S>; - type NumericDictionaryIterator = (value: T, key: number, collection: Dictionary) => TResult; - - type ObjectIterator = (element: T, key: string, collection: any) => TResult; + type NumericDictionaryIterator = (value: T, key: number, collection: NumericDictionary) => TResult; + type NumericDictionaryIteratee = NumericDictionaryIterator | string | [string, any] | PartialDeep; type StringIterator = (char: string, index: number, string: string) => TResult; type MemoVoidIterator = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => void; + /** @deprecated Use MemoListIterator or MemoObjectIterator instead. */ type MemoIterator = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => TResult; + type MemoListIterator = (prev: TResult, curr: T, index: number, list: TList) => TResult; + type MemoObjectIterator = (prev: TResult, curr: T, key: string, list: TList) => TResult; type MemoVoidArrayIterator = (acc: TResult, curr: T, index: number, arr: T[]) => void; type MemoVoidDictionaryIterator = (acc: TResult, curr: T, key: string, dict: Dictionary) => void; + type ValueIteratee = ((value: T) => any) | string | [string, any] | PartialDeep; + type ValueKeyIteratee = ((value: T, key: string) => any) | string | [string, any] | PartialDeep; + type Comparator = (a: T, b: T) => boolean; + /** Common interface between Arrays and jQuery objects */ type List = ArrayLike; @@ -20174,6 +16791,24 @@ declare namespace _ { cancel(): void; flush(): void; } + + type PartialDeep = { + [P in keyof T]?: PartialDeep; + }; + + // For backwards compatibility + type LoDashImplicitArrayWrapper = LoDashImplicitWrapper; + type LoDashImplicitNillableArrayWrapper = LoDashImplicitWrapper; + type LoDashImplicitObjectWrapper = LoDashImplicitWrapper; + type LoDashImplicitNillableObjectWrapper = LoDashImplicitWrapper; + type LoDashImplicitNumberArrayWrapper = LoDashImplicitWrapper; + type LoDashImplicitStringWrapper = LoDashImplicitWrapper; + type LoDashExplicitArrayWrapper = LoDashExplicitWrapper; + type LoDashExplicitNillableArrayWrapper = LoDashExplicitWrapper; + type LoDashExplicitObjectWrapper = LoDashExplicitWrapper; + type LoDashExplicitNillableObjectWrapper = LoDashExplicitWrapper; + type LoDashExplicitNumberArrayWrapper = LoDashExplicitWrapper; + type LoDashExplicitStringWrapper = LoDashExplicitWrapper; } // Backward compatibility with --target es5 diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 7ebd31f2c7..19399ff23b 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -1,6 +1,4 @@ -declare const $: any, jQuery: any; - -let x = 0 +declare const $: any; interface IFoodOrganic { name: string; @@ -130,7 +128,7 @@ namespace TestWrapper { { let result: _.LoDashImplicitArrayWrapper; - result = _(['']); + result = _(['']); } { @@ -140,12 +138,12 @@ namespace TestWrapper { { let a: TResult[] = []; - _(a) // $ExpectType LoDashImplicitArrayWrapper + _(a); // $ExpectType LoDashImplicitWrapper } { let a: TResult[] | null | undefined = any; - _(a) // $ExpectType LoDashImplicitNillableArrayWrapper + _(a); // $ExpectType LoDashImplicitWrapper } } @@ -227,14 +225,14 @@ namespace TestCompact { { let result: _.LoDashImplicitArrayWrapper; - result = _(array).compact(); + result = _(array).compact(); result = _(list).compact(); } { let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().compact(); + result = _(array).chain().compact(); result = _(list).chain().compact(); } } @@ -300,181 +298,181 @@ namespace TestDifferenceBy { { let result: TResult[]; - result = _.differenceBy(array, array); - result = _.differenceBy(array, list, array); - result = _.differenceBy(array, array, list, array); - result = _.differenceBy(array, list, array, list, array); - result = _.differenceBy(array, array, list, array, list, array); - result = _.differenceBy(array, list, array, list, array, list, array); + result = _.differenceBy(array, arrayParam); + result = _.differenceBy(array, listParam, arrayParam); + result = _.differenceBy(array, arrayParam, listParam, arrayParam); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _.differenceBy(array, array, iteratee); - result = _.differenceBy(array, list, array, iteratee); - result = _.differenceBy(array, array, list, array, iteratee); - result = _.differenceBy(array, list, array, list, array, iteratee); - result = _.differenceBy(array, array, list, array, list, array, iteratee); - result = _.differenceBy(array, list, array, list, array, list, array, iteratee); + result = _.differenceBy(array, arrayParam, iteratee); + result = _.differenceBy(array, listParam, arrayParam, iteratee); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, iteratee); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, iteratee); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _.differenceBy(array, array, 'a'); - result = _.differenceBy(array, list, array, 'a'); - result = _.differenceBy(array, array, list, array, 'a'); - result = _.differenceBy(array, list, array, list, array, 'a'); - result = _.differenceBy(array, array, list, array, list, array, 'a'); - result = _.differenceBy(array, list, array, list, array, list, array, 'a'); + result = _.differenceBy(array, arrayParam, 'a'); + result = _.differenceBy(array, listParam, arrayParam, 'a'); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, 'a'); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, 'a'); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _.differenceBy(array, arrayParam, {a: 1}); - result = _.differenceBy(array, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, list, array, list, array, list, array, {a: 1}); + result = _.differenceBy(array, arrayParam, {a: 1}); + result = _.differenceBy(array, listParam, arrayParam, {a: 1}); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, {a: 1}); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(list, list); - result = _.differenceBy(list, array, list); - result = _.differenceBy(list, list, array, list); - result = _.differenceBy(list, array, list, array, list); - result = _.differenceBy(list, list, array, list, array, list); - result = _.differenceBy(list, array, list, array, list, array, list); + result = _.differenceBy(list, listParam); + result = _.differenceBy(list, arrayParam, listParam); + result = _.differenceBy(list, listParam, arrayParam, listParam); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam); + result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); - result = _.differenceBy(list, list, iteratee); - result = _.differenceBy(list, array, list, iteratee); - result = _.differenceBy(list, list, array, list, iteratee); - result = _.differenceBy(list, array, list, array, list, iteratee); - result = _.differenceBy(list, list, array, list, array, list, iteratee); - result = _.differenceBy(list, array, list, array, list, array, list, iteratee); + result = _.differenceBy(list, listParam, iteratee); + result = _.differenceBy(list, arrayParam, listParam, iteratee); + result = _.differenceBy(list, listParam, arrayParam, listParam, iteratee); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, iteratee); + result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _.differenceBy(list, list, 'a'); - result = _.differenceBy(list, array, list, 'a'); - result = _.differenceBy(list, list, array, list, 'a'); - result = _.differenceBy(list, array, list, array, list, 'a'); - result = _.differenceBy(list, list, array, list, array, list, 'a'); - result = _.differenceBy(list, array, list, array, list, array, list, 'a'); + result = _.differenceBy(list, listParam, 'a'); + result = _.differenceBy(list, arrayParam, listParam, 'a'); + result = _.differenceBy(list, listParam, arrayParam, listParam, 'a'); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, 'a'); + result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _.differenceBy(list, listParam, {a: 1}); - result = _.differenceBy(list, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, array, list, array, list, array, list, {a: 1}); + result = _.differenceBy(list, listParam, {a: 1}); + result = _.differenceBy(list, arrayParam, listParam, {a: 1}); + result = _.differenceBy(list, listParam, arrayParam, listParam, {a: 1}); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitWrapper; - result = _(array).differenceBy(array); - result = _(array).differenceBy(list, array); - result = _(array).differenceBy(array, list, array); - result = _(array).differenceBy(list, array, list, array); - result = _(array).differenceBy(array, list, array, list, array); - result = _(array).differenceBy(list, array, list, array, list, array); + result = _(array).differenceBy(arrayParam); + result = _(array).differenceBy(listParam, arrayParam); + result = _(array).differenceBy(arrayParam, listParam, arrayParam); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _(array).differenceBy(array, iteratee); - result = _(array).differenceBy(list, array, iteratee); - result = _(array).differenceBy(array, list, array, iteratee); - result = _(array).differenceBy(list, array, list, array, iteratee); - result = _(array).differenceBy(array, list, array, list, array, iteratee); - result = _(array).differenceBy(list, array, list, array, list, array, iteratee); + result = _(array).differenceBy(arrayParam, iteratee); + result = _(array).differenceBy(listParam, arrayParam, iteratee); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, iteratee); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, iteratee); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).differenceBy(array, 'a'); - result = _(array).differenceBy(list, array, 'a'); - result = _(array).differenceBy(array, list, array, 'a'); - result = _(array).differenceBy(list, array, list, array, 'a'); - result = _(array).differenceBy(array, list, array, list, array, 'a'); - result = _(array).differenceBy(list, array, list, array, list, array, 'a'); + result = _(array).differenceBy(arrayParam, 'a'); + result = _(array).differenceBy(listParam, arrayParam, 'a'); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, 'a'); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, 'a'); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).differenceBy(arrayParam, {a: 1}); - result = _(array).differenceBy(listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(list, array, list, array, list, array, {a: 1}); + result = _(array).differenceBy(arrayParam, {a: 1}); + result = _(array).differenceBy(listParam, arrayParam, {a: 1}); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(list).differenceBy(list); - result = _(list).differenceBy(array, list); - result = _(list).differenceBy(list, array, list); - result = _(list).differenceBy(array, list, array, list); - result = _(list).differenceBy(list, array, list, array, list); - result = _(list).differenceBy(array, list, array, list, array, list); + result = _(list).differenceBy(listParam); + result = _(list).differenceBy(arrayParam, listParam); + result = _(list).differenceBy(listParam, arrayParam, listParam); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam); + result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); - result = _(list).differenceBy(list, iteratee); - result = _(list).differenceBy(array, list, iteratee); - result = _(list).differenceBy(list, array, list, iteratee); - result = _(list).differenceBy(array, list, array, list, iteratee); - result = _(list).differenceBy(list, array, list, array, list, iteratee); - result = _(list).differenceBy(array, list, array, list, array, list, iteratee); + result = _(list).differenceBy(listParam, iteratee); + result = _(list).differenceBy(arrayParam, listParam, iteratee); + result = _(list).differenceBy(listParam, arrayParam, listParam, iteratee); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, iteratee); + result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, iteratee); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).differenceBy(list, 'a'); - result = _(list).differenceBy(array, list, 'a'); - result = _(list).differenceBy(list, array, list, 'a'); - result = _(list).differenceBy(array, list, array, list, 'a'); - result = _(list).differenceBy(list, array, list, array, list, 'a'); - result = _(list).differenceBy(array, list, array, list, array, list, 'a'); + result = _(list).differenceBy(listParam, 'a'); + result = _(list).differenceBy(arrayParam, listParam, 'a'); + result = _(list).differenceBy(listParam, arrayParam, listParam, 'a'); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, 'a'); + result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, 'a'); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).differenceBy(listParam, {a: 1}); - result = _(list).differenceBy(arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(listParam, arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(array, list, array, list, array, list, {a: 1}); + result = _(list).differenceBy(listParam, {a: 1}); + result = _(list).differenceBy(arrayParam, listParam, {a: 1}); + result = _(list).differenceBy(listParam, arrayParam, listParam, {a: 1}); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitWrapper; - result = _(array).chain().differenceBy(array); - result = _(array).chain().differenceBy(list, array); - result = _(array).chain().differenceBy(array, list, array); - result = _(array).chain().differenceBy(list, array, list, array); - result = _(array).chain().differenceBy(array, list, array, list, array); - result = _(array).chain().differenceBy(list, array, list, array, list, array); + result = _(array).chain().differenceBy(arrayParam); + result = _(array).chain().differenceBy(listParam, arrayParam); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _(array).chain().differenceBy(array, iteratee); - result = _(array).chain().differenceBy(list, array, iteratee); - result = _(array).chain().differenceBy(array, list, array, iteratee); - result = _(array).chain().differenceBy(list, array, list, array, iteratee); - result = _(array).chain().differenceBy(array, list, array, list, array, iteratee); - result = _(array).chain().differenceBy(list, array, list, array, list, array, iteratee); + result = _(array).chain().differenceBy(arrayParam, iteratee); + result = _(array).chain().differenceBy(listParam, arrayParam, iteratee); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, iteratee); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, iteratee); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).chain().differenceBy(array, 'a'); - result = _(array).chain().differenceBy(list, array, 'a'); - result = _(array).chain().differenceBy(array, list, array, 'a'); - result = _(array).chain().differenceBy(list, array, list, array, 'a'); - result = _(array).chain().differenceBy(array, list, array, list, array, 'a'); - result = _(array).chain().differenceBy(list, array, list, array, list, array, 'a'); + result = _(array).chain().differenceBy(arrayParam, 'a'); + result = _(array).chain().differenceBy(listParam, arrayParam, 'a'); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, 'a'); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, 'a'); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).chain().differenceBy(arrayParam, {a: 1}); - result = _(array).chain().differenceBy(listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(list, array, list, array, list, array, {a: 1}); + result = _(array).chain().differenceBy(arrayParam, {a: 1}); + result = _(array).chain().differenceBy(listParam, arrayParam, {a: 1}); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); + result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(list).chain().differenceBy(list); - result = _(list).chain().differenceBy(array, list); - result = _(list).chain().differenceBy(list, array, list); - result = _(list).chain().differenceBy(array, list, array, list); - result = _(list).chain().differenceBy(list, array, list, array, list); - result = _(list).chain().differenceBy(array, list, array, list, array, list); + result = _(list).chain().differenceBy(listParam); + result = _(list).chain().differenceBy(arrayParam, listParam); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); - result = _(list).chain().differenceBy(list, iteratee); - result = _(list).chain().differenceBy(array, list, iteratee); - result = _(list).chain().differenceBy(list, array, list, iteratee); - result = _(list).chain().differenceBy(array, list, array, list, iteratee); - result = _(list).chain().differenceBy(list, array, list, array, list, iteratee); - result = _(list).chain().differenceBy(array, list, array, list, array, list, iteratee); + result = _(list).chain().differenceBy(listParam, iteratee); + result = _(list).chain().differenceBy(arrayParam, listParam, iteratee); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, iteratee); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, iteratee); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, iteratee); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).chain().differenceBy(list, 'a'); - result = _(list).chain().differenceBy(array, list, 'a'); - result = _(list).chain().differenceBy(list, array, list, 'a'); - result = _(list).chain().differenceBy(array, list, array, list, 'a'); - result = _(list).chain().differenceBy(list, array, list, array, list, 'a'); - result = _(list).chain().differenceBy(array, list, array, list, array, list, 'a'); + result = _(list).chain().differenceBy(listParam, 'a'); + result = _(list).chain().differenceBy(arrayParam, listParam, 'a'); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, 'a'); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, 'a'); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, 'a'); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).chain().differenceBy(listParam, {a: 1}); - result = _(list).chain().differenceBy(arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(array, list, array, list, array, list, {a: 1}); + result = _(list).chain().differenceBy(listParam, {a: 1}); + result = _(list).chain().differenceBy(arrayParam, listParam, {a: 1}); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, {a: 1}); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); + result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); } } @@ -561,12 +559,12 @@ namespace TestDropRightWhile { result = _.dropRightWhile(array); result = _.dropRightWhile(array, predicateFn); result = _.dropRightWhile(array, ''); - result = _.dropRightWhile<{a: number;}, TResult>(array, {a: 42}); + result = _.dropRightWhile(array, {a: 42}); result = _.dropRightWhile(list); result = _.dropRightWhile(list, predicateFn); result = _.dropRightWhile(list, ''); - result = _.dropRightWhile<{a: number;}, TResult>(list, {a: 42}); + result = _.dropRightWhile(list, {a: 42}); } { @@ -575,12 +573,12 @@ namespace TestDropRightWhile { result = _(array).dropRightWhile(); result = _(array).dropRightWhile(predicateFn); result = _(array).dropRightWhile(''); - result = _(array).dropRightWhile<{a: number;}>({a: 42}); + result = _(array).dropRightWhile({a: 42}); result = _(list).dropRightWhile(); result = _(list).dropRightWhile(predicateFn); result = _(list).dropRightWhile(''); - result = _(list).dropRightWhile<{a: number;}, TResult>({a: 42}); + result = _(list).dropRightWhile({a: 42}); } { @@ -589,12 +587,12 @@ namespace TestDropRightWhile { result = _(array).chain().dropRightWhile(); result = _(array).chain().dropRightWhile(predicateFn); result = _(array).chain().dropRightWhile(''); - result = _(array).chain().dropRightWhile<{a: number;}>({a: 42}); + result = _(array).chain().dropRightWhile({a: 42}); result = _(list).chain().dropRightWhile(); result = _(list).chain().dropRightWhile(predicateFn); result = _(list).chain().dropRightWhile(''); - result = _(list).chain().dropRightWhile<{a: number;}, TResult>({a: 42}); + result = _(list).chain().dropRightWhile({a: 42}); } } @@ -610,12 +608,12 @@ namespace TestDropWhile { result = _.dropWhile(array); result = _.dropWhile(array, predicateFn); result = _.dropWhile(array, ''); - result = _.dropWhile<{a: number;}, TResult>(array, {a: 42}); + result = _.dropWhile(array, {a: 42}); result = _.dropWhile(list); result = _.dropWhile(list, predicateFn); result = _.dropWhile(list, ''); - result = _.dropWhile<{a: number;}, TResult>(list, {a: 42}); + result = _.dropWhile(list, {a: 42}); } { @@ -624,12 +622,12 @@ namespace TestDropWhile { result = _(array).dropWhile(); result = _(array).dropWhile(predicateFn); result = _(array).dropWhile(''); - result = _(array).dropWhile<{a: number;}>({a: 42}); + result = _(array).dropWhile({a: 42}); result = _(list).dropWhile(); result = _(list).dropWhile(predicateFn); result = _(list).dropWhile(''); - result = _(list).dropWhile<{a: number;}, TResult>({a: 42}); + result = _(list).dropWhile({a: 42}); } { @@ -638,66 +636,66 @@ namespace TestDropWhile { result = _(array).chain().dropWhile(); result = _(array).chain().dropWhile(predicateFn); result = _(array).chain().dropWhile(''); - result = _(array).chain().dropWhile<{a: number;}>({a: 42}); + result = _(array).chain().dropWhile({a: 42}); result = _(list).chain().dropWhile(); result = _(list).chain().dropWhile(predicateFn); result = _(list).chain().dropWhile(''); - result = _(list).chain().dropWhile<{a: number;}, TResult>({a: 42}); + result = _(list).chain().dropWhile({a: 42}); } } // _.fill namespace TestFill { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: number[] | null | undefined = [] as any; + let list: _.List | null | undefined = [] as any; { let result: number[]; result = _.fill(array, 42); - result = _.fill(array, 42, 0); - result = _.fill(array, 42, 0, 10); + result = _.fill(array, 42, 0); + result = _.fill(array, 42, 0, 10); } { let result: _.List; result = _.fill(list, 42); - result = _.fill(list, 42, 0); - result = _.fill(list, 42, 0, 10); + result = _.fill(list, 42, 0); + result = _.fill(list, 42, 0, 10); } { let result: _.LoDashImplicitArrayWrapper; result = _(array).fill(42); - result = _(array).fill(42, 0); - result = _(array).fill(42, 0, 10); + result = _(array).fill(42, 0); + result = _(array).fill(42, 0, 10); } { let result: _.LoDashImplicitObjectWrapper<_.List>; result = _(list).fill(42); - result = _(list).fill(42, 0); - result = _(list).fill(42, 0, 10); + result = _(list).fill(42, 0); + result = _(list).fill(42, 0, 10); } { let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().fill(42); - result = _(array).chain().fill(42, 0); - result = _(array).chain().fill(42, 0, 10); + result = _(array).chain().fill(42, 0); + result = _(array).chain().fill(42, 0, 10); } { let result: _.LoDashExplicitObjectWrapper<_.List>; result = _(list).chain().fill(42); - result = _(list).chain().fill(42, 0); - result = _(list).chain().fill(42, 0, 10); + result = _(list).chain().fill(42, 0); + result = _(list).chain().fill(42, 0, 10); } } @@ -714,21 +712,21 @@ namespace TestFindIndex { result = _.findIndex(array); result = _.findIndex(array, predicateFn); result = _.findIndex(array, ''); - result = _.findIndex<{a: number}, TResult>(array, {a: 42}); + result = _.findIndex(array, {a: 42}); result = _.findIndex(array, predicateFn, fromIndex); result = _.findIndex(list); result = _.findIndex(list, predicateFn); result = _.findIndex(list, ''); - result = _.findIndex<{a: number}, TResult>(list, {a: 42}); + result = _.findIndex(list, {a: 42}); result = _.findIndex(list, predicateFn, fromIndex); result = _.findIndex([{ b: 5 }], ['b', 5]); - result = _(array).findIndex(); - result = _(array).findIndex(predicateFn); - result = _(array).findIndex(''); - result = _(array).findIndex<{a: number}>({a: 42}); - result = _(array).findIndex(predicateFn, fromIndex); + result = _(array).findIndex(); + result = _(array).findIndex(predicateFn); + result = _(array).findIndex(''); + result = _(array).findIndex<{a: number}>({a: 42}); + result = _(array).findIndex(predicateFn, fromIndex); result = _(list).findIndex(); result = _(list).findIndex(predicateFn); @@ -740,11 +738,11 @@ namespace TestFindIndex { { let result: _.LoDashExplicitWrapper; - result = _(array).chain().findIndex(); - result = _(array).chain().findIndex(predicateFn); - result = _(array).chain().findIndex(''); - result = _(array).chain().findIndex<{a: number}>({a: 42}); - result = _(array).chain().findIndex(predicateFn, fromIndex); + result = _(array).chain().findIndex(); + result = _(array).chain().findIndex(predicateFn); + result = _(array).chain().findIndex(''); + result = _(array).chain().findIndex<{a: number}>({a: 42}); + result = _(array).chain().findIndex(predicateFn, fromIndex); result = _(list).chain().findIndex(); result = _(list).chain().findIndex(predicateFn); @@ -768,21 +766,21 @@ namespace TestFindLastIndex { result = _.findLastIndex(array); result = _.findLastIndex(array, predicateFn); result = _.findLastIndex(array, ''); - result = _.findLastIndex<{a: number}, TResult>(array, {a: 42}); + result = _.findLastIndex(array, {a: 42}); result = _.findLastIndex(array, predicateFn, fromIndex); result = _.findLastIndex(list); result = _.findLastIndex(list, predicateFn); result = _.findLastIndex(list, ''); - result = _.findLastIndex<{a: number}, TResult>(list, {a: 42}); + result = _.findLastIndex(list, {a: 42}); result = _.findLastIndex(list, predicateFn, fromIndex); result = _.findLastIndex([{ b: 5 }], ['b', 5]); - result = _(array).findLastIndex(); - result = _(array).findLastIndex(predicateFn); - result = _(array).findLastIndex(''); - result = _(array).findLastIndex<{a: number}>({a: 42}); - result = _(array).findLastIndex(predicateFn, fromIndex); + result = _(array).findLastIndex(); + result = _(array).findLastIndex(predicateFn); + result = _(array).findLastIndex(''); + result = _(array).findLastIndex<{a: number}>({a: 42}); + result = _(array).findLastIndex(predicateFn, fromIndex); result = _(list).findLastIndex(); result = _(list).findLastIndex(predicateFn); @@ -794,11 +792,11 @@ namespace TestFindLastIndex { { let result: _.LoDashExplicitWrapper; - result = _(array).chain().findLastIndex(); - result = _(array).chain().findLastIndex(predicateFn); - result = _(array).chain().findLastIndex(''); - result = _(array).chain().findLastIndex<{a: number}>({a: 42}); - result = _(array).chain().findLastIndex(predicateFn, fromIndex); + result = _(array).chain().findLastIndex(); + result = _(array).chain().findLastIndex(predicateFn); + result = _(array).chain().findLastIndex(''); + result = _(array).chain().findLastIndex<{a: number}>({a: 42}); + result = _(array).chain().findLastIndex(predicateFn, fromIndex); result = _(list).chain().findLastIndex(); result = _(list).chain().findLastIndex(predicateFn); @@ -831,16 +829,16 @@ namespace TestFirst { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _('abc').chain().first(); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper; - result = _(array).chain().first<_.LoDashExplicitObjectWrapper>(); - result = _(list).chain().first<_.LoDashExplicitObjectWrapper>(); + result = _(array).chain().first(); + result = _(list).chain().first(); } } @@ -876,11 +874,11 @@ namespace TestFlatten { { let result: _.RecursiveArray; - result = _.flatten([1, [2, [3]]]); - result = _.flatten([1, [2, [3]], [[4]]]); + result = _.flatten([1, [2, [3]]]); + result = _.flatten([1, [2, [3]], [[4]]]); - result = _.flatten({0: 1, 1: [2, [3]], length: 2}); - result = _.flatten({0: 1, 1: [2, [3]], 2: [[4]], length: 3}); + result = _.flatten({0: 1, 1: [2, [3]], length: 2}); + result = _.flatten({0: 1, 1: [2, [3]], 2: [[4]], length: 3}); } { @@ -1080,16 +1078,16 @@ namespace TestHead { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _('abc').chain().head(); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper; - result = _(array).chain().head<_.LoDashExplicitObjectWrapper>(); - result = _(list).chain().head<_.LoDashExplicitObjectWrapper>(); + result = _(array).chain().head(); + result = _(list).chain().head(); } } @@ -1184,8 +1182,8 @@ namespace TestInitial { // _.intersection namespace TestIntersection { - let array: TResult[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + let array: TResult[] = [] as any; + let list: _.List = [] as any; let arrayParam: TResult[] = [] as any; let listParam: _.List = [] as any; @@ -1281,21 +1279,21 @@ namespace TestLast { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _('abc').chain().last(); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper; - result = _(array).chain().last<_.LoDashExplicitObjectWrapper>(); + result = _(array).chain().last(); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper; - result = _(list).chain().last<_.LoDashExplicitObjectWrapper>(); + result = _(list).chain().last(); } } @@ -1359,7 +1357,7 @@ namespace TestNth { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _(array).chain().nth(); result = _(array).chain().nth(42); @@ -1442,6 +1440,10 @@ namespace TestPullAt { result = _.pullAt(array, 1); result = _.pullAt(array, [2, 3], 1); result = _.pullAt(array, 4, [2, 3], 1); + } + + { + let result: ArrayLike; result = _.pullAt(list); result = _.pullAt(list, 1); @@ -1456,11 +1458,15 @@ namespace TestPullAt { result = _(array).pullAt(1); result = _(array).pullAt([2, 3], 1); result = _(array).pullAt(4, [2, 3], 1); + } - result = _(list).pullAt(); - result = _(list).pullAt(1); - result = _(list).pullAt([2, 3], 1); - result = _(list).pullAt(4, [2, 3], 1); + { + let result: _.LoDashImplicitWrapper>; + + result = _(list).pullAt(); + result = _(list).pullAt(1); + result = _(list).pullAt([2, 3], 1); + result = _(list).pullAt(4, [2, 3], 1); } { @@ -1470,11 +1476,15 @@ namespace TestPullAt { result = _(array).chain().pullAt(1); result = _(array).chain().pullAt([2, 3], 1); result = _(array).chain().pullAt(4, [2, 3], 1); + } - result = _(list).chain().pullAt(); - result = _(list).chain().pullAt(1); - result = _(list).chain().pullAt([2, 3], 1); - result = _(list).chain().pullAt(4, [2, 3], 1); + { + let result: _.LoDashExplicitWrapper>; + + result = _(list).chain().pullAt(); + result = _(list).chain().pullAt(1); + result = _(list).chain().pullAt([2, 3], 1); + result = _(list).chain().pullAt(4, [2, 3], 1); } } @@ -1490,40 +1500,40 @@ namespace TestRemove { result = _.remove(array); result = _.remove(array, predicateFn); result = _.remove(array, ''); - result = _.remove<{a: number}, TResult>(array, {a: 42}); + result = _.remove(array, {a: 42}); result = _.remove(list); result = _.remove(list, predicateFn); result = _.remove(list, ''); - result = _.remove<{a: number}, TResult>(list, {a: 42}); + result = _.remove(list, {a: 42}); } { let result: _.LoDashImplicitArrayWrapper; - result = _(array).remove(); - result = _(array).remove(predicateFn); - result = _(array).remove(''); - result = _(array).remove<{a: number}>({a: 42}); + result = _(array).remove(); + result = _(array).remove(predicateFn); + result = _(array).remove(''); + result = _(array).remove({a: 42}); result = _(list).remove(); result = _(list).remove(predicateFn); result = _(list).remove(''); - result = _(list).remove<{a: number}, TResult>({a: 42}); + result = _(list).remove({a: 42}); } { let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().remove(); - result = _(array).chain().remove(predicateFn); - result = _(array).chain().remove(''); - result = _(array).chain().remove<{a: number}>({a: 42}); + result = _(array).chain().remove(); + result = _(array).chain().remove(predicateFn); + result = _(array).chain().remove(''); + result = _(array).chain().remove({a: 42}); result = _(list).chain().remove(); result = _(list).chain().remove(predicateFn); result = _(list).chain().remove(''); - result = _(list).chain().remove<{a: number}, TResult>({a: 42}); + result = _(list).chain().remove({a: 42}); } } @@ -1640,47 +1650,38 @@ namespace TestSortedIndexBy { let result: number; result = _.sortedIndexBy('', '', stringIterator); - result = _.sortedIndexBy('', '', stringIterator); result = _.sortedIndexBy(array, value, arrayIterator); result = _.sortedIndexBy(array, value, ''); result = _.sortedIndexBy(array, value, {a: 42}); - result = _.sortedIndexBy(array, value, arrayIterator); - result = _.sortedIndexBy<{a: number}, SampleType>(array, value, {a: 42}); result = _.sortedIndexBy(list, value, listIterator); result = _.sortedIndexBy(list, value, ''); result = _.sortedIndexBy(list, value, {a: 42}); - result = _.sortedIndexBy(list, value, listIterator); - result = _.sortedIndexBy<{a: number}, SampleType>(list, value, {a: 42}); - result = _('').sortedIndexBy('', stringIterator); + result = _('').sortedIndexBy('', stringIterator); - result = _(array).sortedIndexBy(value, arrayIterator); + result = _(array).sortedIndexBy(value, arrayIterator); result = _(array).sortedIndexBy(value, ''); - result = _(array).sortedIndexBy<{a: number}>(value, {a: 42}); + result = _(array).sortedIndexBy(value, {a: 42}); result = _(list).sortedIndexBy(value, listIterator); result = _(list).sortedIndexBy(value, ''); result = _(list).sortedIndexBy(value, {a: 42}); - result = _(list).sortedIndexBy(value, listIterator); - result = _(list).sortedIndexBy<{a: number}, SampleType>(value, {a: 42}); } { let result: _.LoDashExplicitWrapper; - result = _('').chain().sortedIndexBy('', stringIterator); + result = _('').chain().sortedIndexBy('', stringIterator); - result = _(array).chain().sortedIndexBy(value, arrayIterator); + result = _(array).chain().sortedIndexBy(value, arrayIterator); result = _(array).chain().sortedIndexBy(value, ''); - result = _(array).chain().sortedIndexBy<{a: number}>(value, {a: 42}); + result = _(array).chain().sortedIndexBy(value, {a: 42}); result = _(list).chain().sortedIndexBy(value, listIterator); result = _(list).chain().sortedIndexBy(value, ''); result = _(list).chain().sortedIndexBy(value, {a: 42}); - result = _(list).chain().sortedIndexBy(value, listIterator); - result = _(list).chain().sortedIndexBy<{a: number}, SampleType>(value, {a: 42}); } } @@ -1741,47 +1742,38 @@ namespace TestSortedLastIndexBy { let result: number; result = _.sortedLastIndexBy('', '', stringIterator); - result = _.sortedLastIndexBy('', '', stringIterator); result = _.sortedLastIndexBy(array, value, arrayIterator); result = _.sortedLastIndexBy(array, value, ''); result = _.sortedLastIndexBy(array, value, {a: 42}); - result = _.sortedLastIndexBy(array, value, arrayIterator); - result = _.sortedLastIndexBy<{a: number}, SampleType>(array, value, {a: 42}); result = _.sortedLastIndexBy(list, value, listIterator); result = _.sortedLastIndexBy(list, value, ''); result = _.sortedLastIndexBy(list, value, {a: 42}); - result = _.sortedLastIndexBy(list, value, listIterator); - result = _.sortedLastIndexBy<{a: number}, SampleType>(list, value, {a: 42}); - result = _('').sortedLastIndexBy('', stringIterator); + result = _('').sortedLastIndexBy('', stringIterator); - result = _(array).sortedLastIndexBy(value, arrayIterator); + result = _(array).sortedLastIndexBy(value, arrayIterator); result = _(array).sortedLastIndexBy(value, ''); - result = _(array).sortedLastIndexBy<{a: number}>(value, {a: 42}); + result = _(array).sortedLastIndexBy(value, {a: 42}); result = _(list).sortedLastIndexBy(value, listIterator); result = _(list).sortedLastIndexBy(value, ''); result = _(list).sortedLastIndexBy(value, {a: 42}); - result = _(list).sortedLastIndexBy(value, listIterator); - result = _(list).sortedLastIndexBy<{a: number}, SampleType>(value, {a: 42}); } { let result: _.LoDashExplicitWrapper; - result = _('').chain().sortedLastIndexBy('', stringIterator); + result = _('').chain().sortedLastIndexBy('', stringIterator); - result = _(array).chain().sortedLastIndexBy(value, arrayIterator); + result = _(array).chain().sortedLastIndexBy(value, arrayIterator); result = _(array).chain().sortedLastIndexBy(value, ''); - result = _(array).chain().sortedLastIndexBy<{a: number}>(value, {a: 42}); + result = _(array).chain().sortedLastIndexBy(value, {a: 42}); result = _(list).chain().sortedLastIndexBy(value, listIterator); result = _(list).chain().sortedLastIndexBy(value, ''); result = _(list).chain().sortedLastIndexBy(value, {a: 42}); - result = _(list).chain().sortedLastIndexBy(value, listIterator); - result = _(list).chain().sortedLastIndexBy<{a: number}, SampleType>(value, {a: 42}); } } @@ -1896,12 +1888,12 @@ namespace TestTakeRightWhile { result = _.takeRightWhile(array); result = _.takeRightWhile(array, predicateFn); result = _.takeRightWhile(array, ''); - result = _.takeRightWhile<{a: number;}, TResult>(array, {a: 42}); + result = _.takeRightWhile(array, {a: 42}); result = _.takeRightWhile(list); result = _.takeRightWhile(list, predicateFn); result = _.takeRightWhile(list, ''); - result = _.takeRightWhile<{a: number;}, TResult>(list, {a: 42}); + result = _.takeRightWhile(list, {a: 42}); } { @@ -1910,12 +1902,12 @@ namespace TestTakeRightWhile { result = _(array).takeRightWhile(); result = _(array).takeRightWhile(predicateFn); result = _(array).takeRightWhile(''); - result = _(array).takeRightWhile<{a: number;}>({a: 42}); + result = _(array).takeRightWhile({a: 42}); result = _(list).takeRightWhile(); result = _(list).takeRightWhile(predicateFn); result = _(list).takeRightWhile(''); - result = _(list).takeRightWhile<{a: number;}, TResult>({a: 42}); + result = _(list).takeRightWhile({a: 42}); } { @@ -1924,12 +1916,12 @@ namespace TestTakeRightWhile { result = _(array).chain().takeRightWhile(); result = _(array).chain().takeRightWhile(predicateFn); result = _(array).chain().takeRightWhile(''); - result = _(array).chain().takeRightWhile<{a: number;}>({a: 42}); + result = _(array).chain().takeRightWhile({a: 42}); result = _(list).chain().takeRightWhile(); result = _(list).chain().takeRightWhile(predicateFn); result = _(list).chain().takeRightWhile(''); - result = _(list).chain().takeRightWhile<{a: number;}, TResult>({a: 42}); + result = _(list).chain().takeRightWhile({a: 42}); } } @@ -1945,12 +1937,12 @@ namespace TestTakeWhile { result = _.takeWhile(array); result = _.takeWhile(array, predicateFn); result = _.takeWhile(array, ''); - result = _.takeWhile<{a: number;}, TResult>(array, {a: 42}); + result = _.takeWhile(array, {a: 42}); result = _.takeWhile(list); result = _.takeWhile(list, predicateFn); result = _.takeWhile(list, ''); - result = _.takeWhile<{a: number;}, TResult>(list, {a: 42}); + result = _.takeWhile(list, {a: 42}); } { @@ -1959,12 +1951,12 @@ namespace TestTakeWhile { result = _(array).takeWhile(); result = _(array).takeWhile(predicateFn); result = _(array).takeWhile(''); - result = _(array).takeWhile<{a: number;}>({a: 42}); + result = _(array).takeWhile({a: 42}); result = _(list).takeWhile(); result = _(list).takeWhile(predicateFn); result = _(list).takeWhile(''); - result = _(list).takeWhile<{a: number;}, TResult>({a: 42}); + result = _(list).takeWhile({a: 42}); } { @@ -1973,12 +1965,12 @@ namespace TestTakeWhile { result = _(array).chain().takeWhile(); result = _(array).chain().takeWhile(predicateFn); result = _(array).chain().takeWhile(''); - result = _(array).chain().takeWhile<{a: number;}>({a: 42}); + result = _(array).chain().takeWhile({a: 42}); result = _(list).chain().takeWhile(); result = _(list).chain().takeWhile(predicateFn); result = _(list).chain().takeWhile(''); - result = _(list).chain().takeWhile<{a: number;}, TResult>({a: 42}); + result = _(list).chain().takeWhile({a: 42}); } } @@ -2061,10 +2053,10 @@ namespace TestUnionBy { result = _.unionBy(array, list, array, list, array, 'a'); result = _.unionBy(array, array, list, array, list, array, 'a'); - result = _.unionBy(array, array, {a: 1}); - result = _.unionBy(array, list, array, {a: 1}); - result = _.unionBy(array, array, list, array, {a: 1}); - result = _.unionBy(array, list, array, list, array, {a: 1}); + result = _.unionBy(array, array, {a: 1}); + result = _.unionBy(array, list, array, {a: 1}); + result = _.unionBy(array, array, list, array, {a: 1}); + result = _.unionBy(array, list, array, list, array, {a: 1}); result = _.unionBy(array, list, array, list, array, list, {a: 1}); result = _.unionBy(list, list); @@ -2085,10 +2077,10 @@ namespace TestUnionBy { result = _.unionBy(list, array, list, array, list, 'a'); result = _.unionBy(list, list, array, list, array, list, 'a'); - result = _.unionBy(list, list, {a: 1}); - result = _.unionBy(list, array, list, {a: 1}); - result = _.unionBy(list, list, array, list, {a: 1}); - result = _.unionBy(list, array, list, array, list, {a: 1}); + result = _.unionBy(list, list, {a: 1}); + result = _.unionBy(list, array, list, {a: 1}); + result = _.unionBy(list, list, array, list, {a: 1}); + result = _.unionBy(list, array, list, array, list, {a: 1}); result = _.unionBy(list, array, list, array, list, array, {a: 1}); } @@ -2113,10 +2105,10 @@ namespace TestUnionBy { result = _(array).unionBy(list, array, list, array, 'a'); result = _(array).unionBy(array, list, array, list, array, 'a'); - result = _(array).unionBy(array, {a: 1}); - result = _(array).unionBy(list, array, {a: 1}); - result = _(array).unionBy(array, list, array, {a: 1}); - result = _(array).unionBy(list, array, list, array, {a: 1}); + result = _(array).unionBy(array, {a: 1}); + result = _(array).unionBy(list, array, {a: 1}); + result = _(array).unionBy(array, list, array, {a: 1}); + result = _(array).unionBy(list, array, list, array, {a: 1}); result = _(array).unionBy(list, array, list, array, list, {a: 1}); result = _(list).unionBy(list); @@ -2137,10 +2129,10 @@ namespace TestUnionBy { result = _(list).unionBy(array, list, array, list, 'a'); result = _(list).unionBy(list, array, list, array, list, 'a'); - result = _(list).unionBy(list, {a: 1}); - result = _(list).unionBy(array, list, {a: 1}); - result = _(list).unionBy(list, array, list, {a: 1}); - result = _(list).unionBy(array, list, array, list, {a: 1}); + result = _(list).unionBy(list, {a: 1}); + result = _(list).unionBy(array, list, {a: 1}); + result = _(list).unionBy(list, array, list, {a: 1}); + result = _(list).unionBy(array, list, array, list, {a: 1}); result = _(list).unionBy(array, list, array, list, array, {a: 1}); } @@ -2165,10 +2157,10 @@ namespace TestUnionBy { result = _(array).chain().unionBy(list, array, list, array, 'a'); result = _(array).chain().unionBy(array, list, array, list, array, 'a'); - result = _(array).chain().unionBy(array, {a: 1}); - result = _(array).chain().unionBy(list, array, {a: 1}); - result = _(array).chain().unionBy(array, list, array, {a: 1}); - result = _(array).chain().unionBy(list, array, list, array, {a: 1}); + result = _(array).chain().unionBy(array, {a: 1}); + result = _(array).chain().unionBy(list, array, {a: 1}); + result = _(array).chain().unionBy(array, list, array, {a: 1}); + result = _(array).chain().unionBy(list, array, list, array, {a: 1}); result = _(array).chain().unionBy(list, array, list, array, list, {a: 1}); result = _(list).chain().unionBy(list); @@ -2189,10 +2181,10 @@ namespace TestUnionBy { result = _(list).chain().unionBy(array, list, array, list, 'a'); result = _(list).chain().unionBy(list, array, list, array, list, 'a'); - result = _(list).chain().unionBy(list, {a: 1}); - result = _(list).chain().unionBy(array, list, {a: 1}); - result = _(list).chain().unionBy(list, array, list, {a: 1}); - result = _(list).chain().unionBy(array, list, array, list, {a: 1}); + result = _(list).chain().unionBy(list, {a: 1}); + result = _(list).chain().unionBy(array, list, {a: 1}); + result = _(list).chain().unionBy(list, array, list, {a: 1}); + result = _(list).chain().unionBy(array, list, array, list, {a: 1}); result = _(list).chain().unionBy(array, list, array, list, array, {a: 1}); } } @@ -2255,7 +2247,6 @@ namespace TestUniqBy { { let result: string[]; - result = _.uniqBy('abc', stringIterator); result = _.uniqBy('abc', stringIterator); } @@ -2263,16 +2254,12 @@ namespace TestUniqBy { let result: SampleObject[]; result = _.uniqBy(array, listIterator); - result = _.uniqBy(array, listIterator); result = _.uniqBy(array, 'a'); result = _.uniqBy(array, {a: 42}); - result = _.uniqBy<{a: number}, SampleObject>(array, {a: 42}); result = _.uniqBy(list, listIterator); - result = _.uniqBy(list, listIterator); result = _.uniqBy(list, 'a'); result = _.uniqBy(list, {a: 42}); - result = _.uniqBy<{a: number}, SampleObject>(list, {a: 42}); } { @@ -2284,15 +2271,13 @@ namespace TestUniqBy { { let result: _.LoDashImplicitArrayWrapper; - result = _(array).uniqBy(listIterator); + result = _(array).uniqBy(listIterator); result = _(array).uniqBy('a'); - result = _(array).uniqBy<{a: number}>({a: 42}); + result = _(array).uniqBy({a: 42}); result = _(list).uniqBy(listIterator); - result = _(list).uniqBy(listIterator); result = _(list).uniqBy('a'); result = _(list).uniqBy({a: 42}); - result = _(list).uniqBy<{a: number}, SampleObject>({a: 42}); } { @@ -2304,15 +2289,13 @@ namespace TestUniqBy { { let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().uniqBy(listIterator); + result = _(array).chain().uniqBy(listIterator); result = _(array).chain().uniqBy('a'); - result = _(array).chain().uniqBy<{a: number}>({a: 42}); + result = _(array).chain().uniqBy({a: 42}); result = _(list).chain().uniqBy(listIterator); - result = _(list).chain().uniqBy(listIterator); result = _(list).chain().uniqBy('a'); result = _(list).chain().uniqBy({a: 42}); - result = _(list).chain().uniqBy<{a: number}, SampleObject>({a: 42}); } } @@ -2370,7 +2353,6 @@ namespace TestSortedUniqBy { { let result: string[]; - result = _.sortedUniqBy('abc', stringIterator); result = _.sortedUniqBy('abc', stringIterator); } @@ -2378,16 +2360,12 @@ namespace TestSortedUniqBy { let result: SampleObject[]; result = _.sortedUniqBy(array, listIterator); - result = _.sortedUniqBy(array, listIterator); result = _.sortedUniqBy(array, 'a'); result = _.sortedUniqBy(array, {a: 42}); - result = _.sortedUniqBy<{a: number}, SampleObject>(array, {a: 42}); result = _.sortedUniqBy(list, listIterator); - result = _.sortedUniqBy(list, listIterator); result = _.sortedUniqBy(list, 'a'); result = _.sortedUniqBy(list, {a: 42}); - result = _.sortedUniqBy<{a: number}, SampleObject>(list, {a: 42}); } { @@ -2399,15 +2377,13 @@ namespace TestSortedUniqBy { { let result: _.LoDashImplicitArrayWrapper; - result = _(array).sortedUniqBy(listIterator); + result = _(array).sortedUniqBy(listIterator); result = _(array).sortedUniqBy('a'); - result = _(array).sortedUniqBy<{a: number}>({a: 42}); + result = _(array).sortedUniqBy({a: 42}); result = _(list).sortedUniqBy(listIterator); - result = _(list).sortedUniqBy(listIterator); result = _(list).sortedUniqBy('a'); result = _(list).sortedUniqBy({a: 42}); - result = _(list).sortedUniqBy<{a: number}, SampleObject>({a: 42}); } { @@ -2419,15 +2395,13 @@ namespace TestSortedUniqBy { { let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().sortedUniqBy(listIterator); + result = _(array).chain().sortedUniqBy(listIterator); result = _(array).chain().sortedUniqBy('a'); - result = _(array).chain().sortedUniqBy<{a: number}>({a: 42}); + result = _(array).chain().sortedUniqBy({a: 42}); result = _(list).chain().sortedUniqBy(listIterator); - result = _(list).chain().sortedUniqBy(listIterator); result = _(list).chain().sortedUniqBy('a'); result = _(list).chain().sortedUniqBy({a: 42}); - result = _(list).chain().sortedUniqBy<{a: number}, SampleObject>({a: 42}); } } @@ -2475,16 +2449,62 @@ namespace TestUnzip { // _.unzipWith { - let testUnzipWithArray: (number[]|_.List)[] | null | undefined = [] as any; + let testUnzipWithArray: Array> | null | undefined = [] as any; let testUnzipWithList: _.List> | null | undefined = [] as any; - let testUnzipWithIterator: {(prev: TResult, curr: number, index?: number, list?: number[]): TResult} = (prev: TResult, curr: number, index?: number, list?: number[]) => ({ a: 1, b: "", c: true }); - let result: TResult[]; - result = _.unzipWith(testUnzipWithArray); - result = _.unzipWith(testUnzipWithArray, testUnzipWithIterator); - result = _.unzipWith(testUnzipWithList); - result = _.unzipWith(testUnzipWithList, testUnzipWithIterator); - result = _(testUnzipWithArray).unzipWith(testUnzipWithIterator).value(); - result = _(testUnzipWithList).unzipWith(testUnzipWithIterator).value(); + + { + _.unzipWith(testUnzipWithArray); // $ExpectType number[][] + _.unzipWith(testUnzipWithList); // $ExpectType number[][] + _(testUnzipWithArray).unzipWith(); // $ExpectType LoDashImplicitWrapper + _(testUnzipWithList).unzipWith(); // $ExpectType LoDashImplicitWrapper + _.chain(testUnzipWithArray).unzipWith(); // $ExpectType LoDashExplicitWrapper + _.chain(testUnzipWithList).unzipWith(); // $ExpectType LoDashExplicitWrapper + } + + { + let result: TResult[]; + result = _.unzipWith(testUnzipWithArray, (...group) => { + group; // $ExpectType number[] + return any as TResult; + }); + result = _.unzipWith(testUnzipWithArray, (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + return any as TResult; + }); + result = _.unzipWith(testUnzipWithList, (...group) => { + group; // $ExpectType number[] + return any as TResult; + }); + result = _.unzipWith(testUnzipWithList, (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + return any as TResult; + }); + + result = _(testUnzipWithArray).unzipWith((...group): TResult => { + group; // $ExpectType number[] + return any as TResult; + }).value(); + result = _(testUnzipWithArray).unzipWith((value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + return any as TResult; + }).value(); + result = _(testUnzipWithList).unzipWith((...group): TResult => { + group; // $ExpectType number[] + return any as TResult; + }).value(); + result = _(testUnzipWithList).unzipWith((value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + return any as TResult; + }).value(); + } } // _.without @@ -2629,8 +2649,8 @@ namespace TestZipObject { { let result: _.Dictionary; - result = _.zipObject<_.Dictionary>(arrayOfKeys); - result = _.zipObject<_.Dictionary>(listOfKeys); + result = _.zipObject(arrayOfKeys); + result = _.zipObject(listOfKeys); } { @@ -2641,13 +2661,13 @@ namespace TestZipObject { result = _.zipObject<_.Dictionary>(listOfKeys, listOfValues); result = _.zipObject<_.Dictionary>(listOfKeys, arrayOfValues); - result = _.zipObject>(arrayOfKeys, arrayOfValues); - result = _.zipObject>(arrayOfKeys, listOfValues); - result = _.zipObject>(listOfKeys, listOfValues); - result = _.zipObject>(listOfKeys, arrayOfValues); + result = _.zipObject(arrayOfKeys, arrayOfValues); + result = _.zipObject(arrayOfKeys, listOfValues); + result = _.zipObject(listOfKeys, listOfValues); + result = _.zipObject(listOfKeys, arrayOfValues); - result = _.zipObject<_.Dictionary>(arrayOfKeyValuePairs); - result = _.zipObject<_.Dictionary>(listOfKeyValuePairs); + result = _.zipObject(arrayOfKeyValuePairs); + result = _.zipObject(listOfKeyValuePairs); } { @@ -2667,15 +2687,15 @@ namespace TestZipObject { result = _.zipObject(listOfKeys, arrayOfValues); result = _.zipObjectDeep(listOfKeys, arrayOfValues); - result = _.zipObject<_.Dictionary>(arrayOfKeyValuePairs); - result = _.zipObject<_.Dictionary>(listOfKeyValuePairs); + result = _.zipObject(arrayOfKeyValuePairs); + result = _.zipObject(listOfKeyValuePairs); } { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(arrayOfKeys).zipObject<_.Dictionary>(); - result = _(listOfKeys).zipObject<_.Dictionary>(); + result = _(arrayOfKeys).zipObject(); + result = _(listOfKeys).zipObject(); } { @@ -2686,13 +2706,13 @@ namespace TestZipObject { result = _(listOfKeys).zipObject<_.Dictionary>(listOfValues); result = _(listOfKeys).zipObject<_.Dictionary>(arrayOfValues); - result = _(arrayOfKeys).zipObject>(arrayOfValues); - result = _(arrayOfKeys).zipObject>(listOfValues); - result = _(listOfKeys).zipObject>(listOfValues); - result = _(listOfKeys).zipObject>(arrayOfValues); + result = _(arrayOfKeys).zipObject(arrayOfValues); + result = _(arrayOfKeys).zipObject(listOfValues); + result = _(listOfKeys).zipObject(listOfValues); + result = _(listOfKeys).zipObject(arrayOfValues); - result = _(listOfKeys).zipObject<_.Dictionary>(arrayOfKeyValuePairs); - result = _(listOfKeys).zipObject<_.Dictionary>(listOfKeyValuePairs); + result = _(listOfKeys).zipObject(arrayOfKeyValuePairs); + result = _(listOfKeys).zipObject(listOfKeyValuePairs); } { @@ -2721,8 +2741,8 @@ namespace TestZipObject { { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(arrayOfKeys).chain().zipObject<_.Dictionary>(); - result = _(listOfKeys).chain().zipObject<_.Dictionary>(); + result = _(arrayOfKeys).chain().zipObject(); + result = _(listOfKeys).chain().zipObject(); } { @@ -2733,13 +2753,13 @@ namespace TestZipObject { result = _(listOfKeys).chain().zipObject<_.Dictionary>(listOfValues); result = _(listOfKeys).chain().zipObject<_.Dictionary>(arrayOfValues); - result = _(arrayOfKeys).chain().zipObject>(arrayOfValues); - result = _(arrayOfKeys).chain().zipObject>(listOfValues); - result = _(listOfKeys).chain().zipObject>(listOfValues); - result = _(listOfKeys).chain().zipObject>(arrayOfValues); + result = _(arrayOfKeys).chain().zipObject(arrayOfValues); + result = _(arrayOfKeys).chain().zipObject(listOfValues); + result = _(listOfKeys).chain().zipObject(listOfValues); + result = _(listOfKeys).chain().zipObject(arrayOfValues); - result = _(listOfKeys).chain().zipObject<_.Dictionary>(arrayOfKeyValuePairs); - result = _(listOfKeys).chain().zipObject<_.Dictionary>(listOfKeyValuePairs); + result = _(listOfKeys).chain().zipObject(arrayOfKeyValuePairs); + result = _(listOfKeys).chain().zipObject(listOfKeyValuePairs); } { @@ -2767,18 +2787,157 @@ namespace TestZipObject { } // _.zipWith -interface TestZipWithFn { - (a1: number, a2: number): number; +namespace TestZipWith { + type TestZipWithFn = (a1: number, a2: number) => number; + + { + let result: number[][]; + result = _.zipWith([1, 2]); + result = _.zipWith([1, 2], [3, 4], [5, 6]); + result = _([1, 2]).zipWith().value(); + result = _([1, 2]).zipWith([3, 4], [5, 6]).value(); + result = _.chain([1, 2]).zipWith().value(); + result = _.chain([1, 2]).zipWith([3, 4], [5, 6]).value(); + } + { + let result: number[]; + + result = _.zipWith([1, 2], (value1) => { + value1; // $ExpectType number + return 1; + }); + result = _.zipWith([1, 2], [1, 2], (value1, value2) => { + value1; // $ExpectType number + value2; // $ExpectType number + return 1; + }); + result = _.zipWith([1, 2], [1, 2], [1, 2], (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + return 1; + }); + result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + return 1; + }); + result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + value5; // $ExpectType number + return 1; + }); + result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5, value6) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + value5; // $ExpectType number + value6; // $ExpectType number + return 1; + }); + result = _.zipWith([1, 2], [1, 2], [1, 2], (...group: number[]) => 1); + result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { + group; // $ExpectType number[] + return 1; + }); + + result = _([1, 2]).zipWith((value1) => { + value1; // $ExpectType number + return 1; + }).value(); + result = _([1, 2]).zipWith([1, 2], (value1, value2) => { + value1; // $ExpectType number + value2; // $ExpectType number + return 1; + }).value(); + result = _([1, 2]).zipWith([1, 2], [1, 2], (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + return 1; + }).value(); + result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], (value1, value2, value3, value4) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + return 1; + }).value(); + result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + value5; // $ExpectType number + return 1; + }).value(); + result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5, value6) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + value5; // $ExpectType number + value6; // $ExpectType number + return 1; + }).value(); + result = _([1, 2]).zipWith([1, 2], [1, 2], (...group: number[]) => 1).value(); + result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { + group; // $ExpectType number[] + return 1; + }).value(); + + result = _.chain([1, 2]).zipWith((value1) => { + value1; // $ExpectType number + return 1; + }).value(); + result = _.chain([1, 2]).zipWith([1, 2], (value1, value2) => { + value1; // $ExpectType number + value2; // $ExpectType number + return 1; + }).value(); + result = _.chain([1, 2]).zipWith([1, 2], [1, 2], (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + return 1; + }).value(); + result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], (value1, value2, value3, value4) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + return 1; + }).value(); + result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + value5; // $ExpectType number + return 1; + }).value(); + result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5, value6) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + value5; // $ExpectType number + value6; // $ExpectType number + return 1; + }).value(); + result = _.chain([1, 2]).zipWith([1, 2], [1, 2], (...group: number[]) => 1).value(); + result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { + group; // $ExpectType number[] + return 1; + }).value(); + } } -let testZipWithFn: TestZipWithFn = (a1, a2) => 1; -result = _.zipWith([1, 2]); -result = _.zipWith([1, 2], testZipWithFn); -result = _.zipWith([1, 2], [1, 2], testZipWithFn); -result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], testZipWithFn); -result = _([1, 2]).zipWith().value(); -result = _([1, 2]).zipWith(testZipWithFn).value(); -result = _([1, 2]).zipWith([1, 2], testZipWithFn).value(); -result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], testZipWithFn).value(); /********* * Chain * @@ -2868,7 +3027,7 @@ namespace TestTap { { let interceptor = (value: {a: string}) => {}; - let result: _.LoDashImplicitObjectWrapper<{a: string}>; + let result: _.LoDashImplicitWrapper<{a: string}>; _.chain({a: ''}).tap(interceptor); @@ -2895,7 +3054,7 @@ namespace TestTap { { let interceptor = (value: {a: string}) => {}; - let result: _.LoDashExplicitObjectWrapper<{a: string}>; + let result: _.LoDashExplicitWrapper<{a: string}>; _.chain({a: ''}).tap(interceptor); @@ -2948,7 +3107,7 @@ namespace TestThru { let interceptor: Interceptor = (x) => x; let result: _.LoDashImplicitArrayWrapper; - result = _([1, 2, 3]).thru(interceptor); + result = _([1, 2, 3]).thru(interceptor); } { @@ -2983,7 +3142,7 @@ namespace TestThru { let interceptor: Interceptor = (x) => x; let result: _.LoDashExplicitArrayWrapper; - result = _([1, 2, 3]).chain().thru(interceptor); + result = _([1, 2, 3]).chain().thru(interceptor); } } @@ -3037,13 +3196,13 @@ namespace TestConcat { { let result: _.LoDashImplicitArrayWrapper; - result = _(['']).concat(['']); - result = _(['']).concat([''], ['']); - result = _(['']).concat([''], [''], ['']); + result = _(['']).concat(['']); + result = _(['']).concat([''], ['']); + result = _(['']).concat([''], [''], ['']); - result = _(['']).concat(['']); - result = _(['']).concat([''], ['']); - result = _(['']).concat([''], [''], ['']); + result = _(['']).concat(['']); + result = _(['']).concat([''], ['']); + result = _(['']).concat([''], [''], ['']); } { @@ -3073,13 +3232,13 @@ namespace TestConcat { { let result: _.LoDashExplicitArrayWrapper; - result = _(['']).chain().concat(['']); - result = _(['']).chain().concat([''], ['']); - result = _(['']).chain().concat([''], [''], ['']); + result = _(['']).chain().concat(['']); + result = _(['']).chain().concat([''], ['']); + result = _(['']).chain().concat([''], [''], ['']); - result = _(['']).chain().concat(['']); - result = _(['']).chain().concat([''], ['']); - result = _(['']).chain().concat([''], [''], ['']); + result = _(['']).chain().concat(['']); + result = _(['']).chain().concat([''], ['']); + result = _(['']).chain().concat([''], [''], ['']); } { @@ -3123,7 +3282,7 @@ namespace TestPlant { } { - let result: _.LoDashImplicitObjectWrapper<{}>; + let result: _.LoDashImplicitWrapper<{}>; result = _(any).plant<{}>({}); } @@ -3153,7 +3312,7 @@ namespace TestPlant { } { - let result: _.LoDashExplicitObjectWrapper<{}>; + let result: _.LoDashExplicitWrapper<{}>; result = _(any).chain().plant<{}>({}); } } @@ -3197,8 +3356,8 @@ namespace TestToJSON { { let result: string[]; - result = _([]).toJSON(); - result = _([]).chain().toJSON(); + result = _(['']).toJSON(); + result = _(['']).chain().toJSON(); } { @@ -3216,13 +3375,13 @@ namespace TestToString { result = _('').toString(); result = _(42).toString(); result = _(true).toString(); - result = _(['']).toString(); + result = _(['']).toString(); result = _({}).toString(); result = _('').chain().toString(); result = _(42).chain().toString(); result = _(true).chain().toString(); - result = _(['']).chain().toString(); + result = _(['']).chain().toString(); result = _({}).chain().toString(); } @@ -3252,8 +3411,8 @@ namespace TestValue { { let result: string[]; - result = _([]).value(); - result = _([]).chain().value(); + result = _(['']).value(); + result = _(['']).chain().value(); } { @@ -3290,8 +3449,8 @@ namespace TestValueOf { { let result: string[]; - result = _([]).valueOf(); - result = _([]).chain().valueOf(); + result = _(['']).valueOf(); + result = _(['']).chain().valueOf(); } { @@ -3345,7 +3504,7 @@ namespace TestCountBy { let dictionary: _.Dictionary | null | undefined = obj; let numericDictionary: _.NumericDictionary | null | undefined = obj; - let stringIterator: (value: string, index: number, collection: ArrayLike) => any = (value: string, index: number, collection: ArrayLike) => 1; + let stringIterator: (value: string, index: number, collection: string) => any = (value: string, index: number, collection: string) => 1; let listIterator: (value: TResult, index: number, collection: _.List) => any = (value: TResult, index: number, collection: _.List) => 1; let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary) => any = (value: TResult, key: string, collection: _.Dictionary) => 1; let numericDictionaryIterator: (value: TResult, key: number, collection: _.NumericDictionary) => any = (value: TResult, key: number, collection: _.NumericDictionary) => 1; @@ -3359,25 +3518,25 @@ namespace TestCountBy { result = _.countBy(array); result = _.countBy(array, listIterator); result = _.countBy(array, ''); - result = _.countBy<{a: number}, TResult>(array, {a: 42}); + result = _.countBy(array, {a: 42}); result = _.countBy(array, {a: 42}); result = _.countBy(list); result = _.countBy(list, listIterator); result = _.countBy(list, ''); - result = _.countBy<{a: number}, TResult>(list, {a: 42}); + result = _.countBy(list, {a: 42}); result = _.countBy(list, {a: 42}); result = _.countBy(dictionary); - result = _.countBy(dictionary, dictionaryIterator); + result = _.countBy(dictionary, dictionaryIterator); result = _.countBy(dictionary, ''); - result = _.countBy<{a: number}, TResult>(dictionary, {a: 42}); + result = _.countBy(dictionary, {a: 42}); result = _.countBy(dictionary, {a: 42}); result = _.countBy(numericDictionary); result = _.countBy(numericDictionary, numericDictionaryIterator); result = _.countBy(numericDictionary, ''); - result = _.countBy<{a: number}, TResult>(numericDictionary, {a: 42}); + result = _.countBy(numericDictionary, {a: 42}); result = _.countBy(numericDictionary, {a: 42}); } @@ -3400,7 +3559,7 @@ namespace TestCountBy { result = _(list).countBy({a: 42}); result = _(dictionary).countBy(); - result = _(dictionary).countBy(dictionaryIterator); + result = _(dictionary).countBy(dictionaryIterator); result = _(dictionary).countBy(''); result = _(dictionary).countBy<{a: number}>({a: 42}); result = _(dictionary).countBy({a: 42}); @@ -3431,7 +3590,7 @@ namespace TestCountBy { result = _(list).chain().countBy({a: 42}); result = _(dictionary).chain().countBy(); - result = _(dictionary).chain().countBy(dictionaryIterator); + result = _(dictionary).chain().countBy(dictionaryIterator); result = _(dictionary).chain().countBy(''); result = _(dictionary).chain().countBy<{a: number}>({a: 42}); result = _(dictionary).chain().countBy({a: 42}); @@ -3526,7 +3685,7 @@ namespace TestEach { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).each(dictionaryIterator); + result = _(dictionary).each(dictionaryIterator); } { @@ -3550,7 +3709,7 @@ namespace TestEach { { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().each(dictionaryIterator); + result = _(dictionary).chain().each(dictionaryIterator); } } @@ -3636,7 +3795,7 @@ namespace TestEachRight { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).eachRight(dictionaryIterator); + result = _(dictionary).eachRight(dictionaryIterator); } { @@ -3660,7 +3819,7 @@ namespace TestEachRight { { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().eachRight(dictionaryIterator); + result = _(dictionary).chain().eachRight(dictionaryIterator); } } @@ -3694,7 +3853,7 @@ namespace TestEvery { result = _.every(list, {a: 42}); result = _.every(dictionary); - result = _.every(dictionary, dictionaryIterator); + result = _.every(dictionary, dictionaryIterator); result = _.every(dictionary, 'a'); result = _.every(dictionary, ['a', 42]); result = _.every(dictionary, {a: 42}); @@ -3718,7 +3877,7 @@ namespace TestEvery { result = _(list).every({a: 42}); result = _(dictionary).every(); - result = _(dictionary).every(dictionaryIterator); + result = _(dictionary).every(dictionaryIterator); result = _(dictionary).every('a'); result = _(dictionary).every(['a', 42]); result = _(dictionary).every({a: 42}); @@ -3746,7 +3905,7 @@ namespace TestEvery { result = _(list).chain().every({a: 42}); result = _(dictionary).chain().every(); - result = _(dictionary).chain().every(dictionaryIterator); + result = _(dictionary).chain().every(dictionaryIterator); result = _(dictionary).chain().every('a'); result = _(dictionary).chain().every(['a', 42]); result = _(dictionary).chain().every({a: 42}); @@ -3781,21 +3940,18 @@ namespace TestFilter { result = _.filter(array, listIterator); result = _.filter(array, ''); - result = _.filter(array, /./); result = _.filter(array, {a: 42}); result = _.filter(array, ["a", 42]); result = _.filter(list, listIterator); result = _.filter(list, ''); - result = _.filter(list, /./); result = _.filter(list, {a: 42}); result = _.filter(list, ["a", 42]); - result = _.filter(dictionary, dictionaryIterator); - result = _.filter(dictionary, ''); - result = _.filter(dictionary, /./); - result = _.filter(dictionary, {a: 42}); - result = _.filter(dictionary, ["a", 42]); + result = _.filter(dictionary, dictionaryIterator); + result = _.filter(dictionary, ''); + result = _.filter(dictionary, {a: 42}); + result = _.filter(dictionary, ["a", 42]); } { @@ -3809,21 +3965,18 @@ namespace TestFilter { result = _(array).filter(listIterator); result = _(array).filter(''); - result = _(array).filter(/./); result = _(array).filter({a: 42}); result = _(array).filter(["a", 42]); result = _(list).filter(listIterator); result = _(list).filter(''); - result = _(list).filter(/./); result = _(list).filter({a: 42}); result = _(list).filter(["a", 42]); - result = _(dictionary).filter(dictionaryIterator); - result = _(dictionary).filter(''); - result = _(dictionary).filter(/./); - result = _(dictionary).filter({a: 42}); - result = _(dictionary).filter(["a", 42]); + result = _(dictionary).filter(dictionaryIterator); + result = _(dictionary).filter(''); + result = _(dictionary).filter({a: 42}); + result = _(dictionary).filter(["a", 42]); } { @@ -3837,21 +3990,18 @@ namespace TestFilter { result = _(array).chain().filter(listIterator); result = _(array).chain().filter(''); - result = _(array).chain().filter(/./); result = _(array).chain().filter({a: 42}); result = _(array).chain().filter(["a", 42]); result = _(list).chain().filter(listIterator); result = _(list).chain().filter(''); - result = _(list).chain().filter(/./); result = _(list).chain().filter({a: 42}); result = _(list).chain().filter(["a", 42]); - result = _(dictionary).chain().filter(dictionaryIterator); - result = _(dictionary).chain().filter(''); - result = _(dictionary).chain().filter(/./); - result = _(dictionary).chain().filter({a: 42}); - result = _(dictionary).chain().filter(["a", 42]); + result = _(dictionary).chain().filter(dictionaryIterator); + result = _(dictionary).chain().filter(''); + result = _(dictionary).chain().filter({a: 42}); + result = _(dictionary).chain().filter(["a", 42]); } { @@ -3861,10 +4011,10 @@ namespace TestFilter { _.filter(a2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] _.filter(d2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] - _(a2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitArrayWrapper - _(d2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitArrayWrapper - _(a2).chain().filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitArrayWrapper - _(d2).chain().filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitArrayWrapper + _(a2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitWrapper + _(d2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitWrapper + _(a2).chain().filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitWrapper + _(d2).chain().filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitWrapper } } @@ -3903,13 +4053,13 @@ namespace TestFind { result = _.find(list, ['a', 5], 1); result = _.find(dictionary); - result = _.find(dictionary); - result = _.find(dictionary, dictionaryIterator); - result = _.find(dictionary, dictionaryIterator, 1); - result = _.find(dictionary, ''); - result = _.find(dictionary, '', 1); - result = _.find(dictionary, {a: 42}); - result = _.find(dictionary, {a: 42}, 1); + result = _.find(dictionary); + result = _.find(dictionary, dictionaryIterator); + result = _.find(dictionary, dictionaryIterator, 1); + result = _.find(dictionary, ''); + result = _.find(dictionary, '', 1); + result = _.find(dictionary, {a: 42}); + result = _.find(dictionary, {a: 42}, 1); result = _.find(dictionary, ['a', 5]); result = _.find(dictionary, ['a', 5], 1); @@ -3933,15 +4083,15 @@ namespace TestFind { result = _(list).find(['a', 5]); result = _(list).find(['a', 5], 1); - result = _(dictionary).find(); - result = _(dictionary).find(dictionaryIterator); - result = _(dictionary).find(dictionaryIterator, 1); - result = _(dictionary).find(''); - result = _(dictionary).find('', 1); - result = _(dictionary).find({a: 42}); - result = _(dictionary).find({a: 42}, 1); - result = _(dictionary).find(['a', 5]); - result = _(dictionary).find(['a', 5], 1); + result = _(dictionary).find(); + result = _(dictionary).find(dictionaryIterator); + result = _(dictionary).find(dictionaryIterator, 1); + result = _(dictionary).find(''); + result = _(dictionary).find('', 1); + result = _(dictionary).find({a: 42}); + result = _(dictionary).find({a: 42}, 1); + result = _(dictionary).find(['a', 5]); + result = _(dictionary).find(['a', 5], 1); result = _.find([any as TResult, null, undefined], (value: TResult | null | undefined): value is TResult | undefined => value !== null); result = _([any as TResult, null, undefined]).find((value: TResult | null | undefined): value is TResult | undefined => value !== null); @@ -3982,13 +4132,13 @@ namespace TestFindLast { result = _.findLast(list, ['a', 5], 1); result = _.findLast(dictionary); - result = _.findLast(dictionary); - result = _.findLast(dictionary, dictionaryIterator); - result = _.findLast(dictionary, dictionaryIterator, 1); - result = _.findLast(dictionary, ''); - result = _.findLast(dictionary, '', 1); - result = _.findLast(dictionary, {a: 42}); - result = _.findLast(dictionary, {a: 42}, 1); + result = _.findLast(dictionary); + result = _.findLast(dictionary, dictionaryIterator); + result = _.findLast(dictionary, dictionaryIterator, 1); + result = _.findLast(dictionary, ''); + result = _.findLast(dictionary, '', 1); + result = _.findLast(dictionary, {a: 42}); + result = _.findLast(dictionary, {a: 42}, 1); result = _.findLast(dictionary, ['a', 5]); result = _.findLast(dictionary, ['a', 5], 1); @@ -4012,15 +4162,15 @@ namespace TestFindLast { result = _(list).findLast(['a', 5]); result = _(list).findLast(['a', 5], 1); - result = _(dictionary).findLast(); - result = _(dictionary).findLast(dictionaryIterator); - result = _(dictionary).findLast(dictionaryIterator, 1); - result = _(dictionary).findLast(''); - result = _(dictionary).findLast('', 1); - result = _(dictionary).findLast({a: 42}); - result = _(dictionary).findLast({a: 42}, 1); - result = _(dictionary).findLast(['a', 5]); - result = _(dictionary).findLast(['a', 5], 1); + result = _(dictionary).findLast(); + result = _(dictionary).findLast(dictionaryIterator); + result = _(dictionary).findLast(dictionaryIterator, 1); + result = _(dictionary).findLast(''); + result = _(dictionary).findLast('', 1); + result = _(dictionary).findLast({a: 42}); + result = _(dictionary).findLast({a: 42}, 1); + result = _(dictionary).findLast(['a', 5]); + result = _(dictionary).findLast(['a', 5], 1); result = _.findLast([any as TResult, null, undefined], (value: TResult | null | undefined): value is TResult | undefined => value !== null); result = _([any as TResult, null, undefined]).findLast((value: TResult | null | undefined): value is TResult | undefined => value !== null); @@ -4068,7 +4218,7 @@ namespace TestFlatMap { result = _.flatMap(numArray, listIterator); result = _.flatMap(numArray, listIterator); - result = _.flatMap(objArray, 'a'); + result = _.flatMap(objArray, 'a'); result = _.flatMap(numList); result = _.flatMap(numList); @@ -4076,15 +4226,14 @@ namespace TestFlatMap { result = _.flatMap(numList, listIterator); result = _.flatMap(numList, listIterator); - result = _.flatMap(objList, 'a'); + result = _.flatMap(objList, 'a'); result = _.flatMap(numDictionary); result = _.flatMap(numDictionary); result = _.flatMap(numDictionary, dictionaryIterator); - result = _.flatMap(numDictionary, dictionaryIterator); - result = _.flatMap(objDictionary, 'a'); + result = _.flatMap(objDictionary, 'a'); result = _.flatMap(numNumericDictionary); result = _.flatMap(numNumericDictionary); @@ -4092,7 +4241,7 @@ namespace TestFlatMap { result = _.flatMap(numNumericDictionary, numericDictionaryIterator); result = _.flatMap(numNumericDictionary, numericDictionaryIterator); - result = _.flatMap<_.NumericDictionary<{a: number}|{a: number}[]>, number>(objNumericDictionary, 'a'); + result = _.flatMap(objNumericDictionary, 'a'); } { @@ -4115,27 +4264,26 @@ namespace TestFlatMap { let result: _.LoDashImplicitArrayWrapper; result = _('abc').flatMap(); - result = _('abc').flatMap(stringIterator); } { let result: _.LoDashImplicitArrayWrapper; result = _(numArray).flatMap(); - result = _(numArray).flatMap(listIterator); - result = _(objArray).flatMap('a'); + result = _(numArray).flatMap(listIterator); + result = _(objArray).flatMap('a'); result = _(numList).flatMap(); result = _(numList).flatMap(listIterator); - result = _(objList).flatMap('a'); + result = _(objList).flatMap('a'); result = _(numDictionary).flatMap(); - result = _(numDictionary).flatMap(dictionaryIterator); - result = _(objDictionary).flatMap('a'); + result = _(numDictionary).flatMap(dictionaryIterator); + result = _(objDictionary).flatMap('a'); result = _(numNumericDictionary).flatMap(); result = _(numNumericDictionary).flatMap(numericDictionaryIterator); - result = _(objNumericDictionary).flatMap('a'); + result = _(objNumericDictionary).flatMap('a'); } { @@ -4158,27 +4306,26 @@ namespace TestFlatMap { let result: _.LoDashExplicitArrayWrapper; result = _('abc').chain().flatMap(); - result = _('abc').chain().flatMap(stringIterator); } { let result: _.LoDashExplicitArrayWrapper; result = _(numArray).chain().flatMap(); - result = _(numArray).chain().flatMap(listIterator); - result = _(objArray).chain().flatMap('a'); + result = _(numArray).chain().flatMap(listIterator); + result = _(objArray).chain().flatMap('a'); result = _(numList).chain().flatMap(); result = _(numList).chain().flatMap(listIterator); - result = _(objList).chain().flatMap('a'); + result = _(objList).chain().flatMap('a'); result = _(numDictionary).chain().flatMap(); - result = _(numDictionary).chain().flatMap(dictionaryIterator); - result = _(objDictionary).chain().flatMap('a'); + result = _(numDictionary).chain().flatMap(dictionaryIterator); + result = _(objDictionary).chain().flatMap('a'); result = _(numNumericDictionary).chain().flatMap(); result = _(numNumericDictionary).chain().flatMap(numericDictionaryIterator); - result = _(objNumericDictionary).chain().flatMap('a'); + result = _(objNumericDictionary).chain().flatMap('a'); } { @@ -4232,25 +4379,25 @@ namespace TestFlatMapDeep { { let result: number[]; - result = _.flatMapDeep(numArray); + result = _.flatMapDeep(numArray); result = _.flatMapDeep(numArray, listIterator); result = _.flatMapDeep(objArray, 'a'); - result = _.flatMapDeep(numList); + result = _.flatMapDeep(numList); result = _.flatMapDeep(numList, listIterator); result = _.flatMapDeep(objList, 'a'); - result = _.flatMapDeep(numDictionary); + result = _.flatMapDeep(numDictionary); result = _.flatMapDeep(numDictionary, dictionaryIterator); result = _.flatMapDeep(objDictionary, 'a'); - result = _.flatMapDeep(numNumericDictionary); + result = _.flatMapDeep(numNumericDictionary); result = _.flatMapDeep(numNumericDictionary, numericDictionaryIterator); @@ -4283,19 +4430,19 @@ namespace TestFlatMapDeep { { let result: _.LoDashImplicitArrayWrapper; - result = _(numArray).flatMapDeep(); + result = _(numArray).flatMapDeep(); result = _(numArray).flatMapDeep(listIterator); result = _(objArray).flatMapDeep('a'); - result = _(numList).flatMapDeep(); + result = _(numList).flatMapDeep(); result = _(numList).flatMapDeep(listIterator); result = _(objList).flatMapDeep('a'); - result = _(numDictionary).flatMapDeep(); + result = _(numDictionary).flatMapDeep(); result = _(numDictionary).flatMapDeep(dictionaryIterator); result = _(objDictionary).flatMapDeep('a'); - result = _(numNumericDictionary).flatMapDeep(); + result = _(numNumericDictionary).flatMapDeep(); result = _(numNumericDictionary).flatMapDeep(numericDictionaryIterator); result = _(objNumericDictionary).flatMapDeep('a'); } @@ -4326,19 +4473,19 @@ namespace TestFlatMapDeep { { let result: _.LoDashExplicitArrayWrapper; - result = _(numArray).chain().flatMapDeep(); + result = _(numArray).chain().flatMapDeep(); result = _(numArray).chain().flatMapDeep(listIterator); result = _(objArray).chain().flatMapDeep('a'); - result = _(numList).chain().flatMapDeep(); + result = _(numList).chain().flatMapDeep(); result = _(numList).chain().flatMapDeep(listIterator); result = _(objList).chain().flatMapDeep('a'); - result = _(numDictionary).chain().flatMapDeep(); + result = _(numDictionary).chain().flatMapDeep(); result = _(numDictionary).chain().flatMapDeep(dictionaryIterator); result = _(objDictionary).chain().flatMapDeep('a'); - result = _(numNumericDictionary).chain().flatMapDeep(); + result = _(numNumericDictionary).chain().flatMapDeep(); result = _(numNumericDictionary).chain().flatMapDeep(numericDictionaryIterator); result = _(objNumericDictionary).chain().flatMapDeep('a'); } @@ -4394,25 +4541,25 @@ namespace TestFlatMapDepth { { let result: number[]; - result = _.flatMapDepth(numArray); + result = _.flatMapDepth(numArray); result = _.flatMapDepth(numArray, listIterator, 1); result = _.flatMapDepth(objArray, 'a'); - result = _.flatMapDepth(numList); + result = _.flatMapDepth(numList); result = _.flatMapDepth(numList, listIterator, 1); result = _.flatMapDepth(objList, 'a', 1); - result = _.flatMapDepth(numDictionary); + result = _.flatMapDepth(numDictionary); result = _.flatMapDepth(numDictionary, dictionaryIterator, 1); result = _.flatMapDepth(objDictionary, 'a', 1); - result = _.flatMapDepth(numNumericDictionary); + result = _.flatMapDepth(numNumericDictionary); result = _.flatMapDepth(numNumericDictionary, numericDictionaryIterator, 1); @@ -4445,19 +4592,19 @@ namespace TestFlatMapDepth { { let result: _.LoDashImplicitArrayWrapper; - result = _(numArray).flatMapDepth(); + result = _(numArray).flatMapDepth(); result = _(numArray).flatMapDepth(listIterator, 1); result = _(objArray).flatMapDepth('a', 1); - result = _(numList).flatMapDepth(); + result = _(numList).flatMapDepth(); result = _(numList).flatMapDepth(listIterator, 1); result = _(objList).flatMapDepth('a', 1); - result = _(numDictionary).flatMapDepth(); + result = _(numDictionary).flatMapDepth(); result = _(numDictionary).flatMapDepth(dictionaryIterator, 1); result = _(objDictionary).flatMapDepth('a', 1); - result = _(numNumericDictionary).flatMapDepth(); + result = _(numNumericDictionary).flatMapDepth(); result = _(numNumericDictionary).flatMapDepth(numericDictionaryIterator, 1); result = _(objNumericDictionary).flatMapDepth('a', 1); } @@ -4488,19 +4635,19 @@ namespace TestFlatMapDepth { { let result: _.LoDashExplicitArrayWrapper; - result = _(numArray).chain().flatMapDepth(); + result = _(numArray).chain().flatMapDepth(); result = _(numArray).chain().flatMapDepth(listIterator, 1); result = _(objArray).chain().flatMapDepth('a', 1); - result = _(numList).chain().flatMapDepth(); + result = _(numList).chain().flatMapDepth(); result = _(numList).chain().flatMapDepth(listIterator, 1); result = _(objList).chain().flatMapDepth('a', 1); - result = _(numDictionary).chain().flatMapDepth(); + result = _(numDictionary).chain().flatMapDepth(); result = _(numDictionary).chain().flatMapDepth(dictionaryIterator, 1); result = _(objDictionary).chain().flatMapDepth('a', 1); - result = _(numNumericDictionary).chain().flatMapDepth(); + result = _(numNumericDictionary).chain().flatMapDepth(); result = _(numNumericDictionary).chain().flatMapDepth(numericDictionaryIterator, 1); result = _(objNumericDictionary).chain().flatMapDepth('a', 1); } @@ -4564,8 +4711,7 @@ namespace TestForEach { result = _.forEach(array, (value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - // Note: ideally we'd like collection TResult[], but it seems the best we can get is List. - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4579,8 +4725,7 @@ namespace TestForEach { result = _.forEach(nilArray, (value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - // Note: ideally we'd like collection TResult[], but it seems the best we can get is List. - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4648,7 +4793,7 @@ namespace TestForEach { result = _(array).forEach((value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4658,7 +4803,7 @@ namespace TestForEach { result = _(nilArray).forEach((value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4677,13 +4822,13 @@ namespace TestForEach { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).forEach(dictionaryIterator); + result = _(dictionary).forEach(dictionaryIterator); } { let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).forEach(dictionaryIterator); + result = _(nilDictionary).forEach(dictionaryIterator); } { @@ -4702,7 +4847,7 @@ namespace TestForEach { result = _(array).chain().forEach((value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4712,7 +4857,7 @@ namespace TestForEach { result = _(nilArray).chain().forEach((value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4731,13 +4876,13 @@ namespace TestForEach { { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().forEach(dictionaryIterator); + result = _(dictionary).chain().forEach(dictionaryIterator); } { let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).chain().forEach(dictionaryIterator); + result = _(nilDictionary).chain().forEach(dictionaryIterator); } } @@ -4779,7 +4924,7 @@ namespace TestForEachRight { result = _.forEachRight(array, (value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4789,7 +4934,7 @@ namespace TestForEachRight { result = _.forEachRight(nilArray, (value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4870,13 +5015,13 @@ namespace TestForEachRight { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).forEachRight(dictionaryIterator); + result = _(dictionary).forEachRight(dictionaryIterator); } { let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).forEachRight(dictionaryIterator); + result = _(nilDictionary).forEachRight(dictionaryIterator); } { @@ -4895,7 +5040,7 @@ namespace TestForEachRight { result = _(array).chain().forEachRight((value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4905,7 +5050,7 @@ namespace TestForEachRight { result = _(nilArray).chain().forEachRight((value, index, collection) => { value; // $ExpectType TResult index; // $ExpectType number - collection; // $ExpectType ArrayLike + collection; // $ExpectType TResult[] }); } @@ -4924,13 +5069,13 @@ namespace TestForEachRight { { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().forEachRight(dictionaryIterator); + result = _(dictionary).chain().forEachRight(dictionaryIterator); } { let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).chain().forEachRight(dictionaryIterator); + result = _(nilDictionary).chain().forEachRight(dictionaryIterator); } } @@ -4952,7 +5097,6 @@ namespace TestGroupBy { result = _.groupBy(''); result = _.groupBy('', stringIterator); - result = _.groupBy('', stringIterator); } { @@ -4963,97 +5107,67 @@ namespace TestGroupBy { result = _.groupBy(array, ''); result = _.groupBy(array, {a: 42}); - result = _.groupBy(array, listIterator); - result = _.groupBy(array, ''); - result = _.groupBy<{a: number}, SampleType>(array, {a: 42}); - result = _.groupBy(list); result = _.groupBy(list, listIterator); result = _.groupBy(list, ''); result = _.groupBy(list, {a: 42}); - result = _.groupBy(list, listIterator); - result = _.groupBy(list, ''); - result = _.groupBy<{a: number}, SampleType>(list, {a: 42}); - - result = _.groupBy(dictionary); - result = _.groupBy(dictionary, dictionaryIterator); - result = _.groupBy(dictionary, ''); - result = _.groupBy(dictionary, {a: 42}); - - result = _.groupBy(dictionary, dictionaryIterator); - result = _.groupBy(dictionary, ''); - result = _.groupBy<{a: number}, SampleType>(dictionary, {a: 42}); + result = _.groupBy(dictionary); + result = _.groupBy(dictionary, dictionaryIterator); + result = _.groupBy(dictionary, ''); + result = _.groupBy(dictionary, {a: 42}); } { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _('').groupBy(); - result = _('').groupBy((char: string, index: number, string: ArrayLike) => 0); + result = _('').groupBy((char: string, index: number, string: ArrayLike) => 0); } { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; result = _(array).groupBy(); - result = _(array).groupBy(listIterator); + result = _(array).groupBy(listIterator); result = _(array).groupBy(''); - result = _(array).groupBy(''); - result = _(array).groupBy<{a: number}>({a: 42}); + result = _(array).groupBy({a: 42}); result = _(list).groupBy(); result = _(list).groupBy(listIterator); result = _(list).groupBy(''); result = _(list).groupBy({a: 42}); - result = _(list).groupBy(listIterator); - result = _(list).groupBy(''); - result = _(list).groupBy<{a: number}, SampleType>({a: 42}); - result = _(dictionary).groupBy(); - result = _(dictionary).groupBy(dictionaryIterator); + result = _(dictionary).groupBy(dictionaryIterator); result = _(dictionary).groupBy(''); result = _(dictionary).groupBy({a: 42}); - - result = _(dictionary).groupBy(dictionaryIterator); - result = _(dictionary).groupBy(''); - result = _(dictionary).groupBy<{a: number}, SampleType>({a: 42}); } { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _('').chain().groupBy(); - result = _('').chain().groupBy((char: string, index: number, string: ArrayLike) => 0); + result = _('').chain().groupBy((char: string, index: number, string: ArrayLike) => 0); } { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; result = _(array).chain().groupBy(); - result = _(array).chain().groupBy(listIterator); + result = _(array).chain().groupBy(listIterator); result = _(array).chain().groupBy(''); - result = _(array).chain().groupBy(''); - result = _(array).chain().groupBy<{a: number}>({a: 42}); + result = _(array).chain().groupBy({a: 42}); result = _(list).chain().groupBy(); result = _(list).chain().groupBy(listIterator); result = _(list).chain().groupBy(''); result = _(list).chain().groupBy({a: 42}); - result = _(list).chain().groupBy(listIterator); - result = _(list).chain().groupBy(''); - result = _(list).chain().groupBy<{a: number}, SampleType>({a: 42}); - result = _(dictionary).chain().groupBy(); - result = _(dictionary).chain().groupBy(dictionaryIterator); + result = _(dictionary).chain().groupBy(dictionaryIterator); result = _(dictionary).chain().groupBy(''); result = _(dictionary).chain().groupBy({a: 42}); - - result = _(dictionary).chain().groupBy(dictionaryIterator); - result = _(dictionary).chain().groupBy(''); - result = _(dictionary).chain().groupBy<{a: number}, SampleType>({a: 42}); } } @@ -5132,26 +5246,22 @@ namespace TestKeyBy { result = _.keyBy(array); result = _.keyBy(array, listIterator); result = _.keyBy(array, 'a'); - result = _.keyBy<{a: number}, SampleObject>(array, {a: 42}); result = _.keyBy(array, {a: 42}); result = _.keyBy(list); result = _.keyBy(list, listIterator); result = _.keyBy(list, 'a'); - result = _.keyBy<{a: number}, SampleObject>(list, {a: 42}); result = _.keyBy(list, {a: 42}); result = _.keyBy(numericDictionary); result = _.keyBy(numericDictionary, numericDictionaryIterator); result = _.keyBy(numericDictionary, 'a'); - result = _.keyBy<{a: number}, SampleObject>(numericDictionary, {a: 42}); result = _.keyBy(numericDictionary, {a: 42}); - result = _.keyBy(dictionary); - result = _.keyBy(dictionary, dictionaryIterator); - result = _.keyBy(dictionary, 'a'); - result = _.keyBy<{a: number}, SampleObject>(dictionary, {a: 42}); - result = _.keyBy(dictionary, {a: 42}); + result = _.keyBy(dictionary); + result = _.keyBy(dictionary, dictionaryIterator); + result = _.keyBy(dictionary, 'a'); + result = _.keyBy(dictionary, {a: 42}); } { @@ -5167,25 +5277,22 @@ namespace TestKeyBy { result = _(array).keyBy(); result = _(array).keyBy(listIterator); result = _(array).keyBy('a'); - result = _(array).keyBy<{a: number}>({a: 42}); + result = _(array).keyBy({a: 42}); result = _(list).keyBy(); result = _(list).keyBy(listIterator); result = _(list).keyBy('a'); - result = _(list).keyBy<{a: number}, SampleObject>({a: 42}); result = _(list).keyBy({a: 42}); result = _(numericDictionary).keyBy(); result = _(numericDictionary).keyBy(numericDictionaryIterator); result = _(numericDictionary).keyBy('a'); - result = _(numericDictionary).keyBy<{a: number}, SampleObject>({a: 42}); result = _(numericDictionary).keyBy({a: 42}); - result = _(dictionary).keyBy(); - result = _(dictionary).keyBy(dictionaryIterator); - result = _(dictionary).keyBy('a'); - result = _(dictionary).keyBy<{a: number}, SampleObject>({a: 42}); - result = _(dictionary).keyBy({a: 42}); + result = _(dictionary).keyBy(); + result = _(dictionary).keyBy(dictionaryIterator); + result = _(dictionary).keyBy('a'); + result = _(dictionary).keyBy({a: 42}); } { @@ -5201,25 +5308,22 @@ namespace TestKeyBy { result = _(array).chain().keyBy(); result = _(array).chain().keyBy(listIterator); result = _(array).chain().keyBy('a'); - result = _(array).chain().keyBy<{a: number}>({a: 42}); + result = _(array).chain().keyBy({a: 42}); result = _(list).chain().keyBy(); result = _(list).chain().keyBy(listIterator); result = _(list).chain().keyBy('a'); - result = _(list).chain().keyBy<{a: number}, SampleObject>({a: 42}); result = _(list).chain().keyBy({a: 42}); result = _(numericDictionary).chain().keyBy(); result = _(numericDictionary).chain().keyBy(numericDictionaryIterator); result = _(numericDictionary).chain().keyBy('a'); - result = _(numericDictionary).chain().keyBy<{a: number}, SampleObject>({a: 42}); result = _(numericDictionary).chain().keyBy({a: 42}); - result = _(dictionary).chain().keyBy(); - result = _(dictionary).chain().keyBy(dictionaryIterator); - result = _(dictionary).chain().keyBy('a'); - result = _(dictionary).chain().keyBy<{a: number}, SampleObject>({a: 42}); - result = _(dictionary).chain().keyBy({a: 42}); + result = _(dictionary).chain().keyBy(); + result = _(dictionary).chain().keyBy(dictionaryIterator); + result = _(dictionary).chain().keyBy('a'); + result = _(dictionary).chain().keyBy({a: 42}); } } @@ -5240,68 +5344,68 @@ namespace TestInvoke { let result: string; - result = _.invoke(boolArray, "[1]"); - result = _.invoke(boolArray, "[1]", 2); - result = _.invoke(boolArray, [1, "toString"]); - result = _.invoke(boolArray, [1, "toString"], 2); + result = _.invoke(boolArray, "[1]"); + result = _.invoke(boolArray, "[1]", 2); + result = _.invoke(boolArray, [1, "toString"]); + result = _.invoke(boolArray, [1, "toString"], 2); - result = _.invoke(boolArray, "[1]"); - result = _.invoke(boolArray, "[1]", 2); - result = _.invoke(boolArray, [1, "toString"]); - result = _.invoke(boolArray, [1, "toString"], 2); + result = _.invoke(boolArray, "[1]"); + result = _.invoke(boolArray, "[1]", 2); + result = _.invoke(boolArray, [1, "toString"]); + result = _.invoke(boolArray, [1, "toString"], 2); - result = _.invoke(numDict, "a.toString"); - result = _.invoke(numDict, "a.toString", 2); - result = _.invoke(numDict, ["a", "toString"]); - result = _.invoke(numDict, ["a", "toString"], 2); + result = _.invoke(numDict, "a.toString"); + result = _.invoke(numDict, "a.toString", 2); + result = _.invoke(numDict, ["a", "toString"]); + result = _.invoke(numDict, ["a", "toString"], 2); - result = _.invoke(numDict, "a.toString"); - result = _.invoke(numDict, "a.toString", 2); - result = _.invoke(numDict, ["a", "toString"]); - result = _.invoke(numDict, ["a", "toString"], 2); + result = _.invoke(numDict, "a.toString"); + result = _.invoke(numDict, "a.toString", 2); + result = _.invoke(numDict, ["a", "toString"]); + result = _.invoke(numDict, ["a", "toString"], 2); - result = _.invoke(nestedDict, ["a[0].toString"]); - result = _.invoke(nestedDict, ["a[0].toString"], 2); - result = _.invoke(nestedDict, ["a", 0, "toString"]); - result = _.invoke(nestedDict, ["a", 0, "toString"], 2); + result = _.invoke(nestedDict, ["a[0].toString"]); + result = _.invoke(nestedDict, ["a[0].toString"], 2); + result = _.invoke(nestedDict, ["a", 0, "toString"]); + result = _.invoke(nestedDict, ["a", 0, "toString"], 2); - result = _.invoke, string>(nestedDict, ["a[0].toString"]); - result = _.invoke, string>(nestedDict, ["a[0].toString"], 2); - result = _.invoke, string>(nestedDict, ["a", 0, "toString"]); - result = _.invoke, string>(nestedDict, ["a", 0, "toString"], 2); + result = _.invoke(nestedDict, ["a[0].toString"]); + result = _.invoke(nestedDict, ["a[0].toString"], 2); + result = _.invoke(nestedDict, ["a", 0, "toString"]); + result = _.invoke(nestedDict, ["a", 0, "toString"], 2); - result = _(boolArray).invoke("[1]"); - result = _(boolArray).invoke("[1]", 2); - result = _(boolArray).invoke([1, "toString"]); - result = _(boolArray).invoke([1, "toString"], 2); + result = _(boolArray).invoke("[1]"); + result = _(boolArray).invoke("[1]", 2); + result = _(boolArray).invoke([1, "toString"]); + result = _(boolArray).invoke([1, "toString"], 2); - result = _(numDict).invoke("a.toString"); - result = _(numDict).invoke("a.toString", 2); - result = _(numDict).invoke(["a", "toString"]); - result = _(numDict).invoke(["a", "toString"], 2); + result = _(numDict).invoke("a.toString"); + result = _(numDict).invoke("a.toString", 2); + result = _(numDict).invoke(["a", "toString"]); + result = _(numDict).invoke(["a", "toString"], 2); - result = _(nestedDict).invoke("a[0].toString"); - result = _(nestedDict).invoke("a[0].toString", 2); - result = _(nestedDict).invoke(["a", 0, "toString"]); - result = _(nestedDict).invoke(["a", 0, "toString"], 2); + result = _(nestedDict).invoke("a[0].toString"); + result = _(nestedDict).invoke("a[0].toString", 2); + result = _(nestedDict).invoke(["a", 0, "toString"]); + result = _(nestedDict).invoke(["a", 0, "toString"], 2); { let result: _.LoDashExplicitWrapper; - result = _(boolArray).chain().invoke<_.LoDashExplicitWrapper>("[1]"); - result = _(boolArray).chain().invoke<_.LoDashExplicitWrapper>("[1]", 2); - result = _(boolArray).chain().invoke<_.LoDashExplicitWrapper>([1, "toString"]); - result = _(boolArray).chain().invoke<_.LoDashExplicitWrapper>([1, "toString"], 2); + result = _(boolArray).chain().invoke("[1]"); + result = _(boolArray).chain().invoke("[1]", 2); + result = _(boolArray).chain().invoke([1, "toString"]); + result = _(boolArray).chain().invoke([1, "toString"], 2); - result = _(numDict).chain().invoke<_.LoDashExplicitWrapper>("a.toString"); - result = _(numDict).chain().invoke<_.LoDashExplicitWrapper>("a.toString", 2); - result = _(numDict).chain().invoke<_.LoDashExplicitWrapper>(["a", "toString"]); - result = _(numDict).chain().invoke<_.LoDashExplicitWrapper>(["a", "toString"], 2); + result = _(numDict).chain().invoke("a.toString"); + result = _(numDict).chain().invoke("a.toString", 2); + result = _(numDict).chain().invoke(["a", "toString"]); + result = _(numDict).chain().invoke(["a", "toString"], 2); - result = _(nestedDict).chain().invoke<_.LoDashExplicitWrapper>("a[0].toString"); - result = _(nestedDict).chain().invoke<_.LoDashExplicitWrapper>("a[0].toString", 2); - result = _(nestedDict).chain().invoke<_.LoDashExplicitWrapper>(["a", 0, "toString"]); - result = _(nestedDict).chain().invoke<_.LoDashExplicitWrapper>(["a", 0, "toString"], 2); + result = _(nestedDict).chain().invoke("a[0].toString"); + result = _(nestedDict).chain().invoke("a[0].toString", 2); + result = _(nestedDict).chain().invoke(["a", 0, "toString"]); + result = _(nestedDict).chain().invoke(["a", 0, "toString"], 2); } } @@ -5317,17 +5421,17 @@ namespace TestInvokeMap { let numDict: _.Dictionary | null | undefined = obj as any; let result: string[]; - result = _.invokeMap(numArray, 'toString'); - result = _.invokeMap(numArray, 'toString', 2); - result = _.invokeMap(numArray, 'toString'); - result = _.invokeMap(numArray, 'toString', 2); - result = _(numArray).invokeMap('toString').value(); - result = _(numArray).invokeMap('toString', 2).value(); - result = _(numArray).chain().invokeMap('toString').value(); - result = _(numArray).chain().invokeMap('toString', 2).value(); + result = _.invokeMap(numArray, 'toString'); + result = _.invokeMap(numArray, 'toString', 2); + result = _.invokeMap(numArray, 'toString'); + result = _.invokeMap(numArray, 'toString', 2); + result = _(numArray).invokeMap('toString').value(); + result = _(numArray).invokeMap('toString', 2).value(); + result = _(numArray).chain().invokeMap('toString').value(); + result = _(numArray).chain().invokeMap('toString', 2).value(); - result = _.invokeMap(numArray, Number.prototype.toString); - result = _.invokeMap(numArray, Number.prototype.toString, 2); + result = _.invokeMap(numArray, Number.prototype.toString); + result = _.invokeMap(numArray, Number.prototype.toString, 2); result = _.invokeMap(numArray, Number.prototype.toString); result = _.invokeMap(numArray, Number.prototype.toString, 2); result = _(numArray).invokeMap(Number.prototype.toString).value(); @@ -5335,17 +5439,17 @@ namespace TestInvokeMap { result = _(numArray).chain().invokeMap(Number.prototype.toString).value(); result = _(numArray).chain().invokeMap(Number.prototype.toString, 2).value(); - result = _.invokeMap(numDict, 'toString'); - result = _.invokeMap(numDict, 'toString', 2); - result = _.invokeMap(numDict, 'toString'); - result = _.invokeMap(numDict, 'toString', 2); - result = _(numDict).invokeMap('toString').value(); - result = _(numDict).invokeMap('toString', 2).value(); - result = _(numDict).chain().invokeMap('toString').value(); - result = _(numDict).chain().invokeMap('toString', 2).value(); + result = _.invokeMap(numDict, 'toString'); + result = _.invokeMap(numDict, 'toString', 2); + result = _.invokeMap(numDict, 'toString'); + result = _.invokeMap(numDict, 'toString', 2); + result = _(numDict).invokeMap('toString').value(); + result = _(numDict).invokeMap('toString', 2).value(); + result = _(numDict).chain().invokeMap('toString').value(); + result = _(numDict).chain().invokeMap('toString', 2).value(); - result = _.invokeMap(numDict, Number.prototype.toString); - result = _.invokeMap(numDict, Number.prototype.toString, 2); + result = _.invokeMap(numDict, Number.prototype.toString); + result = _.invokeMap(numDict, Number.prototype.toString, 2); result = _.invokeMap(numDict, Number.prototype.toString); result = _.invokeMap(numDict, Number.prototype.toString, 2); result = _(numDict).invokeMap(Number.prototype.toString).value(); @@ -5413,7 +5517,7 @@ namespace TestMap { { let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().map({}); + result = _(array).chain().map({}); result = _(list).chain().map({}); result = _(dictionary).chain().map({}); } @@ -5438,33 +5542,148 @@ namespace TestMap { } // _.partition -result = _.partition('abcd', (n) => n < 'c'); -result = _.partition(['a', 'b', 'c', 'd'], (n) => n < 'c'); -result = _.partition([1, 2, 3, 4], (n) => n < 3); -result = _.partition({0: 1, 1: 2, 2: 3, 3: 4, length: 4}, (n) => n < 3); -result = _.partition({a: 1, b: 2, c: 3, d: 4}, (n) => n < 3); -result = <{a: number}[][]>_.partition<{a: number}, {a: number}>([{a: 1}, {a: 2}], {a: 2}); -result = <{a: number}[][]>_.partition<{a: number}, {a: number}>({0: {a: 1}, 1: {a: 2}, length: 2}, {a: 2}); -result = <{a: number}[][]>_.partition<{a: number}, {a: number}>({0: {a: 1}, 1: {a: 2}}, {a: 2}); -result = <{a: number}[][]>_.partition<{a: number}>([{a: 1}, {a: 2}], 'a'); -result = <{a: number}[][]>_.partition<{a: number}>([{a: 1}, {a: 2}], 'a', 2); -result = <{a: number}[][]>_.partition<{a: number}>({0: {a: 1}, 1: {a: 2}, length: 2}, 'a'); -result = <{a: number}[][]>_.partition<{a: number}>({0: {a: 1}, 1: {a: 2}, length: 2}, 'a', 2); -result = <{a: number}[][]>_.partition<{a: number}>({0: {a: 1}, 1: {a: 2}}, 'a'); -result = <{a: number}[][]>_.partition<{a: number}>({0: {a: 1}, 1: {a: 2}}, 'a', 2); -result = <{a: number}[][]>_.partition<{a: number}>(null, 'a'); -result = _('abcd').partition((n) => n < 'c').value(); -result = _(['a', 'b', 'c', 'd']).partition((n) => n < 'c').value(); -result = _([1, 2, 3, 4]).partition((n) => n < 3).value(); -result = _({0: 1, 1: 2, 2: 3, 3: 4, length: 4}).partition((n) => n < 3).value(); -result = _({a: 1, b: 2, c: 3, d: 4}).partition((n) => n < 3).value(); -result = <{a: number}[][]>_([{a: 1}, {a: 2}]).partition<{a: number}>({a: 2}).value(); -result = <{a: number}[][]>_({0: {a: 1}, 1: {a: 2}, length: 2}).partition<{a: number}, {a: number}>({a: 2}).value(); -result = <{a: number}[][]>_({0: {a: 1}, 1: {a: 2}}).partition<{a: number}, {a: number}>({a: 2}).value(); -result = <{a: number}[][]>_([{a: 1}, {a: 2}]).partition('a').value(); -result = <{a: number}[][]>_([{a: 1}, {a: 2}]).partition('a', 2).value(); -result = <{a: number}[][]>_({0: {a: 1}, 1: {a: 2}}).partition<{a: number}>('a').value(); -result = <{a: number}[][]>_({0: {a: 1}, 1: {a: 2}}).partition<{a: number}>('a', 2).value(); +namespace TestPartition { + { + let result: any[][]; + + result = _.partition(any, (n) => { + n; // $ExpectType any + return n < 'c'; + }); + } + + { + let result: string[][]; + + result = _.partition('abcd', (n) => { + n; // $ExpectType string + return n < 'c'; + }); + result = _.partition(['a', 'b', 'c', 'd'], (n) => { + n; // $ExpectType string + return n < 'c'; + }); + } + + { + let result: number[][]; + + result = _.partition([1, 2, 3, 4], (n) => n < 3); + result = _.partition({0: 1, 1: 2, 2: 3, 3: 4, length: 4}, (n) => n < 3); + result = _.partition({a: 1, b: 2, c: 3, d: 4}, (n) => { + n; // $ExpectType number + return n < 3; + }); + } + + { + let result: Array>; + + result = _.partition([{a: 1}, {a: 2}], {a: 2}); + result = _.partition({0: {a: 1}, 1: {a: 2}, length: 2}, {a: 2}); + result = _.partition({0: {a: 1}, 1: {a: 2}}, {a: 2}); + result = _.partition([{a: 1}, {a: 2}], 'a'); + result = _.partition([{a: 1}, {a: 2}], ['a', 2]); + result = _.partition({0: {a: 1}, 1: {a: 2}, length: 2}, 'a'); + result = _.partition({0: {a: 1}, 1: {a: 2}, length: 2}, ['a', 2]); + result = _.partition({0: {a: 1}, 1: {a: 2}}, 'a'); + result = _.partition({0: {a: 1}, 1: {a: 2}}, ['a', 2]); + } + + { + _.partition(null, 'a'); + } + + { + let result: _.LoDashImplicitWrapper; + + result = _(any).partition((n) => { + n; // $ExpectType any + return n < 'c'; + }); + } + + { + let result: _.LoDashImplicitWrapper; + + result = _('abcd').partition((n) => { + n; // $ExpectType string + return n < 'c'; + }); + result = _(['a', 'b', 'c', 'd']).partition((n) => { + n; // $ExpectType string + return n < 'c'; + }); + } + + { + let result: _.LoDashImplicitWrapper; + + result = _([1, 2, 3, 4]).partition((n) => n < 3); + result = _({0: 1, 1: 2, 2: 3, 3: 4, length: 4}).partition((n) => n < 3); + result = _({a: 1, b: 2, c: 3, d: 4}).partition((n) => { + n; // $ExpectType number + return n < 3; + }); + } + + { + let result: _.LoDashImplicitWrapper>>; + + result = _([{a: 1}, {a: 2}]).partition({a: 2}); + result = _({0: {a: 1}, 1: {a: 2}, length: 2}).partition({a: 2}); + result = _({0: {a: 1}, 1: {a: 2}}).partition({a: 2}); + result = _([{a: 1}, {a: 2}]).partition('a'); + result = _([{a: 1}, {a: 2}]).partition(['a', 2]); + result = _({0: {a: 1}, 1: {a: 2}}).partition('a'); + result = _({0: {a: 1}, 1: {a: 2}}).partition(['a', 2]); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _.chain(any).partition((n) => { + n; // $ExpectType any + return n < 'c'; + }); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _.chain('abcd').partition((n) => { + n; // $ExpectType string + return n < 'c'; + }); + result = _.chain(['a', 'b', 'c', 'd']).partition((n) => { + n; // $ExpectType string + return n < 'c'; + }); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _.chain([1, 2, 3, 4]).partition((n) => n < 3); + result = _.chain({0: 1, 1: 2, 2: 3, 3: 4, length: 4}).partition((n) => n < 3); + result = _.chain({a: 1, b: 2, c: 3, d: 4}).partition((n) => { + n; // $ExpectType number + return n < 3; + }); + } + + { + let result: _.LoDashExplicitWrapper>>; + + result = _.chain([{a: 1}, {a: 2}]).partition({a: 2}); + result = _.chain({0: {a: 1}, 1: {a: 2}, length: 2}).partition({a: 2}); + result = _.chain({0: {a: 1}, 1: {a: 2}}).partition({a: 2}); + result = _.chain([{a: 1}, {a: 2}]).partition('a'); + result = _.chain([{a: 1}, {a: 2}]).partition(['a', 2]); + result = _.chain({0: {a: 1}, 1: {a: 2}}).partition('a'); + result = _.chain({0: {a: 1}, 1: {a: 2}}).partition(['a', 2]); + } +} // TODO // _.map with iteratee shorthand @@ -5549,8 +5768,8 @@ namespace TestReduce { return r; }, {} as ABC); // tslint:disable-line no-object-literal-type-assertion - result = _([1, 2, 3]).reduce((sum: number, num: number) => sum + num); - result = _({ 'a': 1, 'b': 2, 'c': 3 }).reduce((r: ABC, num: number, key: string) => { + result = _([1, 2, 3]).reduce((sum: number, num: number) => sum + num); + result = _({ 'a': 1, 'b': 2, 'c': 3 }).reduce((r: ABC, num: number, key: string) => { r[key] = num * 3; return r; }, { a: 1, b: 2, c: 3 }); @@ -5579,15 +5798,15 @@ namespace TestReject { result = _.reject(array, listIterator); result = _.reject(array, ''); - result = _.reject<{a: number}, TResult>(array, {a: 42}); + result = _.reject(array, {a: 42}); result = _.reject(list, listIterator); result = _.reject(list, ''); - result = _.reject<{a: number}, TResult>(list, {a: 42}); + result = _.reject(list, {a: 42}); - result = _.reject(dictionary, dictionaryIterator); - result = _.reject(dictionary, ''); - result = _.reject<{a: number}, TResult>(dictionary, {a: 42}); + result = _.reject(dictionary, dictionaryIterator); + result = _.reject(dictionary, ''); + result = _.reject(dictionary, {a: 42}); } { @@ -5601,15 +5820,15 @@ namespace TestReject { result = _(array).reject(listIterator); result = _(array).reject(''); - result = _(array).reject<{a: number}>({a: 42}); + result = _(array).reject({a: 42}); result = _(list).reject(listIterator); result = _(list).reject(''); - result = _(list).reject<{a: number}, TResult>({a: 42}); + result = _(list).reject({a: 42}); - result = _(dictionary).reject(dictionaryIterator); - result = _(dictionary).reject(''); - result = _(dictionary).reject<{a: number}, TResult>({a: 42}); + result = _(dictionary).reject(dictionaryIterator); + result = _(dictionary).reject(''); + result = _(dictionary).reject({a: 42}); } { @@ -5623,15 +5842,15 @@ namespace TestReject { result = _(array).chain().reject(listIterator); result = _(array).chain().reject(''); - result = _(array).chain().reject<{a: number}>({a: 42}); + result = _(array).chain().reject({a: 42}); result = _(list).chain().reject(listIterator); result = _(list).chain().reject(''); - result = _(list).chain().reject<{a: number}, TResult>({a: 42}); + result = _(list).chain().reject({a: 42}); - result = _(dictionary).chain().reject(dictionaryIterator); - result = _(dictionary).chain().reject(''); - result = _(dictionary).chain().reject<{a: number}, TResult>({a: 42}); + result = _(dictionary).chain().reject(dictionaryIterator); + result = _(dictionary).chain().reject(''); + result = _(dictionary).chain().reject({a: 42}); } } @@ -5663,14 +5882,14 @@ namespace TestSample { } { - let result: _.LoDashExplicitWrapper; + let result: _.LoDashExplicitWrapper; result = _('abc').chain().sample(); - result = _(array).chain().sample<_.LoDashExplicitWrapper>(); - result = _(list).chain().sample<_.LoDashExplicitWrapper>(); - result = _(dictionary).chain().sample<_.LoDashExplicitWrapper>(); - result = _(numericDictionary).chain().sample<_.LoDashExplicitWrapper>(); - result = _({a: 'foo'}).chain().sample<_.LoDashExplicitWrapper>(); + result = _(array).chain().sample(); + result = _(list).chain().sample(); + result = _(dictionary).chain().sample(); + result = _(numericDictionary).chain().sample(); + result = _({a: 'foo'}).chain().sample(); } } @@ -5695,8 +5914,8 @@ namespace TestSampleSize { result = _.sampleSize(dictionary, 42); result = _.sampleSize(numericDictionary); result = _.sampleSize(numericDictionary, 42); - result = _.sampleSize<{a: string}, string>({a: 'foo'}); - result = _.sampleSize<{a: string}, string>({a: 'foo'}, 42); + result = _.sampleSize({a: 'foo'}); + result = _.sampleSize({a: 'foo'}, 42); result = _.sampleSize({a: 'foo'}); result = _.sampleSize({a: 'foo'}, 42); } @@ -5754,7 +5973,7 @@ namespace TestShuffle { result = _.shuffle(array); result = _.shuffle(list); - result = _.shuffle(dictionary); + result = _.shuffle(dictionary); } { @@ -5768,7 +5987,7 @@ namespace TestShuffle { result = _(array).shuffle(); result = _(list).shuffle(); - result = _(dictionary).shuffle(); + result = _(dictionary).shuffle(); } { @@ -5782,7 +6001,7 @@ namespace TestShuffle { result = _(array).chain().shuffle(); result = _(list).chain().shuffle(); - result = _(dictionary).chain().shuffle(); + result = _(dictionary).chain().shuffle(); } } @@ -5798,9 +6017,9 @@ namespace TestSize { { let result: number; - result = _.size(array); - result = _.size(list); - result = _.size(dictionary); + result = _.size(array); + result = _.size(list); + result = _.size(dictionary); result = _.size(''); result = _(array).size(); @@ -5852,10 +6071,10 @@ namespace TestSome { result = _.some(dictionary); result = _.some(numericDictionary, numericDictionaryIterator); - result = _.some(dictionary, (value, key, collection) => { - value.a--; - key.substr(0); - value = collection[key]; + result = _.some(dictionary, (value, key, collection) => { + value; // $ExpectType SampleObject + key; // $ExpectType string + collection; // $ExpectType Dictionary return true; }); result = _.some(dictionary, 'a'); @@ -5887,7 +6106,7 @@ namespace TestSome { result = _(list).some({a: 42}); result = _(dictionary).some(); - result = _(dictionary).some(dictionaryIterator); + result = _(dictionary).some(dictionaryIterator); result = _(dictionary).some('a'); result = _(dictionary).some(['a', 42]); result = _(dictionary).some({a: 42}); @@ -5921,7 +6140,7 @@ namespace TestSome { result = _(list).chain().some({a: 42}); result = _(dictionary).chain().some(); - result = _(dictionary).chain().some(dictionaryIterator); + result = _(dictionary).chain().some(dictionaryIterator); result = _(dictionary).chain().some('a'); result = _(dictionary).chain().some(['a', 42]); result = _(dictionary).chain().some({a: 42}); @@ -5953,58 +6172,58 @@ namespace TestSortBy { { let result: TResult[]; - result = _.sortBy(array); - result = _.sortBy(array, listIterator); - result = _.sortBy(array, ''); - result = _.sortBy<{a: number}, TResult>(array, {a: 42}); + result = _.sortBy(array); + result = _.sortBy(array, listIterator); + result = _.sortBy(array, ''); + result = _.sortBy(array, {a: 42}); - result = _.sortBy(list); - result = _.sortBy(list, listIterator); - result = _.sortBy(list, ''); - result = _.sortBy<{a: number}, TResult>(list, {a: 42}); + result = _.sortBy(list); + result = _.sortBy(list, listIterator); + result = _.sortBy(list, ''); + result = _.sortBy(list, {a: 42}); - result = _.sortBy(dictionary); - result = _.sortBy(dictionary, dictionaryIterator); - result = _.sortBy(dictionary, ''); - result = _.sortBy<{a: number}, TResult>(dictionary, {a: 42}); + result = _.sortBy(dictionary); + result = _.sortBy(dictionary, dictionaryIterator); + result = _.sortBy(dictionary, ''); + result = _.sortBy(dictionary, {a: 42}); } { let result: _.LoDashImplicitArrayWrapper; result = _(array).sortBy(); - result = _(array).sortBy(listIterator); + result = _(array).sortBy(listIterator); result = _(array).sortBy(''); - result = _(array).sortBy<{a: number}>({a: 42}); + result = _(array).sortBy({a: 42}); - result = _(list).sortBy(); - result = _(list).sortBy(listIterator); - result = _(list).sortBy(''); - result = _(list).sortBy<{a: number}, TResult>({a: 42}); + result = _(list).sortBy(); + result = _(list).sortBy(listIterator); + result = _(list).sortBy(''); + result = _(list).sortBy({a: 42}); - result = _(dictionary).sortBy(); - result = _(dictionary).sortBy(dictionaryIterator); - result = _(dictionary).sortBy(''); - result = _(dictionary).sortBy<{a: number}, TResult>({a: 42}); + result = _(dictionary).sortBy(); + result = _(dictionary).sortBy(dictionaryIterator); + result = _(dictionary).sortBy(''); + result = _(dictionary).sortBy({a: 42}); } { let result: _.LoDashExplicitArrayWrapper; result = _(array).chain().sortBy(); - result = _(array).chain().sortBy(listIterator); + result = _(array).chain().sortBy(listIterator); result = _(array).chain().sortBy(''); - result = _(array).chain().sortBy<{a: number}>({a: 42}); + result = _(array).chain().sortBy({a: 42}); - result = _(list).chain().sortBy(); - result = _(list).chain().sortBy(listIterator); - result = _(list).chain().sortBy(''); - result = _(list).chain().sortBy<{a: number}, TResult>({a: 42}); + result = _(list).chain().sortBy(); + result = _(list).chain().sortBy(listIterator); + result = _(list).chain().sortBy(''); + result = _(list).chain().sortBy({a: 42}); - result = _(dictionary).chain().sortBy(); - result = _(dictionary).chain().sortBy(dictionaryIterator); - result = _(dictionary).chain().sortBy(''); - result = _(dictionary).chain().sortBy<{a: number}, TResult>({a: 42}); + result = _(dictionary).chain().sortBy(); + result = _(dictionary).chain().sortBy(dictionaryIterator); + result = _(dictionary).chain().sortBy(''); + result = _(dictionary).chain().sortBy({a: 42}); } } @@ -6037,23 +6256,23 @@ namespace TestorderBy { let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => 1; let result: SampleObject[]; - result = _.orderBy<{a: number}, SampleObject>(array, iteratees); - result = _.orderBy<{a: number}, SampleObject>(array, iteratees, orders); + result = _.orderBy(array, iteratees); + result = _.orderBy(array, iteratees, orders); result = _.orderBy(array, iteratees); result = _.orderBy(array, iteratees, orders); - result = _.orderBy<{a: number}, SampleObject>(list, iteratees); - result = _.orderBy<{a: number}, SampleObject>(list, iteratees, orders); + result = _.orderBy(list, iteratees); + result = _.orderBy(list, iteratees, orders); result = _.orderBy(list, iteratees); result = _.orderBy(list, iteratees, orders); - result = _.orderBy<{a: number}, SampleObject>(numericDictionary, iteratees); - result = _.orderBy<{a: number}, SampleObject>(numericDictionary, iteratees, orders); + result = _.orderBy(numericDictionary, iteratees); + result = _.orderBy(numericDictionary, iteratees, orders); result = _.orderBy(numericDictionary, iteratees); result = _.orderBy(numericDictionary, iteratees, orders); - result = _.orderBy<{a: number}, SampleObject>(dictionary, iteratees); - result = _.orderBy<{a: number}, SampleObject>(dictionary, iteratees, orders); + result = _.orderBy(dictionary, iteratees); + result = _.orderBy(dictionary, iteratees, orders); result = _.orderBy(dictionary, iteratees); result = _.orderBy(dictionary, iteratees, orders); } @@ -6062,21 +6281,21 @@ namespace TestorderBy { let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => ""; let result: _.LoDashImplicitArrayWrapper; - result = _(array).orderBy<{a: number}>(iteratees); - result = _(array).orderBy<{a: number}>(iteratees, orders); + result = _(array).orderBy(iteratees); + result = _(array).orderBy(iteratees, orders); - result = _(list).orderBy<{a: number}, SampleObject>(iteratees); - result = _(list).orderBy<{a: number}, SampleObject>(iteratees, orders); + result = _(list).orderBy(iteratees); + result = _(list).orderBy(iteratees, orders); result = _(list).orderBy(iteratees); result = _(list).orderBy(iteratees, orders); - result = _(numericDictionary).orderBy<{a: number}, SampleObject>(iteratees); - result = _(numericDictionary).orderBy<{a: number}, SampleObject>(iteratees, orders); + result = _(numericDictionary).orderBy(iteratees); + result = _(numericDictionary).orderBy(iteratees, orders); result = _(numericDictionary).orderBy(iteratees); result = _(numericDictionary).orderBy(iteratees, orders); - result = _(dictionary).orderBy<{a: number}, SampleObject>(iteratees); - result = _(dictionary).orderBy<{a: number}, SampleObject>(iteratees, orders); + result = _(dictionary).orderBy(iteratees); + result = _(dictionary).orderBy(iteratees, orders); result = _(dictionary).orderBy(iteratees); result = _(dictionary).orderBy(iteratees, orders); } @@ -6085,21 +6304,21 @@ namespace TestorderBy { let iteratees: (value: SampleObject) => any|string|{a: number}|((value: SampleObject) => any|string|{a: number})[] = (value) => ""; let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().orderBy<{a: number}>(iteratees); - result = _(array).chain().orderBy<{a: number}>(iteratees, orders); + result = _(array).chain().orderBy(iteratees); + result = _(array).chain().orderBy(iteratees, orders); - result = _(list).chain().orderBy<{a: number}, SampleObject>(iteratees); - result = _(list).chain().orderBy<{a: number}, SampleObject>(iteratees, orders); + result = _(list).chain().orderBy(iteratees); + result = _(list).chain().orderBy(iteratees, orders); result = _(list).chain().orderBy(iteratees); result = _(list).chain().orderBy(iteratees, orders); - result = _(numericDictionary).chain().orderBy<{a: number}, SampleObject>(iteratees); - result = _(numericDictionary).chain().orderBy<{a: number}, SampleObject>(iteratees, orders); + result = _(numericDictionary).chain().orderBy(iteratees); + result = _(numericDictionary).chain().orderBy(iteratees, orders); result = _(numericDictionary).chain().orderBy(iteratees); result = _(numericDictionary).chain().orderBy(iteratees, orders); - result = _(dictionary).chain().orderBy<{a: number}, SampleObject>(iteratees); - result = _(dictionary).chain().orderBy<{a: number}, SampleObject>(iteratees, orders); + result = _(dictionary).chain().orderBy(iteratees); + result = _(dictionary).chain().orderBy(iteratees, orders); result = _(dictionary).chain().orderBy(iteratees); result = _(dictionary).chain().orderBy(iteratees, orders); } @@ -6167,24 +6386,24 @@ namespace TestAry { { let result: SampleFunc; - result = _.ary(func); - result = _.ary(func, 2); - result = _.ary(func); - result = _.ary(func, 2); + result = _.ary(func); + result = _.ary(func, 2); + result = _.ary(func); + result = _.ary(func, 2); } { let result: _.LoDashImplicitObjectWrapper; - result = _(func).ary(); - result = _(func).ary(2); + result = _(func).ary(); + result = _(func).ary(2); } { let result: _.LoDashExplicitObjectWrapper; - result = _(func).chain().ary(); - result = _(func).chain().ary(2); + result = _(func).chain().ary(); + result = _(func).chain().ary(2); } } @@ -6226,8 +6445,8 @@ namespace TestBind { let result: SampleResult; - result = _.bind(func, any); - result = _.bind(func, any); + result = _.bind(func, any); + result = _.bind(func, any); } { @@ -6235,8 +6454,8 @@ namespace TestBind { let result: SampleResult; - result = _.bind(func, any, 42); - result = _.bind(func, any, 42); + result = _.bind(func, any, 42); + result = _.bind(func, any, 42); } { @@ -6244,8 +6463,8 @@ namespace TestBind { let result: SampleResult; - result = _.bind(func, any, 42, ''); - result = _.bind(func, any, 42, ''); + result = _.bind(func, any, 42, ''); + result = _.bind(func, any, 42, ''); } { @@ -6253,7 +6472,7 @@ namespace TestBind { let result: _.LoDashImplicitObjectWrapper; - result = _(func).bind(any); + result = _(func).bind(any); } { @@ -6261,7 +6480,7 @@ namespace TestBind { let result: _.LoDashImplicitObjectWrapper; - result = _(func).bind(any, 42); + result = _(func).bind(any, 42); } { @@ -6269,7 +6488,7 @@ namespace TestBind { let result: _.LoDashImplicitObjectWrapper; - result = _(func).bind(any, 42, ''); + result = _(func).bind(any, 42, ''); } { @@ -6277,23 +6496,23 @@ namespace TestBind { let result: _.LoDashExplicitObjectWrapper; - result = _(func).chain().bind(any); + result = _(func).chain().bind(any); } { type SampleResult = (b: string) => boolean; - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper; - result = _(func).chain().bind(any, 42); + result = _(func).chain().bind(any, 42); } { type SampleResult = () => boolean; - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper; - result = _(func).chain().bind(any, 42, ''); + result = _(func).chain().bind(any, 42, ''); } } @@ -6346,8 +6565,7 @@ namespace TestBindKey { let result: SampleResult; - result = _.bindKey(object, 'foo'); - result = _.bindKey(object, 'foo'); + result = _.bindKey(object, 'foo'); } { @@ -6355,8 +6573,7 @@ namespace TestBindKey { let result: SampleResult; - result = _.bindKey(object, 'foo', 42); - result = _.bindKey(object, 'foo', 42); + result = _.bindKey(object, 'foo', 42); } { @@ -6364,8 +6581,7 @@ namespace TestBindKey { let result: SampleResult; - result = _.bindKey(object, 'foo', 42, ''); - result = _.bindKey(object, 'foo', 42, ''); + result = _.bindKey(object, 'foo', 42, ''); } { @@ -6373,7 +6589,7 @@ namespace TestBindKey { let result: _.LoDashImplicitObjectWrapper; - result = _(object).bindKey('foo'); + result = _(object).bindKey('foo'); } { @@ -6381,7 +6597,7 @@ namespace TestBindKey { let result: _.LoDashImplicitObjectWrapper; - result = _(object).bindKey('foo', 42); + result = _(object).bindKey('foo', 42); } { @@ -6389,7 +6605,7 @@ namespace TestBindKey { let result: _.LoDashImplicitObjectWrapper; - result = _(object).bindKey('foo', 42, ''); + result = _(object).bindKey('foo', 42, ''); } { @@ -6397,7 +6613,7 @@ namespace TestBindKey { let result: _.LoDashExplicitObjectWrapper; - result = _(object).chain().bindKey('foo'); + result = _(object).chain().bindKey('foo'); } { @@ -6405,7 +6621,7 @@ namespace TestBindKey { let result: _.LoDashExplicitObjectWrapper; - result = _(object).chain().bindKey('foo', 42); + result = _(object).chain().bindKey('foo', 42); } { @@ -6413,16 +6629,10 @@ namespace TestBindKey { let result: _.LoDashExplicitObjectWrapper; - result = _(object).chain().bindKey('foo', 42, ''); + result = _(object).chain().bindKey('foo', 42, ''); } } -const createCallbackObj: { [index: string]: string; } = { name: 'Joe' }; -result = <() => any>_.createCallback('name'); -result = <() => boolean>_.createCallback(createCallbackObj); -result = <_.LoDashImplicitObjectWrapper<() => any>>_('name').createCallback(); -result = <_.LoDashImplicitObjectWrapper<() => boolean>>_(createCallbackObj).createCallback(); - // _.curry const testCurryFn = (a: number, b: number, c: number) => [a, b, c]; let curryResult0: number[] @@ -6527,10 +6737,10 @@ namespace TestDefer { { let result: number; - result = _.defer(func); - result = _.defer(func, any); - result = _.defer(func, any, any); - result = _.defer(func, any, any, any); + result = _.defer(func); + result = _.defer(func, any); + result = _.defer(func, any, any); + result = _.defer(func, any, any, any); } { @@ -6561,9 +6771,9 @@ namespace TestDelay { { let result: number; - result = _.delay(func, 1); - result = _.delay(func, 1, 2); - result = _.delay(func, 1, 2, ''); + result = _.delay(func, 1); + result = _.delay(func, 1, 2); + result = _.delay(func, 1, 2, ''); } { @@ -6628,34 +6838,34 @@ namespace TestFlow { result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1); result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1, Fn1); result = _.flow(Fn2, Fn1, Fn3, Fn4); - result = _.flow<(m: number, n: number) => number>([Fn2, Fn1, Fn3, Fn4]); + result = _.flow([Fn2, Fn1, Fn3, Fn4]); } { let result: (m: number, n: number) => number; - result = _.flow<(m: number, n: number) => number>(Fn1, Fn2); - result = _.flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _.flow<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2); - result = _.flow<(m: number, n: number) => number>([Fn1, Fn1, Fn1, Fn2]); + result = _.flow(Fn1, Fn2); + result = _.flow(Fn1, Fn1, Fn2); + result = _.flow(Fn1, Fn1, Fn1, Fn2); + result = _.flow([Fn1, Fn1, Fn1, Fn2]); } { let result: _.LoDashImplicitObjectWrapper<(m: number, n: number) => number>; - result = _(Fn1).flow<(m: number, n: number) => number>(Fn2); - result = _(Fn1).flow<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _(Fn1).flow<(m: number, n: number) => number>([Fn1, Fn1, Fn2]); + result = _(Fn1).flow(Fn2); + result = _(Fn1).flow(Fn1, Fn2); + result = _(Fn1).flow(Fn1, Fn1, Fn2); + result = _(Fn1).flow([Fn1, Fn1, Fn2]); } { let result: _.LoDashExplicitObjectWrapper<(m: number, n: number) => number>; - result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn2); - result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _(Fn1).chain().flow<(m: number, n: number) => number>([Fn1, Fn1, Fn2]); + result = _(Fn1).chain().flow(Fn2); + result = _(Fn1).chain().flow(Fn1, Fn2); + result = _(Fn1).chain().flow(Fn1, Fn1, Fn2); + result = _(Fn1).chain().flow([Fn1, Fn1, Fn2]); } } @@ -6667,28 +6877,28 @@ namespace TestFlowRight { { let result: (m: number, n: number) => number; - result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn2); - result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2); - result = _.flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn1, Fn2]); + result = _.flowRight(Fn1, Fn2); + result = _.flowRight(Fn1, Fn1, Fn2); + result = _.flowRight(Fn1, Fn1, Fn1, Fn2); + result = _.flowRight([Fn1, Fn1, Fn1, Fn2]); } { let result: _.LoDashImplicitObjectWrapper<(m: number, n: number) => number>; - result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn2); - result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _(Fn1).flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn2]); + result = _(Fn1).flowRight(Fn2); + result = _(Fn1).flowRight(Fn1, Fn2); + result = _(Fn1).flowRight(Fn1, Fn1, Fn2); + result = _(Fn1).flowRight([Fn1, Fn1, Fn2]); } { let result: _.LoDashExplicitObjectWrapper<(m: number, n: number) => number>; - result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn2); - result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn1, Fn2); - result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2); - result = _(Fn1).chain().flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn2]); + result = _(Fn1).chain().flowRight(Fn2); + result = _(Fn1).chain().flowRight(Fn1, Fn2); + result = _(Fn1).chain().flowRight(Fn1, Fn1, Fn2); + result = _(Fn1).chain().flowRight([Fn1, Fn1, Fn2]); } } @@ -6763,43 +6973,43 @@ namespace TestOverArgs { { let result: (a: string) => boolean; - result = _.overArgs boolean>(func1, transform1); - result = _.overArgs boolean>(func1, [transform1]); + result = _.overArgs(func1, transform1); + result = _.overArgs(func1, [transform1]); } { let result: (a: string, b: number) => boolean; - result = _.overArgs boolean>(func2, transform1, transform2); - result = _.overArgs boolean>(func2, [transform1, transform2]); + result = _.overArgs(func2, transform1, transform2); + result = _.overArgs(func2, [transform1, transform2]); } { let result: _.LoDashImplicitObjectWrapper<(a: string) => boolean>; - result = _(func1).overArgs<(a: string) => boolean>(transform1); - result = _(func1).overArgs<(a: string) => boolean>([transform1]); + result = _(func1).overArgs(transform1); + result = _(func1).overArgs([transform1]); } { let result: _.LoDashImplicitObjectWrapper<(a: string, b: number) => boolean>; - result = _(func2).overArgs<(a: string, b: number) => boolean>(transform1, transform2); - result = _(func2).overArgs<(a: string, b: number) => boolean>([transform1, transform2]); + result = _(func2).overArgs(transform1, transform2); + result = _(func2).overArgs([transform1, transform2]); } { let result: _.LoDashExplicitObjectWrapper<(a: string) => boolean>; - result = _(func1).chain().overArgs<(a: string) => boolean>(transform1); - result = _(func1).chain().overArgs<(a: string) => boolean>([transform1]); + result = _(func1).chain().overArgs(transform1); + result = _(func1).chain().overArgs([transform1]); } { let result: _.LoDashExplicitObjectWrapper<(a: string, b: number) => boolean>; - result = _(func2).chain().overArgs<(a: string, b: number) => boolean>(transform1, transform2); - result = _(func2).chain().overArgs<(a: string, b: number) => boolean>([transform1, transform2]); + result = _(func2).chain().overArgs(transform1, transform2); + result = _(func2).chain().overArgs([transform1, transform2]); } } @@ -6819,21 +7029,18 @@ namespace TestNegate { let result: ResultFn; result = _.negate(predicate); - result = _.negate(predicate); } { let result: _.LoDashImplicitObjectWrapper; result = _(predicate).negate(); - result = _(predicate).negate(); } { let result: _.LoDashExplicitObjectWrapper; result = _(predicate).chain().negate(); - result = _(predicate).chain().negate(); } } @@ -6882,10 +7089,10 @@ const testReargFn = (a: string, b: string, c: string) => [a, b, c]; interface TestReargResultFn { (b: string, c: string, a: string): string[]; } -result = (_.rearg(testReargFn, 2, 0, 1))('b', 'c', 'a'); -result = (_.rearg(testReargFn, [2, 0, 1]))('b', 'c', 'a'); -result = (_(testReargFn).rearg(2, 0, 1).value())('b', 'c', 'a'); -result = (_(testReargFn).rearg([2, 0, 1]).value())('b', 'c', 'a'); +result = (_.rearg(testReargFn, 2, 0, 1))('b', 'c', 'a'); +result = (_.rearg(testReargFn, [2, 0, 1]))('b', 'c', 'a'); +result = (_(testReargFn).rearg(2, 0, 1).value())('b', 'c', 'a'); +result = (_(testReargFn).rearg([2, 0, 1]).value())('b', 'c', 'a'); // _.rest namespace TestRest { @@ -6897,25 +7104,22 @@ namespace TestRest { { let result: ResultFunc; - result = _.rest(func); - result = _.rest(func, 1); - - result = _.rest(func); - result = _.rest(func, 1); + result = _.rest(func); + result = _.rest(func, 1); } { let result: _.LoDashImplicitObjectWrapper; - result = _(func).rest(); - result = _(func).rest(1); + result = _(func).rest(); + result = _(func).rest(1); } { let result: _.LoDashExplicitObjectWrapper; - result = _(func).chain().rest(); - result = _(func).chain().rest(1); + result = _(func).chain().rest(); + result = _(func).chain().rest(1); } } @@ -6929,20 +7133,19 @@ namespace TestSpread { { let result: SampleResult; - result = _.spread(func); - result = _.spread(func); + result = _.spread(func); } { let result: _.LoDashImplicitObjectWrapper; - result = _(func).spread(); + result = _(func).spread(); } { let result: _.LoDashExplicitObjectWrapper; - result = _(func).chain().spread(); + result = _(func).chain().spread(); } } @@ -7030,9 +7233,7 @@ namespace TestWrap { let wrapper: SampleWrapper = (a, b, c) => true; let result: SampleResult; - result = _.wrap(value, wrapper); - result = _.wrap(value, wrapper); - result = _.wrap(value, wrapper); + result = _.wrap(value, wrapper); } { @@ -7042,8 +7243,7 @@ namespace TestWrap { let wrapper: SampleWrapper = (a, b, c) => true; let result: _.LoDashImplicitObjectWrapper; - result = _(value).wrap(wrapper); - result = _(value).wrap(wrapper); + result = _(value).wrap(wrapper); } { @@ -7053,8 +7253,7 @@ namespace TestWrap { let wrapper: SampleWrapper = (a, b, c) => true; let result: _.LoDashImplicitObjectWrapper; - result = _(value).wrap(wrapper); - result = _(value).wrap(wrapper); + result = _(value).wrap(wrapper); } { @@ -7064,8 +7263,7 @@ namespace TestWrap { let wrapper: SampleWrapper = (a, b, c) => true; let result: _.LoDashImplicitObjectWrapper; - result = _(value).wrap(wrapper); - result = _(value).wrap(wrapper); + result = _(value).wrap(wrapper); } { @@ -7075,8 +7273,7 @@ namespace TestWrap { let wrapper: SampleWrapper = (a, b, c) => true; let result: _.LoDashExplicitObjectWrapper; - result = _(value).chain().wrap(wrapper); - result = _(value).chain().wrap(wrapper); + result = _(value).chain().wrap(wrapper); } { @@ -7086,8 +7283,7 @@ namespace TestWrap { let wrapper: SampleWrapper = (a, b, c) => true; let result: _.LoDashExplicitObjectWrapper; - result = _(value).chain().wrap(wrapper); - result = _(value).chain().wrap(wrapper); + result = _(value).chain().wrap(wrapper); } { @@ -7097,8 +7293,7 @@ namespace TestWrap { let wrapper: SampleWrapper = (a, b, c) => true; let result: _.LoDashExplicitObjectWrapper; - result = _(value).chain().wrap(wrapper); - result = _(value).chain().wrap(wrapper); + result = _(value).chain().wrap(wrapper); } } @@ -7160,7 +7355,7 @@ namespace TestClone { let result: string[]; result = _.clone(['']); - result = _(['']).clone(); + result = _(['']).clone(); } { @@ -7202,7 +7397,7 @@ namespace TestCloneDeep { let result: string[]; result = _.cloneDeep(['']); - result = _(['']).cloneDeep(); + result = _(['']).cloneDeep(); } { @@ -7235,48 +7430,45 @@ namespace TestCloneDeepWith { let customizer: CloneDeepWithCustomizer = (x) => ""; let reslut: string; - result = _.cloneDeepWith(42, customizer); - result = _.cloneDeepWith(42, customizer); - result = _(42).cloneDeepWith(customizer); + result = _.cloneDeepWith(42, customizer); + result = _(42).cloneDeepWith(customizer); } { let customizer: CloneDeepWithCustomizer = (x) => ""; let result: _.LoDashExplicitWrapper; - result = _(42).chain().cloneDeepWith(customizer); + result = _(42).chain().cloneDeepWith(customizer); } { let customizer: CloneDeepWithCustomizer = (x) => []; let reslut: string[]; - result = _.cloneDeepWith([42], customizer); - result = _.cloneDeepWith([42], customizer); - result = _([42]).cloneDeepWith(customizer); + result = _.cloneDeepWith([42], customizer); + result = _([42]).cloneDeepWith(customizer); } { let customizer: CloneDeepWithCustomizer = (x) => []; let result: _.LoDashExplicitArrayWrapper; - result = _([42]).chain().cloneDeepWith(customizer); + result = _([42]).chain().cloneDeepWith(customizer); } { let customizer: CloneDeepWithCustomizer<{a: {b: number;};}, {a: {b: string;};}> = (x) => ({ a: { b: "" } }); let reslut: {a: {b: string;};}; - result = _.cloneDeepWith<{a: {b: string;};}>({a: {b: 42}}, customizer); - result = _.cloneDeepWith<{a: {b: number;};}, {a: {b: string;};}>({a: {b: 42}}, customizer); - result = _({a: {b: 42}}).cloneDeepWith<{a: {b: string;};}>(customizer); + result = _.cloneDeepWith({a: {b: 42}}, customizer); + result = _({a: {b: 42}}).cloneDeepWith(customizer); } { let customizer: CloneDeepWithCustomizer<{a: {b: number;};}, {a: {b: string;};}> = (x) => ({ a: { b: "" } }); let result: _.LoDashExplicitObjectWrapper<{a: {b: string;};}>; - result = _({a: {b: 42}}).chain().cloneDeepWith<{a: {b: string;};}>(customizer); + result = _({a: {b: 42}}).chain().cloneDeepWith(customizer); } } @@ -7290,7 +7482,7 @@ namespace TestCloneWith { let customizer: CloneWithCustomizer = (x) => ""; let reslut: string; - result = _.cloneWith(42, customizer); + result = _.cloneWith(42, customizer); result = _.cloneWith(42, customizer); result = _(42).cloneWith(customizer); } @@ -7306,7 +7498,7 @@ namespace TestCloneWith { let customizer: CloneWithCustomizer = (x) => []; let reslut: string[]; - result = _.cloneWith([42], customizer); + result = _.cloneWith([42], customizer); result = _.cloneWith([42], customizer); result = _([42]).cloneWith(customizer); } @@ -7315,14 +7507,14 @@ namespace TestCloneWith { let customizer: CloneWithCustomizer = (x) => []; let result: _.LoDashExplicitArrayWrapper; - result = _([42]).chain().cloneWith(customizer); + result = _([42]).chain().cloneWith(customizer); } { let customizer: CloneWithCustomizer<{a: {b: number;};}, {a: {b: string;};}> = (x) => ({ a: { b: "" } }); let reslut: {a: {b: string;};}; - result = _.cloneWith<{a: {b: string;};}>({a: {b: 42}}, customizer); + result = _.cloneWith({a: {b: 42}}, customizer); result = _.cloneWith<{a: {b: number;};}, {a: {b: string;};}>({a: {b: 42}}, customizer); result = _({a: {b: 42}}).cloneWith<{a: {b: string;};}>(customizer); } @@ -7503,14 +7695,13 @@ namespace TestIsArrayBuffer { namespace TestIsArrayLike { { let value: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] - | number | Function | { length: string } | { a: string } + | number | { length: string } | { a: string } | null | undefined = any; if (_.isArrayLike(value)) { let result: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; - } - else { - let result: number | Function | { length: string } | { a: string; } = value; + } else { + let result: number | { length: string } | { a: string; } | null | undefined = value; } } @@ -7530,8 +7721,7 @@ namespace TestIsArrayLike { if (_.isArrayLike(value)) { value; // $ExpectType never - } - else { + } else { value; // $ExpectType Function } } @@ -7580,14 +7770,13 @@ namespace TestIsArrayLike { namespace TestIsArrayLikeObject { { let value: string[] | { [index: number]: boolean, length: number } | [number, boolean] - | number | string | Function | { length: string } | { a: string } + | number | string | { length: string } | { a: string } | null | undefined = any; if (_.isArrayLikeObject(value)) { let result: string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; - } - else { - let result: string | number | Function | { length: string; } | { a: string; } = value; + } else { + let result: string | number | { length: string; } | { a: string; } | null | undefined = value; } } @@ -7607,8 +7796,7 @@ namespace TestIsArrayLikeObject { if (_.isArrayLikeObject(value)) { value; // $ExpectType never - } - else { + } else { value; // $ExpectType string | Function } } @@ -7963,7 +8151,7 @@ namespace TestIsMap { { let value: number|Map = 0; - if (_.isMap(value)) { + if (_.isMap(value)) { let result: Map = value; } else { @@ -8253,7 +8441,7 @@ namespace TestIsSet { { let value: number|Set = 0; - if (_.isSet(value)) { + if (_.isSet(value)) { let result: Set = value; } else { @@ -8375,7 +8563,7 @@ namespace TestIsWeakMap { let value: number|WeakMap = 0; - if (_.isWeakMap(value)) { + if (_.isWeakMap(value)) { let result: WeakMap = value; } else { @@ -8531,23 +8719,23 @@ namespace TestToArray { namespace TestToPlainObject { { let result: TResult; - result = _.toPlainObject(); - result = _.toPlainObject(true); - result = _.toPlainObject(1); - result = _.toPlainObject('a'); - result = _.toPlainObject([]); - result = _.toPlainObject({}); + result = _.toPlainObject(); + result = _.toPlainObject(true); + result = _.toPlainObject(1); + result = _.toPlainObject('a'); + result = _.toPlainObject([]); + result = _.toPlainObject({}); } { let result: _.LoDashImplicitObjectWrapper; - result = _(true).toPlainObject(); - result = _(1).toPlainObject(); - result = _('a').toPlainObject(); - result = _([1]).toPlainObject(); - result = _([]).toPlainObject(); - result = _({}).toPlainObject(); + result = _(true).toPlainObject(); + result = _(1).toPlainObject(); + result = _('a').toPlainObject(); + result = _([1]).toPlainObject(); + result = _(['']).toPlainObject(); + result = _({}).toPlainObject(); } } @@ -8563,13 +8751,13 @@ namespace TestToFinite { } { - let result: _.LoDashImplicitWrapper; + let result: number; result = _(true).toFinite(); result = _(1).toFinite(); result = _('3.2').toFinite(); result = _([1]).toFinite(); - result = _([]).toFinite(); + result = _([]).toFinite(); result = _({}).toFinite(); } } @@ -8586,13 +8774,13 @@ namespace TestToInteger { } { - let result: _.LoDashImplicitWrapper; + let result: number; result = _(true).toInteger(); result = _(1).toInteger(); result = _('a').toInteger(); result = _([1]).toInteger(); - result = _([]).toInteger(); + result = _(['']).toInteger(); result = _({}).toInteger(); } } @@ -8609,13 +8797,13 @@ namespace TestToLength { } { - let result: _.LoDashImplicitWrapper; + let result: number; result = _(true).toLength(); result = _(1).toLength(); result = _('a').toLength(); result = _([1]).toLength(); - result = _([]).toLength(); + result = _(['']).toLength(); result = _({}).toLength(); } } @@ -8632,13 +8820,13 @@ namespace TestToNumber { } { - let result: _.LoDashImplicitWrapper; + let result: number; result = _(true).toNumber(); result = _(1).toNumber(); result = _('a').toNumber(); result = _([1]).toNumber(); - result = _([]).toNumber(); + result = _(['']).toNumber(); result = _({}).toNumber(); } } @@ -8655,13 +8843,13 @@ namespace TestToSafeInteger { } { - let result: _.LoDashImplicitWrapper; + let result: number; result = _(true).toSafeInteger(); result = _(1).toSafeInteger(); result = _('a').toSafeInteger(); result = _([1]).toSafeInteger(); - result = _([]).toSafeInteger(); + result = _(['']).toSafeInteger(); result = _({}).toSafeInteger(); } } @@ -8764,42 +8952,33 @@ namespace TestMax { namespace TestMaxBy { let array: number[] = []; let list: _.List = []; - let dictionary: _.Dictionary = {}; + let array2: TResult[] = []; + let list2: _.List = []; let listIterator = (value: number, index: number, collection: _.List) => 0; - let dictionaryIterator = (value: number, key: string, collection: _.Dictionary) => 0; let result: number | undefined; + let result2: TResult | undefined; result = _.maxBy(array); result = _.maxBy(array, listIterator); result = _.maxBy(array, ''); - result = _.maxBy<{a: number}, number>(array, {a: 42}); + result2 = _.maxBy(array2, {a: 42}); result = _.maxBy(list); result = _.maxBy(list, listIterator); result = _.maxBy(list, ''); - result = _.maxBy<{a: number}, number>(list, {a: 42}); - - result = _.maxBy(dictionary); - result = _.maxBy(dictionary, dictionaryIterator); - result = _.maxBy(dictionary, ''); - result = _.maxBy<{a: number}, number>(dictionary, {a: 42}); + result2 = _.maxBy(list2, {a: 42}); result = _(array).maxBy(); result = _(array).maxBy(listIterator); result = _(array).maxBy(''); - result = _(array).maxBy<{a: number}>({a: 42}); + result2 = _(array2).maxBy({a: 42}); result = _(list).maxBy(); result = _(list).maxBy(listIterator); result = _(list).maxBy(''); - result = _(list).maxBy<{a: number}, number>({a: 42}); - - result = _(dictionary).maxBy(); - result = _(dictionary).maxBy(dictionaryIterator); - result = _(dictionary).maxBy(''); - result = _(dictionary).maxBy<{a: number}, number>({a: 42}); + result2 = _(list2).maxBy({a: 42}); } // _.mean @@ -8809,7 +8988,6 @@ namespace TestMean { let result: number; result = _.mean(array); - result = _.mean(array); result = _(array).mean(); } @@ -8844,42 +9022,33 @@ namespace TestMin { namespace TestMinBy { let array: number[] = []; let list: _.List = []; - let dictionary: _.Dictionary = {}; + let array2: TResult[] = []; + let list2: _.List = []; let listIterator = (value: number, index: number, collection: _.List) => 0; - let dictionaryIterator = (value: number, key: string, collection: _.Dictionary) => 0; let result: number | undefined; + let result2: TResult | undefined; result = _.minBy(array); result = _.minBy(array, listIterator); result = _.minBy(array, ''); - result = _.minBy<{a: number}, number>(array, {a: 42}); + result2 = _.minBy(array2, {a: 42}); result = _.minBy(list); result = _.minBy(list, listIterator); result = _.minBy(list, ''); - result = _.minBy<{a: number}, number>(list, {a: 42}); - - result = _.minBy(dictionary); - result = _.minBy(dictionary, dictionaryIterator); - result = _.minBy(dictionary, ''); - result = _.minBy<{a: number}, number>(dictionary, {a: 42}); + result2 = _.minBy(list2, {a: 42}); result = _(array).minBy(); result = _(array).minBy(listIterator); result = _(array).minBy(''); - result = _(array).minBy<{a: number}>({a: 42}); + result2 = _(array2).minBy({a: 42}); result = _(list).minBy(); result = _(list).minBy(listIterator); result = _(list).minBy(''); - result = _(list).minBy<{a: number}, number>({a: 42}); - - result = _(dictionary).minBy(); - result = _(dictionary).minBy(dictionaryIterator); - result = _(dictionary).minBy(''); - result = _(dictionary).minBy<{a: number}, number>({a: 42}); + result2 = _(list2).minBy({a: 42}); } // _.multiply @@ -8933,10 +9102,8 @@ namespace TestSum { let result: number; result = _.sum(array); - result = _.sum(array); result = _.sum(list); - result = _.sum(list); result = _(array).sum(); @@ -8964,7 +9131,7 @@ namespace TestSumBy { let list: _.List | null | undefined = [] as any; let objectList: _.List<{ 'age': number }> | null | undefined = [] as any; - let listIterator = (value: number, index: number, collection: _.List) => 0; + let listIterator = (value: number) => 0; { let result: number; @@ -8972,17 +9139,15 @@ namespace TestSumBy { result = _.sumBy(array); result = _.sumBy(array, listIterator); result = _.sumBy(objectArray, 'age'); - result = _.sumBy(objectArray, { 'age': 30 }); result = _.sumBy(list); result = _.sumBy(list, listIterator); result = _.sumBy(objectList, 'age'); - result = _.sumBy(objectList, { 'age': 30 }); result = _(array).sumBy(listIterator); result = _(objectArray).sumBy('age'); - result = _(list).sumBy((value: _.List | null | undefined, index: number, collection: _.List<_.List | null | undefined>) => 0); + result = _(list).sumBy(listIterator); result = _(objectList).sumBy('age'); } @@ -8992,7 +9157,7 @@ namespace TestSumBy { result = _(array).chain().sumBy(listIterator); result = _(objectArray).chain().sumBy('age'); - result = _(list).chain().sumBy((value: _.List | null | undefined, index: number, collection: _.List<_.List | null | undefined>) => 0); + result = _(list).chain().sumBy(listIterator); result = _(objectList).chain().sumBy('age'); } } @@ -9138,7 +9303,7 @@ namespace TestAssign { { let result: { a: number, b: number, c: number, d: number, e: number }; - result = _.assign<{ a: number, b: number, c: number, d: number, e: number }>(obj, s1, s2, s3, s4, s5); + result = _.assign(obj, s1, s2, s3, s4, s5); } { @@ -9174,7 +9339,7 @@ namespace TestAssign { { let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).assign<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); + result = _(obj).assign(s1, s2, s3, s4, s5); } { @@ -9210,7 +9375,7 @@ namespace TestAssign { { let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().assign<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); + result = _(obj).chain().assign(s1, s2, s3, s4, s5); } } @@ -9322,7 +9487,7 @@ namespace TestAssignWith { { let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().assignWith<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5, customizer); + result = _(obj).chain().assignWith(s1, s2, s3, s4, s5, customizer); } } @@ -9449,7 +9614,7 @@ namespace TestAssignIn { { let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().assignIn<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); + result = _(obj).chain().assignIn(s1, s2, s3, s4, s5); } } @@ -9561,7 +9726,7 @@ namespace TestAssignInWith { { let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().assignInWith<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5, customizer); + result = _(obj).chain().assignInWith(s1, s2, s3, s4, s5, customizer); } } @@ -9644,7 +9809,7 @@ namespace TestDefaults { { let result: { a: string, b: number, c: number, d: number, e: number }; - result = _.defaults<{ a: string, b: number, c: number, d: number, e: number }>(obj, s1, s2, s3, s4, s5); + result = _.defaults(obj, s1, s2, s3, s4, s5); } { @@ -9680,7 +9845,7 @@ namespace TestDefaults { { let result: _.LoDashImplicitObjectWrapper<{ a: string, b: number, c: number, d: number, e: number }>; - result = _(obj).defaults<{ a: string, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); + result = _(obj).defaults(s1, s2, s3, s4, s5); } { @@ -9716,7 +9881,7 @@ namespace TestDefaults { { let result: _.LoDashExplicitObjectWrapper<{ a: string, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().defaults<{ a: string, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); + result = _(obj).chain().defaults(s1, s2, s3, s4, s5); } } @@ -9730,45 +9895,27 @@ interface DefaultsDeepResult { const TestDefaultsDeepObject = { 'user': { 'name': 'barney' } }; const TestDefaultsDeepSource = { 'user': { 'name': 'fred', 'age': 36 } }; result = _.defaultsDeep(TestDefaultsDeepObject, TestDefaultsDeepSource); -result = _(TestDefaultsDeepObject).defaultsDeep(TestDefaultsDeepSource).value(); +result = _(TestDefaultsDeepObject).defaultsDeep(TestDefaultsDeepSource).value(); // _.entries namespace TestEntries { let object: _.Dictionary = {}; - { - let result: [string, any][]; - - result = _.entries<_.Dictionary>(object); - } - { let result: [string, string][]; - result = _.entries<_.Dictionary, string>(object); + result = _.entries(object); } { let result: _.LoDashImplicitArrayWrapper<[string, string]>; - result = _(object).entries(); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, any]>; - result = _(object).entries(); } { let result: _.LoDashExplicitArrayWrapper<[string, string]>; - result = _(object).chain().entries(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, any]>; - result = _(object).chain().entries(); } } @@ -9777,27 +9924,15 @@ namespace TestEntries { namespace TestEntriesIn { let object: _.Dictionary = {}; - { - let result: [string, any][]; - - result = _.entriesIn<_.Dictionary>(object); - } - { let result: [string, string][]; - result = _.entriesIn<_.Dictionary, string>(object); + result = _.entriesIn(object); } { let result: _.LoDashImplicitArrayWrapper<[string, string]>; - result = _(object).entriesIn(); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, any]>; - result = _(object).entriesIn(); } @@ -9901,7 +10036,7 @@ namespace TestExtend { { let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).extend<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); + result = _(obj).extend(s1, s2, s3, s4, s5); } { @@ -9937,7 +10072,7 @@ namespace TestExtend { { let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().extend<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); + result = _(obj).chain().extend(s1, s2, s3, s4, s5); } } @@ -10028,7 +10163,7 @@ namespace TestExtendWith { { let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).extendWith<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5, customizer); + result = _(obj).extendWith(s1, s2, s3, s4, s5, customizer); } { @@ -10064,7 +10199,7 @@ namespace TestExtendWith { { let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().extendWith<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5, customizer); + result = _(obj).chain().extendWith(s1, s2, s3, s4, s5, customizer); } } @@ -10081,7 +10216,7 @@ namespace TestFindKey { result = _.findKey<{a: string;}>({a: ''}, ''); - result = _.findKey<{a: number;}, {a: string;}>({a: ''}, {a: 42}); + result = _.findKey({a: { b: 5 }}, {b: 42}); result = _.findKey({a: { b: 5 }}, ['b', 5]); @@ -10091,16 +10226,16 @@ namespace TestFindKey { result = _<{a: string;}>({a: ''}).findKey(''); - result = _<{a: string;}>({a: ''}).findKey<{a: number;}>({a: 42}); + result = _({a: { b: 5 }}).findKey({b: 42}); } { let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; let result: string | undefined; - result = _.findKey({a: ''}, predicateFn); + result = _.findKey({a: ''}, predicateFn); - result = _<{a: string;}>({a: ''}).findKey(predicateFn); + result = _({a: ''}).findKey(predicateFn); } { @@ -10113,14 +10248,14 @@ namespace TestFindKey { result = _<{a: string;}>({a: ''}).chain().findKey(''); - result = _<{a: string;}>({a: ''}).chain().findKey<{a: number;}>({a: 42}); + result = _({a: { b: 5 }}).chain().findKey({b: 42}); } { let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; let result: _.LoDashExplicitWrapper; - result = _<{a: string;}>({a: ''}).chain().findKey(predicateFn); + result = _({a: ''}).chain().findKey(predicateFn); } } @@ -10136,7 +10271,7 @@ namespace TestFindLastKey { result = _.findLastKey<{a: string;}>({a: ''}, ''); - result = _.findLastKey<{a: number;}, {a: string;}>({a: ''}, {a: 42}); + result = _.findLastKey({a: { b: 5 }}, {b: 42}); result = _.findLastKey({a: { b: 5 }}, ['b', 5]); @@ -10146,16 +10281,16 @@ namespace TestFindLastKey { result = _<{a: string;}>({a: ''}).findLastKey(''); - result = _<{a: string;}>({a: ''}).findLastKey<{a: number;}>({a: 42}); + result = _({a: { b: 5 }}).findLastKey({b: 42}); } { let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; let result: string | undefined; - result = _.findLastKey({a: ''}, predicateFn); + result = _.findLastKey({a: ''}, predicateFn); - result = _<{a: string;}>({a: ''}).findLastKey(predicateFn); + result = _({a: ''}).findLastKey(predicateFn); } { @@ -10168,14 +10303,14 @@ namespace TestFindLastKey { result = _<{a: string;}>({a: ''}).chain().findLastKey(''); - result = _<{a: string;}>({a: ''}).chain().findLastKey<{a: number;}>({a: 42}); + result = _({a: { b: 5 }}).chain().findLastKey({b: 42}); } { let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; let result: _.LoDashExplicitWrapper; - result = _<{a: string;}>({a: ''}).chain().findLastKey(predicateFn); + result = _({a: ''}).chain().findLastKey(predicateFn); } } @@ -10194,15 +10329,15 @@ namespace TestForIn { { let result: _.Dictionary; - result = _.forIn(dictionary); - result = _.forIn(dictionary, dictionaryIterator); + result = _.forIn(dictionary); + result = _.forIn(dictionary, dictionaryIterator); } { let result: _.Dictionary | null | undefined; - result = _.forIn(nilDictionary); - result = _.forIn(nilDictionary, dictionaryIterator); + result = _.forIn(nilDictionary); + result = _.forIn(nilDictionary, dictionaryIterator); } { @@ -10222,29 +10357,29 @@ namespace TestForIn { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).forIn(); - result = _(dictionary).forIn(dictionaryIterator); + result = _(dictionary).forIn(); + result = _(dictionary).forIn(dictionaryIterator); } { let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).forIn(); - result = _(nilDictionary).forIn(dictionaryIterator); + result = _(nilDictionary).forIn(); + result = _(nilDictionary).forIn(dictionaryIterator); } { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().forIn(); - result = _(dictionary).chain().forIn(dictionaryIterator); + result = _(dictionary).chain().forIn(); + result = _(dictionary).chain().forIn(dictionaryIterator); } { let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).chain().forIn(); - result = _(nilDictionary).chain().forIn(dictionaryIterator); + result = _(nilDictionary).chain().forIn(); + result = _(nilDictionary).chain().forIn(dictionaryIterator); } } @@ -10263,15 +10398,15 @@ namespace TestForInRight { { let result: _.Dictionary; - result = _.forInRight(dictionary); - result = _.forInRight(dictionary, dictionaryIterator); + result = _.forInRight(dictionary); + result = _.forInRight(dictionary, dictionaryIterator); } { let result: _.Dictionary | null | undefined; - result = _.forInRight(nilDictionary); - result = _.forInRight(nilDictionary, dictionaryIterator); + result = _.forInRight(nilDictionary); + result = _.forInRight(nilDictionary, dictionaryIterator); } { @@ -10291,29 +10426,29 @@ namespace TestForInRight { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).forInRight(); - result = _(dictionary).forInRight(dictionaryIterator); + result = _(dictionary).forInRight(); + result = _(dictionary).forInRight(dictionaryIterator); } { let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).forInRight(); - result = _(nilDictionary).forInRight(dictionaryIterator); + result = _(nilDictionary).forInRight(); + result = _(nilDictionary).forInRight(dictionaryIterator); } { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().forInRight(); - result = _(dictionary).chain().forInRight(dictionaryIterator); + result = _(dictionary).chain().forInRight(); + result = _(dictionary).chain().forInRight(dictionaryIterator); } { let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).chain().forInRight(); - result = _(nilDictionary).chain().forInRight(dictionaryIterator); + result = _(nilDictionary).chain().forInRight(); + result = _(nilDictionary).chain().forInRight(dictionaryIterator); } } @@ -10332,15 +10467,15 @@ namespace TestForOwn { { let result: _.Dictionary; - result = _.forOwn(dictionary); - result = _.forOwn(dictionary, dictionaryIterator); + result = _.forOwn(dictionary); + result = _.forOwn(dictionary, dictionaryIterator); } { let result: _.Dictionary | null | undefined; - result = _.forOwn(nilDictionary); - result = _.forOwn(nilDictionary, dictionaryIterator); + result = _.forOwn(nilDictionary); + result = _.forOwn(nilDictionary, dictionaryIterator); } { @@ -10360,29 +10495,29 @@ namespace TestForOwn { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).forOwn(); - result = _(dictionary).forOwn(dictionaryIterator); + result = _(dictionary).forOwn(); + result = _(dictionary).forOwn(dictionaryIterator); } { let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).forOwn(); - result = _(nilDictionary).forOwn(dictionaryIterator); + result = _(nilDictionary).forOwn(); + result = _(nilDictionary).forOwn(dictionaryIterator); } { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().forOwn(); - result = _(dictionary).chain().forOwn(dictionaryIterator); + result = _(dictionary).chain().forOwn(); + result = _(dictionary).chain().forOwn(dictionaryIterator); } { let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).chain().forOwn(); - result = _(nilDictionary).chain().forOwn(dictionaryIterator); + result = _(nilDictionary).chain().forOwn(); + result = _(nilDictionary).chain().forOwn(dictionaryIterator); } } @@ -10401,15 +10536,15 @@ namespace TestForOwnRight { { let result: _.Dictionary; - result = _.forOwnRight(dictionary); - result = _.forOwnRight(dictionary, dictionaryIterator); + result = _.forOwnRight(dictionary); + result = _.forOwnRight(dictionary, dictionaryIterator); } { let result: _.Dictionary | null | undefined; - result = _.forOwnRight(nilDictionary); - result = _.forOwnRight(nilDictionary, dictionaryIterator); + result = _.forOwnRight(nilDictionary); + result = _.forOwnRight(nilDictionary, dictionaryIterator); } { @@ -10429,29 +10564,29 @@ namespace TestForOwnRight { { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).forOwnRight(); - result = _(dictionary).forOwnRight(dictionaryIterator); + result = _(dictionary).forOwnRight(); + result = _(dictionary).forOwnRight(dictionaryIterator); } { let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).forOwnRight(); - result = _(nilDictionary).forOwnRight(dictionaryIterator); + result = _(nilDictionary).forOwnRight(); + result = _(nilDictionary).forOwnRight(dictionaryIterator); } { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(dictionary).chain().forOwnRight(); - result = _(dictionary).chain().forOwnRight(dictionaryIterator); + result = _(dictionary).chain().forOwnRight(); + result = _(dictionary).chain().forOwnRight(dictionaryIterator); } { let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - result = _(nilDictionary).chain().forOwnRight(); - result = _(nilDictionary).chain().forOwnRight(dictionaryIterator); + result = _(nilDictionary).chain().forOwnRight(); + result = _(nilDictionary).chain().forOwnRight(dictionaryIterator); } } @@ -10464,7 +10599,7 @@ namespace TestFunctions { { let result: string[]; - result = _.functions(object); + result = _.functions(object); } { @@ -10510,15 +10645,15 @@ namespace TestGet { { let result: string; - result = _.get('abc', '0'); - result = _.get('abc', '0', '_'); - result = _.get('abc', ['0']); - result = _.get('abc', ['0'], '_'); + result = _.get('abc', '0'); + result = _.get('abc', '0', '_'); + result = _.get('abc', ['0']); + result = _.get('abc', ['0'], '_'); - result = _.get('abc', '0'); - result = _.get('abc', '0', '_'); - result = _.get('abc', ['0']); - result = _.get('abc', ['0'], '_'); + result = _.get('abc', '0'); + result = _.get('abc', '0', '_'); + result = _.get('abc', ['0']); + result = _.get('abc', ['0'], '_'); result = _('abc').get('0'); result = _('abc').get('0', '_'); @@ -10529,15 +10664,15 @@ namespace TestGet { { let result: number; - result = _.get([42], '0'); - result = _.get([42], '0', -1); - result = _.get([42], ['0']); - result = _.get([42], ['0'], -1); + result = _.get([42], '0'); + result = _.get([42], '0', -1); + result = _.get([42], ['0']); + result = _.get([42], ['0'], -1); - result = _.get([42], '0'); - result = _.get([42], '0', -1); - result = _.get([42], ['0']); - result = _.get([42], ['0'], -1); + result = _.get([42], '0'); + result = _.get([42], '0', -1); + result = _.get([42], ['0']); + result = _.get([42], ['0'], -1); result = _([42]).get('0'); result = _([42]).get('0', -1); @@ -10548,15 +10683,15 @@ namespace TestGet { { let result: boolean; - result = _.get<{a: boolean}, boolean>({a: true}, 'a'); - result = _.get<{a: boolean}, boolean>({a: true}, 'a', false); - result = _.get<{a: boolean}, boolean>({a: true}, ['a']); - result = _.get<{a: boolean}, boolean>({a: true}, ['a'], false); + result = _.get({a: true}, 'a'); + result = _.get({a: true}, 'a', false); + result = _.get({a: true}, ['a']); + result = _.get({a: true}, ['a'], false); - result = _.get({a: true}, 'a'); - result = _.get({a: true}, 'a', false); - result = _.get({a: true}, ['a']); - result = _.get({a: true}, ['a'], false); + result = _.get({a: true}, 'a'); + result = _.get({a: true}, 'a', false); + result = _.get({a: true}, ['a']); + result = _.get({a: true}, ['a'], false); result = _({a: true}).get('a'); result = _({a: true}).get('a', false); @@ -10567,28 +10702,28 @@ namespace TestGet { { let result: _.LoDashExplicitWrapper; - result = _('abc').chain().get<_.LoDashExplicitWrapper>('0'); - result = _('abc').chain().get<_.LoDashExplicitWrapper>('0', '_'); - result = _('abc').chain().get<_.LoDashExplicitWrapper>(['0']); - result = _('abc').chain().get<_.LoDashExplicitWrapper>(['0'], '_'); + result = _('abc').chain().get('0'); + result = _('abc').chain().get('0', '_'); + result = _('abc').chain().get(['0']); + result = _('abc').chain().get(['0'], '_'); } { let result: _.LoDashExplicitWrapper; - result = _([42]).chain().get<_.LoDashExplicitWrapper>('0'); - result = _([42]).chain().get<_.LoDashExplicitWrapper>('0', -1); - result = _([42]).chain().get<_.LoDashExplicitWrapper>(['0']); - result = _([42]).chain().get<_.LoDashExplicitWrapper>(['0'], -1); + result = _([42]).chain().get('0'); + result = _([42]).chain().get('0', -1); + result = _([42]).chain().get(['0']); + result = _([42]).chain().get(['0'], -1); } { let result: _.LoDashExplicitWrapper; - result = _({a: true}).chain().get<_.LoDashExplicitWrapper>('a'); - result = _({a: true}).chain().get<_.LoDashExplicitWrapper>('a', false); - result = _({a: true}).chain().get<_.LoDashExplicitWrapper>(['a']); - result = _({a: true}).chain().get<_.LoDashExplicitWrapper>(['a'], false); + result = _({a: true}).chain().get('a'); + result = _({a: true}).chain().get('a', false); + result = _({a: true}).chain().get(['a']); + result = _({a: true}).chain().get(['a'], false); } } @@ -10655,27 +10790,21 @@ namespace TestHasIn { // _.invert namespace TestInvert { { - let result: TResult; + let result: _.Dictionary; - result = _.invert({}); - result = _.invert({}, true); - - result = _.invert({}); - result = _.invert({}, true); + result = _.invert({}); } { - let result: _.LoDashImplicitObjectWrapper; + let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _({}).invert(); - result = _({}).invert(true); + result = _({}).invert(); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _({}).chain().invert(); - result = _({}).chain().invert(true); + result = _({}).chain().invert(); } } @@ -10832,58 +10961,58 @@ namespace TestMapKeys { { let result: _.Dictionary; - result = _.mapKeys(array); - result = _.mapKeys(array, listIterator); - result = _.mapKeys(array, ''); - result = _.mapKeys(array, {}); + result = _.mapKeys(array); + result = _.mapKeys(array, listIterator); + result = _.mapKeys(array, ''); + result = _.mapKeys(array, {}); - result = _.mapKeys(list); - result = _.mapKeys(list, listIterator); - result = _.mapKeys(list, ''); - result = _.mapKeys(list, {}); + result = _.mapKeys(list); + result = _.mapKeys(list, listIterator); + result = _.mapKeys(list, ''); + result = _.mapKeys(list, {}); - result = _.mapKeys(dictionary); - result = _.mapKeys(dictionary, dictionaryIterator); - result = _.mapKeys(dictionary, ''); - result = _.mapKeys(dictionary, {}); + result = _.mapKeys(dictionary); + result = _.mapKeys(dictionary, dictionaryIterator); + result = _.mapKeys(dictionary, ''); + result = _.mapKeys(dictionary, {}); } { let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - result = _(array).mapKeys(); - result = _(array).mapKeys(listIterator); + result = _(array).mapKeys(); + result = _(array).mapKeys(listIterator); result = _(array).mapKeys(''); - result = _(array).mapKeys<{}>({}); + result = _(array).mapKeys({}); - result = _(list).mapKeys(); - result = _(list).mapKeys(listIterator); - result = _(list).mapKeys(''); - result = _(list).mapKeys({}); + result = _(list).mapKeys(); + result = _(list).mapKeys(listIterator); + result = _(list).mapKeys(''); + result = _(list).mapKeys({}); - result = _(dictionary).mapKeys(); - result = _(dictionary).mapKeys(dictionaryIterator); - result = _(dictionary).mapKeys(''); - result = _(dictionary).mapKeys({}); + result = _(dictionary).mapKeys(); + result = _(dictionary).mapKeys(dictionaryIterator); + result = _(dictionary).mapKeys(''); + result = _(dictionary).mapKeys({}); } { let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - result = _(array).chain().mapKeys(); - result = _(array).chain().mapKeys(listIterator); + result = _(array).chain().mapKeys(); + result = _(array).chain().mapKeys(listIterator); result = _(array).chain().mapKeys(''); - result = _(array).chain().mapKeys<{}>({}); + result = _(array).chain().mapKeys({}); - result = _(list).chain().mapKeys(); - result = _(list).chain().mapKeys(listIterator); - result = _(list).chain().mapKeys(''); - result = _(list).chain().mapKeys({}); + result = _(list).chain().mapKeys(); + result = _(list).chain().mapKeys(listIterator); + result = _(list).chain().mapKeys(''); + result = _(list).chain().mapKeys({}); - result = _(dictionary).chain().mapKeys(); - result = _(dictionary).chain().mapKeys(dictionaryIterator); - result = _(dictionary).chain().mapKeys(''); - result = _(dictionary).chain().mapKeys({}); + result = _(dictionary).chain().mapKeys(); + result = _(dictionary).chain().mapKeys(dictionaryIterator); + result = _(dictionary).chain().mapKeys(''); + result = _(dictionary).chain().mapKeys({}); } } @@ -10909,7 +11038,7 @@ namespace TestMerge { result = _.merge(initialValue, {}, {}, {}, mergingValue); // Once we get to the varargs version, you have to specify the result explicitly - result = _.merge(initialValue, {}, {}, {}, {}, mergingValue); + result = _.merge(initialValue, {}, {}, {}, {}, mergingValue); type ComplicatedExpectedType = { a: number, b: string, c: {}, d: number[], e: boolean }; @@ -10939,7 +11068,7 @@ namespace TestMerge { result = _(initialValue).merge({}, {}, {}, mergingValue).value(); // Once we get to the varargs version, you have to specify the result explicitly - result = _(initialValue).merge({}, {}, {}, {}, mergingValue).value(); + result = _(initialValue).merge({}, {}, {}, {}, mergingValue).value(); // Test complex multiple combinations with chaining @@ -10997,34 +11126,32 @@ namespace TestMergeWith { result = _.mergeWith(initialValue, {}, {}, {}, mergingValue, customizer); // Once we get to the varargs version, you have to specify the result explicitl - result = _.mergeWith(initialValue, {}, {}, {}, {}, mergingValue, customizer); + result = _.mergeWith(initialValue, {}, {}, {}, {}, mergingValue, customizer); // Tests for basic chaining with mergeWith result = _(initialValue).mergeWith(mergingValue, customizer).value(); result = _(initialValue).mergeWith({}, mergingValue, customizer).value(); result = _(initialValue).mergeWith({}, {}, mergingValue, customizer).value(); result = _(initialValue).mergeWith({}, {}, {}, mergingValue, customizer).value(); - - // Once we get to the varargs version, you have to specify the result explicitly - result = _(initialValue).mergeWith({}, {}, {}, {}, mergingValue, customizer).value(); + result = _(initialValue).mergeWith({}, {}, {}, {}, mergingValue, customizer).value(); } // _.omit namespace TestOmit { - let obj: {} | null | undefined = any; + let obj: TResult | null | undefined = any; let predicate: (element: any, key: string, collection: any) => boolean; { - let result: TResult; + let result: Partial; - result = _.omit(obj, 'a'); - result = _.omit(obj, 0, 'a'); - result = _.omit(obj, true, 0, 'a'); - result = _.omit(obj, ['b', 1, false], true, 0, 'a'); + result = _.omit(obj, 'a'); + result = _.omit(obj, 0, 'a'); + result = _.omit(obj, true, 0, 'a'); + result = _.omit(obj, ['b', 1, false], true, 0, 'a'); } { - let result: _.LoDashImplicitObjectWrapper; + let result: _.LoDashImplicitWrapper>; result = _(obj).omit('a'); result = _(obj).omit(0, 'a'); @@ -11033,7 +11160,7 @@ namespace TestOmit { } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper>; result = _(obj).chain().omit('a'); result = _(obj).chain().omit(0, 'a'); @@ -11044,23 +11171,23 @@ namespace TestOmit { // _.omitBy namespace TestOmitBy { - let obj: {} | null | undefined = any; - let predicate = (element: any, key: string, collection: any) => true; + let obj: TResult | null | undefined = any; + let predicate = (element: any, key: string) => true; { - let result: TResult; + let result: Partial; - result = _.omitBy(obj, predicate); + result = _.omitBy(obj, predicate); } { - let result: _.LoDashImplicitObjectWrapper; + let result: _.LoDashImplicitWrapper>; result = _(obj).omitBy(predicate); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper>; result = _(obj).chain().omitBy(predicate); } @@ -11068,19 +11195,19 @@ namespace TestOmitBy { // _.pick namespace TestPick { - let obj: {} | null | undefined = any; + let obj: TResult | null | undefined = any; { - let result: TResult; + let result: Partial; - result = _.pick(obj, 'a'); - result = _.pick(obj, 0, 'a'); - result = _.pick(obj, true, 0, 'a'); - result = _.pick(obj, ['b', 1, false], true, 0, 'a'); + result = _.pick(obj, 'a'); + result = _.pick(obj, 0, 'a'); + result = _.pick(obj, true, 0, 'a'); + result = _.pick(obj, ['b', 1, false], true, 0, 'a'); } { - let result: _.LoDashImplicitObjectWrapper; + let result: _.LoDashImplicitWrapper>; result = _(obj).pick('a'); result = _(obj).pick(0, 'a'); @@ -11089,7 +11216,7 @@ namespace TestPick { } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper>; result = _(obj).chain().pick('a'); result = _(obj).chain().pick(0, 'a'); @@ -11100,23 +11227,23 @@ namespace TestPick { // _.pickBy namespace TestPickBy { - let obj: {} | null | undefined = any; - let predicate = (element: any, key: string, collection: any) => true; + let obj: TResult | null | undefined = any; + let predicate = (element: any, key: string) => true; { - let result: TResult; + let result: Partial; - result = _.pickBy(obj, predicate); + result = _.pickBy(obj, predicate); } { - let result: _.LoDashImplicitObjectWrapper; + let result: _.LoDashImplicitWrapper>; result = _(obj).pickBy(predicate); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashExplicitWrapper>; result = _(obj).chain().pickBy(predicate); } @@ -11127,13 +11254,6 @@ namespace TestResult { { let result: string; - result = _.result('abc', '0'); - result = _.result('abc', '0', '_'); - result = _.result('abc', '0', () => '_'); - result = _.result('abc', ['0']); - result = _.result('abc', ['0'], '_'); - result = _.result('abc', ['0'], () => '_'); - result = _.result('abc', '0'); result = _.result('abc', '0', '_'); result = _.result('abc', '0', () => '_'); @@ -11152,13 +11272,6 @@ namespace TestResult { { let result: number; - result = _.result([42], '0'); - result = _.result([42], '0', -1); - result = _.result([42], '0', () => -1); - result = _.result([42], ['0']); - result = _.result([42], ['0'], -1); - result = _.result([42], ['0'], () => -1); - result = _.result([42], '0'); result = _.result([42], '0', -1); result = _.result([42], '0', () => -1); @@ -11177,13 +11290,6 @@ namespace TestResult { { let result: boolean; - result = _.result<{a: boolean}, boolean>({a: true}, 'a'); - result = _.result<{a: boolean}, boolean>({a: true}, 'a', false); - result = _.result<{a: boolean}, boolean>({a: true}, 'a', () => false); - result = _.result<{a: boolean}, boolean>({a: true}, ['a']); - result = _.result<{a: boolean}, boolean>({a: true}, ['a'], false); - result = _.result<{a: boolean}, boolean>({a: true}, ['a'], () => false); - result = _.result({a: true}, 'a'); result = _.result({a: true}, 'a', false); result = _.result({a: true}, 'a', () => false); @@ -11202,34 +11308,34 @@ namespace TestResult { { let result: _.LoDashExplicitWrapper; - result = _('abc').chain().result<_.LoDashExplicitWrapper>('0'); - result = _('abc').chain().result<_.LoDashExplicitWrapper>('0', '_'); - result = _('abc').chain().result<_.LoDashExplicitWrapper>('0', '_'); - result = _('abc').chain().result<_.LoDashExplicitWrapper>(['0']); - result = _('abc').chain().result<_.LoDashExplicitWrapper>(['0'], () => '_'); - result = _('abc').chain().result<_.LoDashExplicitWrapper>(['0'], () => '_'); + result = _('abc').chain().result('0'); + result = _('abc').chain().result('0', '_'); + result = _('abc').chain().result('0', '_'); + result = _('abc').chain().result(['0']); + result = _('abc').chain().result(['0'], () => '_'); + result = _('abc').chain().result(['0'], () => '_'); } { let result: _.LoDashExplicitWrapper; - result = _([42]).chain().result<_.LoDashExplicitWrapper>('0'); - result = _([42]).chain().result<_.LoDashExplicitWrapper>('0', -1); - result = _([42]).chain().result<_.LoDashExplicitWrapper>('0', () => -1); - result = _([42]).chain().result<_.LoDashExplicitWrapper>(['0']); - result = _([42]).chain().result<_.LoDashExplicitWrapper>(['0'], -1); - result = _([42]).chain().result<_.LoDashExplicitWrapper>(['0'], () => -1); + result = _([42]).chain().result('0'); + result = _([42]).chain().result('0', -1); + result = _([42]).chain().result('0', () => -1); + result = _([42]).chain().result(['0']); + result = _([42]).chain().result(['0'], -1); + result = _([42]).chain().result(['0'], () => -1); } { let result: _.LoDashExplicitWrapper; - result = _({a: true}).chain().result<_.LoDashExplicitWrapper>('a'); - result = _({a: true}).chain().result<_.LoDashExplicitWrapper>('a', false); - result = _({a: true}).chain().result<_.LoDashExplicitWrapper>('a', () => false); - result = _({a: true}).chain().result<_.LoDashExplicitWrapper>(['a']); - result = _({a: true}).chain().result<_.LoDashExplicitWrapper>(['a'], false); - result = _({a: true}).chain().result<_.LoDashExplicitWrapper>(['a'], () => false); + result = _({a: true}).chain().result('a'); + result = _({a: true}).chain().result('a', false); + result = _({a: true}).chain().result('a', () => false); + result = _({a: true}).chain().result(['a']); + result = _({a: true}).chain().result(['a'], false); + result = _({a: true}).chain().result(['a'], () => false); } } @@ -11246,12 +11352,6 @@ namespace TestSet { result = _.set(object, 'a.b[1]', value); result = _.set(object, ['a', 'b', 1], value); - - result = _.set(object, 'a.b[1]', value); - result = _.set(object, ['a', 'b', 1], value); - - result = _.set(object, 'a.b[1]', value); - result = _.set(object, ['a', 'b', 1], value); } { @@ -11259,9 +11359,6 @@ namespace TestSet { result = _(object).set('a.b[1]', value); result = _(object).set(['a', 'b', 1], value); - - result = _(object).set('a.b[1]', value); - result = _(object).set(['a', 'b', 1], value); } { @@ -11269,20 +11366,16 @@ namespace TestSet { result = _(object).chain().set('a.b[1]', value); result = _(object).chain().set(['a', 'b', 1], value); - - result = _(object).chain().set('a.b[1]', value); - result = _(object).chain().set(['a', 'b', 1], value); } } // _.setWith namespace TestSetWith { - type SampleObject = {a: {}}; type SampleResult = {a: {b: number[]}}; - let object: SampleObject = { a: {} }; + let object: SampleResult = { a: { b: [] } }; let value = 0; - let customizer = (value: any, key: string, object: SampleObject) => 0; + let customizer = (value: any, key: string, object: SampleResult) => 0; { let result: SampleResult; @@ -11291,16 +11384,6 @@ namespace TestSetWith { result = _.setWith(object, 'a.b[1]', value, customizer); result = _.setWith(object, ['a', 'b', 1], value); result = _.setWith(object, ['a', 'b', 1], value, customizer); - - result = _.setWith(object, 'a.b[1]', value); - result = _.setWith(object, 'a.b[1]', value, customizer); - result = _.setWith(object, ['a', 'b', 1], value); - result = _.setWith(object, ['a', 'b', 1], value, customizer); - - result = _.setWith(object, 'a.b[1]', value); - result = _.setWith(object, 'a.b[1]', value, customizer); - result = _.setWith(object, ['a', 'b', 1], value); - result = _.setWith(object, ['a', 'b', 1], value, customizer); } { @@ -11310,11 +11393,6 @@ namespace TestSetWith { result = _(object).setWith('a.b[1]', value, customizer); result = _(object).setWith(['a', 'b', 1], value); result = _(object).setWith(['a', 'b', 1], value, customizer); - - result = _(object).setWith('a.b[1]', value); - result = _(object).setWith('a.b[1]', value, customizer); - result = _(object).setWith(['a', 'b', 1], value); - result = _(object).setWith(['a', 'b', 1], value, customizer); } { @@ -11324,11 +11402,6 @@ namespace TestSetWith { result = _(object).chain().setWith('a.b[1]', value, customizer); result = _(object).chain().setWith(['a', 'b', 1], value); result = _(object).chain().setWith(['a', 'b', 1], value, customizer); - - result = _(object).chain().setWith('a.b[1]', value); - result = _(object).chain().setWith('a.b[1]', value, customizer); - result = _(object).chain().setWith(['a', 'b', 1], value); - result = _(object).chain().setWith(['a', 'b', 1], value, customizer); } } @@ -11336,39 +11409,21 @@ namespace TestSetWith { namespace TestToPairs { let object: _.Dictionary = {}; - { - let result: [string, any][]; - - result = _.toPairs<_.Dictionary>(object); - } - { let result: [string, string][]; - result = _.toPairs<_.Dictionary, string>(object); + result = _.toPairs(object); } { let result: _.LoDashImplicitArrayWrapper<[string, string]>; - result = _(object).toPairs(); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, any]>; - result = _(object).toPairs(); } { let result: _.LoDashExplicitArrayWrapper<[string, string]>; - result = _(object).chain().toPairs(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, any]>; - result = _(object).chain().toPairs(); } } @@ -11377,27 +11432,15 @@ namespace TestToPairs { namespace TestToPairsIn { let object: _.Dictionary = {}; - { - let result: [string, any][]; - - result = _.toPairsIn<_.Dictionary>(object); - } - { let result: [string, string][]; - result = _.toPairsIn<_.Dictionary, string>(object); + result = _.toPairsIn(object); } { let result: _.LoDashImplicitArrayWrapper<[string, string]>; - result = _(object).toPairsIn(); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, any]>; - result = _(object).toPairsIn(); } @@ -11424,13 +11467,13 @@ namespace TestTransform { let accumulator: TResult[] = []; let result: TResult[]; - result = _.transform(array); + result = _.transform(array); result = _.transform(array, iterator); result = _.transform(array, iterator, accumulator); - result = _(array).transform().value(); - result = _(array).transform(iterator).value(); - result = _(array).transform(iterator, accumulator).value(); + result = _(array).transform().value(); + result = _(array).transform(iterator).value(); + result = _(array).transform(iterator, accumulator).value(); } { @@ -11438,11 +11481,9 @@ namespace TestTransform { let accumulator: _.Dictionary = {}; let result: _.Dictionary; - result = _.transform(array, iterator); result = _.transform(array, iterator, accumulator); - result = _(array).transform(iterator).value(); - result = _(array).transform(iterator, accumulator).value(); + result = _(array).transform(iterator, accumulator).value(); } { @@ -11450,11 +11491,11 @@ namespace TestTransform { let accumulator: _.Dictionary = {}; let result: _.Dictionary; - result = _.transform(dictionary); + result = _.transform(dictionary); result = _.transform(dictionary, iterator); result = _.transform(dictionary, iterator, accumulator); - result = _(dictionary).transform().value(); + result = _(dictionary).transform().value(); result = _(dictionary).transform(iterator).value(); result = _(dictionary).transform(iterator, accumulator).value(); } @@ -11464,10 +11505,8 @@ namespace TestTransform { let accumulator: TResult[] = []; let result: TResult[]; - result = _.transform(dictionary, iterator); result = _.transform(dictionary, iterator, accumulator); - result = _(dictionary).transform(iterator).value(); result = _(dictionary).transform(iterator, accumulator).value(); } } @@ -11481,8 +11520,8 @@ namespace TestUnset { { let result: boolean; - _.unset(object, 'a.b'); - _.unset(object, ['a', 'b']); + result = _.unset(object, 'a.b'); + result = _.unset(object, ['a', 'b']); } { @@ -11502,57 +11541,40 @@ namespace TestUnset { // _.update namespace TestUpdate { - type SampleObject = {a: {}}; type SampleResult = {a: {b: number[]}}; - let object: SampleObject = { a: {} }; + let object: SampleResult = { a: { b: [] } }; let updater = (value: any) => 0; { let result: SampleResult; - result = _.update(object, 'a.b[1]', updater); - result = _.update(object, ['a', 'b', 1], updater); - - result = _.update<(value: any) => number, SampleResult>(object, 'a.b[1]', updater); - result = _.update<(value: any) => number, SampleResult>(object, ['a', 'b', 1], updater); - - result = _.update(object, 'a.b[1]', updater); - result = _.update(object, ['a', 'b', 1], updater); - - result = _.update number, SampleResult>(object, 'a.b[1]', updater); - result = _.update number, SampleResult>(object, ['a', 'b', 1], updater); + result = _.update(object, 'a.b[1]', updater); + result = _.update(object, ['a', 'b', 1], updater); } { let result: _.LoDashImplicitObjectWrapper; - result = _(object).update('a.b[1]', updater); - result = _(object).update(['a', 'b', 1], updater); - - result = _(object).update<(value: any) => number, SampleResult>('a.b[1]', updater); - result = _(object).update<(value: any) => number, SampleResult>(['a', 'b', 1], updater); + result = _(object).update('a.b[1]', updater); + result = _(object).update(['a', 'b', 1], updater); } { let result: _.LoDashExplicitObjectWrapper; - result = _(object).chain().update('a.b[1]', updater); - result = _(object).chain().update(['a', 'b', 1], updater); - - result = _(object).chain().update<(value: any) => number, SampleResult>('a.b[1]', updater); - result = _(object).chain().update<(value: any) => number, SampleResult>(['a', 'b', 1], updater); + result = _(object).chain().update('a.b[1]', updater); + result = _(object).chain().update(['a', 'b', 1], updater); } } // _.updateWith namespace TestUpdateWith { - type SampleObject = {a: {}}; type SampleResult = {a: {b: number[]}}; - let object: SampleObject = { a: {} }; + let object: SampleResult = { a: { b: [] } }; let updater = (value: any) => 0; - let customizer = (value: any, key: string, object: SampleObject) => 0; + let customizer = (value: any, key: string, object: SampleResult) => 0; { let result: SampleResult; @@ -11594,7 +11616,6 @@ namespace TestValues { { let result: any[]; - result = _.values(); result = _.values(123); result = _.values(true); result = _.values(null); @@ -12026,11 +12047,9 @@ namespace TestReplace { result = _.replace('Hi Fred', /fred/i, 'Barney'); result = _.replace('Hi Fred', /fred/i, replacer); - result = _.replace('Fred'); result = _.replace('Fred', 'Barney'); result = _.replace('Fred', replacer); - result = _.replace(/fred/i); result = _.replace(/fred/i, 'Barney'); result = _.replace(/fred/i, replacer); @@ -12040,11 +12059,9 @@ namespace TestReplace { result = _('Hi Fred').replace(/fred/i, 'Barney'); result = _('Hi Fred').replace(/fred/i, replacer); - result = _('Fred').replace(); result = _('Fred').replace('Barney'); result = _('Fred').replace(replacer); - result = _(/fred/i).replace(); result = _(/fred/i).replace('Barney'); result = _(/fred/i).replace(replacer); } @@ -12058,11 +12075,9 @@ namespace TestReplace { result = _('Hi Fred').chain().replace(/fred/i, 'Barney'); result = _('Hi Fred').chain().replace(/fred/i, replacer); - result = _('Fred').chain().replace(); result = _('Fred').chain().replace('Barney'); result = _('Fred').chain().replace(replacer); - result = _(/fred/i).chain().replace(); result = _(/fred/i).chain().replace('Barney'); result = _(/fred/i).chain().replace(replacer); } @@ -12438,52 +12453,52 @@ namespace TestConstant { { let result: _.LoDashImplicitObjectWrapper<() => number>; - result = _(42).constant(); + result = _(42).constant(); } { let result: _.LoDashImplicitObjectWrapper<() => string>; - result = _('a').constant(); + result = _('a').constant(); } { let result: _.LoDashImplicitObjectWrapper<() => boolean>; - result = _(true).constant(); + result = _(true).constant(); } { let result: _.LoDashImplicitObjectWrapper<() => string[]>; - result = _(['a']).constant(); + result = _(['a']).constant(); } { let result: _.LoDashImplicitObjectWrapper<() => {a: string}>; - result = _({a: 'a'}).constant<{a: string}>(); + result = _({a: 'a'}).constant(); } { let result: _.LoDashExplicitObjectWrapper<() => number>; - result = _(42).chain().constant(); + result = _(42).chain().constant(); } { let result: _.LoDashExplicitObjectWrapper<() => string>; - result = _('a').chain().constant(); + result = _('a').chain().constant(); } { let result: _.LoDashExplicitObjectWrapper<() => boolean>; - result = _(true).chain().constant(); + result = _(true).chain().constant(); } { let result: _.LoDashExplicitObjectWrapper<() => string[]>; - result = _(['a']).chain().constant(); + result = _(['a']).chain().constant(); } { let result: _.LoDashExplicitObjectWrapper<() => {a: string}>; - result = _({a: 'a'}).chain().constant<{a: string}>(); + result = _({a: 'a'}).chain().constant(); } } @@ -12526,7 +12541,7 @@ namespace TestDefaultTo { } { - let result: _.LoDashImplicitObjectWrapper; + let result: number; result = _(42).defaultTo(42); result = _(undefined).defaultTo(42); result = _(null).defaultTo(42); @@ -12534,34 +12549,30 @@ namespace TestDefaultTo { } { - let result: _.LoDashImplicitObjectWrapper; + let result: string; result = _('a').defaultTo('default'); result = _(null).defaultTo('default'); - result = _(NaN).defaultTo('default'); } { - let result: _.LoDashImplicitObjectWrapper; + let result: boolean; result = _(true).defaultTo(true); result = _(undefined).defaultTo(true); result = _(null).defaultTo(true); - result = _(NaN).defaultTo(true); } { - let result: _.LoDashImplicitObjectWrapper; + let result: string[]; result = _(['a']).defaultTo(['default']); result = _(undefined).defaultTo(['default']); result = _(null).defaultTo(['default']); - result = _(NaN).defaultTo(['default']); } { - let result: _.LoDashImplicitObjectWrapper<{ a: string }>; + let result: { a: string }; result = _({ a: 'a' }).defaultTo({a : 'a'}); result = _(undefined).defaultTo({a : 'a'}); result = _(null).defaultTo({a : 'a'}); - result = _(NaN).defaultTo({a : 'a'}); } { @@ -12577,7 +12588,6 @@ namespace TestDefaultTo { result = _('a').chain().defaultTo('default'); result = _(undefined).chain().defaultTo('default'); result = _(null).chain().defaultTo('default'); - result = _(NaN).chain().defaultTo('default'); } { @@ -12585,7 +12595,6 @@ namespace TestDefaultTo { result = _(true).chain().defaultTo(true); result = _(undefined).chain().defaultTo(true); result = _(null).chain().defaultTo(true); - result = _(NaN).chain().defaultTo(true); } { @@ -12593,7 +12602,6 @@ namespace TestDefaultTo { result = _(['a']).chain().defaultTo(['default']); result = _(undefined).chain().defaultTo(['default']); result = _(null).chain().defaultTo(['default']); - result = _(NaN).chain().defaultTo(['default']); } { @@ -12601,7 +12609,6 @@ namespace TestDefaultTo { result = _({ a: 'a' }).chain().defaultTo({a : 'a'}); result = _(undefined).chain().defaultTo({a : 'a'}); result = _(null).chain().defaultTo({a : 'a'}); - result = _(NaN).chain().defaultTo({a : 'a'}); } } @@ -12664,7 +12671,7 @@ namespace TestIteratee { { let result: (object: any) => TResult; - result = _.iteratee(''); + result = _.iteratee(''); } { @@ -12676,13 +12683,14 @@ namespace TestIteratee { { let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; - result = _(Function).iteratee(); + let func: (...args: any[]) => TResult = any; + result = _(func).iteratee(); } { let result: _.LoDashImplicitObjectWrapper<(object: any) => TResult>; - result = _('').iteratee(); + result = _('').iteratee(); } { @@ -12694,13 +12702,14 @@ namespace TestIteratee { { let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; - result = _(Function).chain().iteratee(); + let func: (...args: any[]) => TResult = any; + result = _(func).chain().iteratee(); } { let result: _.LoDashExplicitObjectWrapper<(object: any) => TResult>; - result = _('').chain().iteratee(); + result = _('').chain().iteratee(); } { @@ -12782,83 +12791,83 @@ namespace TestMethod { { let result: (object: any) => {a: string}; - result = _.method<{a: string}>('a.0'); - result = _.method<{a: string}>('a.0', any, any); - result = _.method<{a: string}>('a.0', any, any, any); + result = _.method('a.0'); + result = _.method('a.0', any, any); + result = _.method('a.0', any, any, any); - result = _.method<{a: string}>(['a', 0]); - result = _.method<{a: string}>(['a', 0], any); - result = _.method<{a: string}>(['a', 0], any, any); - result = _.method<{a: string}>(['a', 0], any, any, any); + result = _.method(['a', 0]); + result = _.method(['a', 0], any); + result = _.method(['a', 0], any, any); + result = _.method(['a', 0], any, any, any); } { let result: (object: {a: string}) => {b: string}; - result = _.method<{a: string}, {b: string}>('a.0'); - result = _.method<{a: string}, {b: string}>('a.0', any, any); - result = _.method<{a: string}, {b: string}>('a.0', any, any, any); + result = _.method('a.0'); + result = _.method('a.0', any, any); + result = _.method('a.0', any, any, any); - result = _.method<{a: string}, {b: string}>(['a', 0]); - result = _.method<{a: string}, {b: string}>(['a', 0], any); - result = _.method<{a: string}, {b: string}>(['a', 0], any, any); - result = _.method<{a: string}, {b: string}>(['a', 0], any, any, any); + result = _.method(['a', 0]); + result = _.method(['a', 0], any); + result = _.method(['a', 0], any, any); + result = _.method(['a', 0], any, any, any); } { let result: _.LoDashImplicitObjectWrapper<(object: any) => {a: string}>; - result = _('a.0').method<{a: string}>(); - result = _('a.0').method<{a: string}>(any); - result = _('a.0').method<{a: string}>(any, any); - result = _('a.0').method<{a: string}>(any, any, any); + result = _('a.0').method(); + result = _('a.0').method(any); + result = _('a.0').method(any, any); + result = _('a.0').method(any, any, any); - result = _(['a', 0]).method<{a: string}>(); - result = _(['a', 0]).method<{a: string}>(any); - result = _(['a', 0]).method<{a: string}>(any, any); - result = _(['a', 0]).method<{a: string}>(any, any, any); + result = _(['a', 0]).method(); + result = _(['a', 0]).method(any); + result = _(['a', 0]).method(any, any); + result = _(['a', 0]).method(any, any, any); } { let result: _.LoDashImplicitObjectWrapper<(object: {a: string}) => {b: string}>; - result = _('a.0').method<{a: string}, {b: string}>(); - result = _('a.0').method<{a: string}, {b: string}>(any); - result = _('a.0').method<{a: string}, {b: string}>(any, any); - result = _('a.0').method<{a: string}, {b: string}>(any, any, any); + result = _('a.0').method(); + result = _('a.0').method(any); + result = _('a.0').method(any, any); + result = _('a.0').method(any, any, any); - result = _(['a', 0]).method<{a: string}, {b: string}>(); - result = _(['a', 0]).method<{a: string}, {b: string}>(any); - result = _(['a', 0]).method<{a: string}, {b: string}>(any, any); - result = _(['a', 0]).method<{a: string}, {b: string}>(any, any, any); + result = _(['a', 0]).method(); + result = _(['a', 0]).method(any); + result = _(['a', 0]).method(any, any); + result = _(['a', 0]).method(any, any, any); } { let result: _.LoDashExplicitObjectWrapper<(object: any) => {a: string}>; - result = _('a.0').chain().method<{a: string}>(); - result = _('a.0').chain().method<{a: string}>(any); - result = _('a.0').chain().method<{a: string}>(any, any); - result = _('a.0').chain().method<{a: string}>(any, any, any); + result = _('a.0').chain().method(); + result = _('a.0').chain().method(any); + result = _('a.0').chain().method(any, any); + result = _('a.0').chain().method(any, any, any); - result = _(['a', 0]).chain().method<{a: string}>(); - result = _(['a', 0]).chain().method<{a: string}>(any); - result = _(['a', 0]).chain().method<{a: string}>(any, any); - result = _(['a', 0]).chain().method<{a: string}>(any, any, any); + result = _(['a', 0]).chain().method(); + result = _(['a', 0]).chain().method(any); + result = _(['a', 0]).chain().method(any, any); + result = _(['a', 0]).chain().method(any, any, any); } { let result: _.LoDashExplicitObjectWrapper<(object: {a: string}) => {b: string}>; - result = _('a.0').chain().method<{a: string}, {b: string}>(); - result = _('a.0').chain().method<{a: string}, {b: string}>(any); - result = _('a.0').chain().method<{a: string}, {b: string}>(any, any); - result = _('a.0').chain().method<{a: string}, {b: string}>(any, any, any); + result = _('a.0').chain().method(); + result = _('a.0').chain().method(any); + result = _('a.0').chain().method(any, any); + result = _('a.0').chain().method(any, any, any); - result = _(['a', 0]).chain().method<{a: string}, {b: string}>(); - result = _(['a', 0]).chain().method<{a: string}, {b: string}>(any); - result = _(['a', 0]).chain().method<{a: string}, {b: string}>(any, any); - result = _(['a', 0]).chain().method<{a: string}, {b: string}>(any, any, any); + result = _(['a', 0]).chain().method(); + result = _(['a', 0]).chain().method(any); + result = _(['a', 0]).chain().method(any, any); + result = _(['a', 0]).chain().method(any, any, any); } } @@ -12872,66 +12881,77 @@ namespace TestMethodOf { { let result: ResultFn; - result = _.methodOf(object); - result = _.methodOf(object, any); - result = _.methodOf(object, any, any); - result = _.methodOf(object, any, any, any); - - result = _.methodOf(object); - result = _.methodOf(object, any); - result = _.methodOf(object, any, any); - result = _.methodOf(object, any, any, any); + result = _.methodOf(object); + result = _.methodOf(object, any); + result = _.methodOf(object, any, any); + result = _.methodOf(object, any, any, any); } { let result: _.LoDashImplicitObjectWrapper; - result = _(object).methodOf(); - result = _(object).methodOf(any); - result = _(object).methodOf(any, any); - result = _(object).methodOf(any, any, any); + result = _(object).methodOf(); + result = _(object).methodOf(any); + result = _(object).methodOf(any, any); + result = _(object).methodOf(any, any, any); } { let result: _.LoDashExplicitObjectWrapper; - result = _(object).chain().methodOf(); - result = _(object).chain().methodOf(any); - result = _(object).chain().methodOf(any, any); - result = _(object).chain().methodOf(any, any, any); + result = _(object).chain().methodOf(); + result = _(object).chain().methodOf(any); + result = _(object).chain().methodOf(any, any); + result = _(object).chain().methodOf(any, any, any); } } // _.mixin namespace TestMixin { - let source: _.Dictionary = {}; + let source: _.Dictionary<(...args: any[]) => any> = {}; + let dest: TResult = any; let options: {chain?: boolean} = {}; + { + let result: _.LoDashStatic; + + result = _.mixin(source); + result = _.mixin(source, options); + } + { let result: TResult; - result = _.mixin({}, source); - result = _.mixin({}, source, options); - result = _.mixin(source); - result = _.mixin(source, options); + result = _.mixin(dest, source); + result = _.mixin(dest, source, options); } { - let result: _.LoDashImplicitObjectWrapper; + let result: _.LoDashImplicitWrapper<_.LoDashStatic>; - result = _({}).mixin(source); - result = _({}).mixin(source, options); - result = _(source).mixin(); - result = _(source).mixin(options); + result = _(source).mixin(); + result = _(source).mixin(options); } { - let result: _.LoDashExplicitObjectWrapper; + let result: _.LoDashImplicitWrapper; - result = _({}).chain().mixin(source); - result = _({}).chain().mixin(source, options); - result = _(source).chain().mixin(); - result = _(source).chain().mixin(options); + result = _(dest).mixin(source); + result = _(dest).mixin(source, options); + } + + { + let result: _.LoDashExplicitWrapper<_.LoDashStatic>; + + result = _(source).chain().mixin(); + result = _(source).chain().mixin(options); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(dest).chain().mixin(source); + result = _(dest).chain().mixin(source, options); } } @@ -12967,7 +12987,7 @@ namespace TestNoop { result = _('a').noop(true, 'a', 1); result = _([1]).noop(true, 'a', 1); - result = _([]).noop(true, 'a', 1); + result = _(['']).noop(true, 'a', 1); result = _({}).noop(true, 'a', 1); result = _(any).noop(true, 'a', 1); } @@ -12977,7 +12997,7 @@ namespace TestNoop { result = _('a').chain().noop(true, 'a', 1); result = _([1]).chain().noop(true, 'a', 1); - result = _([]).chain().noop(true, 'a', 1); + result = _(['']).chain().noop(true, 'a', 1); result = _({}).chain().noop(true, 'a', 1); result = _(any).chain().noop(true, 'a', 1); } @@ -12989,20 +13009,20 @@ namespace TestNthArg { { let result: SampleFunc; - result = _.nthArg(); - result = _.nthArg(1); + result = _.nthArg(); + result = _.nthArg(1); } { let result: _.LoDashImplicitObjectWrapper; - result = _(1).nthArg(); + result = _(1).nthArg(); } { let result: _.LoDashExplicitObjectWrapper; - result = _(1).chain().nthArg(); + result = _(1).chain().nthArg(); } } @@ -13232,7 +13252,7 @@ namespace TestRangeRight { result = _('a').chain().stubArray(); result = _([1]).chain().stubArray(); - result = _([]).chain().stubArray(); + result = _(['']).chain().stubArray(); result = _({}).chain().stubArray(); result = _(any).chain().stubArray(); } @@ -13252,7 +13272,7 @@ namespace TestRangeRight { result = _('a').chain().stubFalse(); result = _([1]).chain().stubFalse(); - result = _([]).chain().stubFalse(); + result = _(['']).chain().stubFalse(); result = _({}).chain().stubFalse(); result = _(any).chain().stubFalse(); } @@ -13272,7 +13292,7 @@ namespace TestRangeRight { result = _('a').chain().stubObject(); result = _([1]).chain().stubObject(); - result = _([]).chain().stubObject(); + result = _(['']).chain().stubObject(); result = _({}).chain().stubObject(); result = _(any).chain().stubObject(); } @@ -13292,7 +13312,7 @@ namespace TestRangeRight { result = _('a').chain().stubString(); result = _([1]).chain().stubString(); - result = _([]).chain().stubString(); + result = _(['']).chain().stubString(); result = _({}).chain().stubString(); result = _(any).chain().stubString(); } @@ -13312,7 +13332,7 @@ namespace TestRangeRight { result = _('a').chain().stubTrue(); result = _([1]).chain().stubTrue(); - result = _([]).chain().stubTrue(); + result = _(['']).chain().stubTrue(); result = _({}).chain().stubTrue(); result = _(any).chain().stubTrue(); } @@ -13367,7 +13387,7 @@ namespace TestToPath { result = _(1).toPath(); result = _('a').toPath(); result = _([1]).toPath(); - result = _(["a"]).toPath(); + result = _(["a"]).toPath(); result = _({}).toPath(); } } diff --git a/types/lodash/tslint.json b/types/lodash/tslint.json index 02254dbc60..44e681fc18 100644 --- a/types/lodash/tslint.json +++ b/types/lodash/tslint.json @@ -2,35 +2,28 @@ "extends": "dtslint/dt.json", "rules": { // All are TODOs - "adjacent-overload-signatures": false, - "align": false, "array-type": false, "ban-types": false, "callable-types": false, - "comment-format": false, - "eofline": false, + "comment-format": [false], "interface-name": false, "interface-over-type-literal": false, "jsdoc-format": false, - "max-line-length": false, + "max-line-length": [false], "no-any-union": false, "no-empty-interface": false, - "no-namespace": false, "no-mergeable-namespace": false, + "no-namespace": false, "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, "no-unnecessary-type-assertion": false, "no-void-expression": false, - "no-trailing-whitespace": false, "object-literal-key-quotes": false, "one-line": false, - "one-variable-per-declaration": false, "prefer-const": false, "semicolon": false, "space-within-parens": false, - "triple-equals": false, - "typedef-whitespace": false, + "typedef-whitespace": [false], "unified-signatures": false, - "whitespace": false + "whitespace": [false] } } From 1d3179901c97f1f5a18c717d986ade3881dd7b13 Mon Sep 17 00:00:00 2001 From: Rob Sterner Date: Thu, 19 Oct 2017 11:27:29 -0400 Subject: [PATCH 006/232] per the docs/comments the order can be null (#20721) --- types/c3/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/c3/index.d.ts b/types/c3/index.d.ts index 00d1cf1840..eb727233a0 100644 --- a/types/c3/index.d.ts +++ b/types/c3/index.d.ts @@ -366,7 +366,7 @@ declare namespace c3 { * and it will recieve the data as argument. * Available Values: desc, asc, function (data1, data2) { ... }, null */ - order?: string | ((...data: string[]) => void); + order?: string | ((...data: string[]) => void) | null; /** * Define regions for each data. * The values must be an array for each data and it should include an object that has start, end, style. If start is not set, the start will be the first data point. If end is not set, the From f9aa971b2735046772a12d8b7ad4f6d04932bba6 Mon Sep 17 00:00:00 2001 From: Viktor Isaev Date: Thu, 19 Oct 2017 18:31:05 +0300 Subject: [PATCH 007/232] Added typings for "heapdump". (#20716) * Added typings for "require-dir". * Fixed dtslint errors. * Fixed By field. * Added typings for "restify-cookies". * Added "cookies" field to Request interface. * Added typings for "heapdump". --- types/heapdump/heapdump-tests.ts | 9 +++++++++ types/heapdump/index.d.ts | 6 ++++++ types/heapdump/tsconfig.json | 25 +++++++++++++++++++++++++ types/heapdump/tslint.json | 1 + 4 files changed, 41 insertions(+) create mode 100644 types/heapdump/heapdump-tests.ts create mode 100644 types/heapdump/index.d.ts create mode 100644 types/heapdump/tsconfig.json create mode 100644 types/heapdump/tslint.json diff --git a/types/heapdump/heapdump-tests.ts b/types/heapdump/heapdump-tests.ts new file mode 100644 index 0000000000..49019f83fc --- /dev/null +++ b/types/heapdump/heapdump-tests.ts @@ -0,0 +1,9 @@ +import * as heapdump from 'heapdump'; + +heapdump.writeSnapshot('/tmp/myDump', (err) => { + if (err) { + console.log('Failed to dump heap: ' + err); + } else { + console.log('Successfully dumped heap!'); + } +}); diff --git a/types/heapdump/index.d.ts b/types/heapdump/index.d.ts new file mode 100644 index 0000000000..d4e0477a32 --- /dev/null +++ b/types/heapdump/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for heapdump 0.3 +// Project: https://github.com/bnoordhuis/node-heapdump +// Definitions by: weekens +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function writeSnapshot(dumpFileName: string, callback: (err?: Error) => void): void; diff --git a/types/heapdump/tsconfig.json b/types/heapdump/tsconfig.json new file mode 100644 index 0000000000..a15a306b41 --- /dev/null +++ b/types/heapdump/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "heapdump-tests.ts" + ] +} diff --git a/types/heapdump/tslint.json b/types/heapdump/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/heapdump/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 5b3c2c61117a6d713af90d8b1efe8492749c97e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20Do=C4=9Fan?= Date: Thu, 19 Oct 2017 18:35:06 +0300 Subject: [PATCH 008/232] Optional parameters for constructor has been changed according to package's description (#20712) --- types/neo4j/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/neo4j/index.d.ts b/types/neo4j/index.d.ts index f0923557ca..dc9567f725 100644 --- a/types/neo4j/index.d.ts +++ b/types/neo4j/index.d.ts @@ -57,7 +57,7 @@ export interface GraphDatabaseOptions { * HTTP agent. * @type {any} */ - agent: any; + agent?: any; /** * Authentication information. @@ -69,13 +69,13 @@ export interface GraphDatabaseOptions { * HTTP headers. * @type {Object} */ - headers: {}; + headers?: {}; /** * Proxy address. * @type {string} */ - proxy: string; + proxy?: string; /** * URL connection. From 12eb86bd1bbc28f5d49965adb63bfc25fd8e4558 Mon Sep 17 00:00:00 2001 From: Ika Date: Thu, 19 Oct 2017 23:36:58 +0800 Subject: [PATCH 009/232] feat(prettier): update to v1.7.x (#20708) --- types/prettier/index.d.ts | 26 +++++++++++++++++++++----- types/prettier/prettier-tests.ts | 3 +++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/types/prettier/index.d.ts b/types/prettier/index.d.ts index 1ed2568a1e..6ea1fcbbf9 100644 --- a/types/prettier/index.d.ts +++ b/types/prettier/index.d.ts @@ -9,7 +9,16 @@ import { File } from 'babel-types'; export type AST = File; export type BuiltInParser = (text: string, options?: any) => AST; -export type BuiltInParserName = 'babylon' | 'flow' | 'typescript' | 'postcss' | 'json' | 'graphql'; +export type BuiltInParserName = + | 'babylon' + | 'flow' + | 'typescript' + | 'postcss' // deprecated + | 'css' + | 'less' + | 'scss' + | 'json' + | 'graphql'; export type CustomParser = (text: string, parsers: Record, options: Options) => AST; @@ -107,11 +116,18 @@ export interface ResolveConfigOptions { * If set to `false`, all caching will be bypassed. */ useCache?: boolean; + /** + * Pass directly the path of the config file if you don't wish to search for it. + */ + config?: string; } /** - * `resolveConfig` can be used to resolve configuration for a given source file. - * The function optionally accepts an input file path as an argument, which defaults to the current working directory. + * `resolveConfig` can be used to resolve configuration for a given source file, + * passing its path as the first argument. The config search will start at the + * file path and continue to search up the directory. + * (You can use `process.cwd()` to start searching from the current directory). + * * A promise is returned which will resolve to: * * - An options object, providing a [config file](https://github.com/prettier/prettier#configuration-file) was found. @@ -119,9 +135,9 @@ export interface ResolveConfigOptions { * * The promise will be rejected if there was an error parsing the configuration file. */ -export function resolveConfig(filePath?: string, options?: ResolveConfigOptions): Promise; +export function resolveConfig(filePath: string, options?: ResolveConfigOptions): Promise; export namespace resolveConfig { - function sync(filePath?: string, options?: ResolveConfigOptions): null | Options; + function sync(filePath: string, options?: ResolveConfigOptions): null | Options; } /** diff --git a/types/prettier/prettier-tests.ts b/types/prettier/prettier-tests.ts index 8d95196101..9d78453bae 100644 --- a/types/prettier/prettier-tests.ts +++ b/types/prettier/prettier-tests.ts @@ -24,6 +24,9 @@ prettier.resolveConfig('path/to/somewhere').then(options => { } }); +// $ExpectError +prettier.resolveConfig(); + const options = prettier.resolveConfig.sync('path/to/somewhere'); if (options !== null) { const formatted = prettier.format('hello world', options); From fb6179c085bcf89d530555bda1828c79a025627a Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 20 Oct 2017 00:39:42 +0900 Subject: [PATCH 010/232] [hexo-fs] cleanup unnecessary type annotation (#20702) --- types/hexo-fs/hexo-fs-tests.ts | 147 ++++++++++++++++----------------- types/hexo-fs/index.d.ts | 1 + 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/types/hexo-fs/hexo-fs-tests.ts b/types/hexo-fs/hexo-fs-tests.ts index 71e6d99e1b..d53a790ac1 100644 --- a/types/hexo-fs/hexo-fs-tests.ts +++ b/types/hexo-fs/hexo-fs-tests.ts @@ -1,11 +1,10 @@ import fs = require('hexo-fs'); -import path = require('path'); -import mocha = require('mocha'); +import { join, dirname } from 'path'; +import 'mocha'; import chai = require('chai'); import Promise = require('bluebird'); const should = chai.should(); -const { join } = path; function createDummyFolder(path: string) { return Promise.all([ @@ -31,18 +30,18 @@ const tmpDir = join(__dirname, 'fs_tmp'); before(() => fs.mkdirs(tmpDir)); -after((done) => { +after(done => { fs.rmdir(tmpDir); done(); }); it('exists()', () => { - return fs.exists(tmpDir).then((exist) => { + return fs.exists(tmpDir).then(exist => { exist.should.be.true; }); }); -it('exists() - callback', (callback) => { +it('exists() - callback', callback => { fs.exists(tmpDir, (exist) => { exist.should.be.true; callback(); @@ -54,19 +53,19 @@ it('mkdirs()', () => { return fs.mkdirs(target).then(() => { return fs.exists(target); - }).then((exist) => { + }).then(exist => { exist.should.be.true; return fs.rmdir(join(tmpDir, 'a')); }); }); -it('mkdirs() - callback', (callback) => { +it('mkdirs() - callback', callback => { const target = join(tmpDir, 'a', 'b', 'c'); - fs.mkdirs(target, (err) => { + fs.mkdirs(target, err => { should.not.exist(err); - fs.exists(target, (exist) => { + fs.exists(target, exist => { exist.should.be.true; fs.rmdir(join(tmpDir, 'a'), callback); }); @@ -78,7 +77,7 @@ it('mkdirsSync()', () => { fs.mkdirsSync(target); - return fs.exists(target).then((exist) => { + return fs.exists(target).then(exist => { exist.should.be.true; return fs.rmdir(join(tmpDir, 'a')); }); @@ -90,17 +89,17 @@ it('writeFile()', () => { return fs.writeFile(target, body).then(() => { return fs.readFile(target); - }).then((content) => { + }).then(content => { content.should.eql(body); return fs.rmdir(join(tmpDir, 'a')); }); }); -it('writeFile() - callback', (callback) => { +it('writeFile() - callback', callback => { const target = join(tmpDir, 'a', 'b', 'test.txt'); const body = 'foo'; - fs.writeFile(target, body, (err) => { + fs.writeFile(target, body, err => { should.not.exist(err); fs.readFile(target, (_, content) => { @@ -116,7 +115,7 @@ it('writeFileSync()', () => { fs.writeFileSync(target, body); - return fs.readFile(target).then((content) => { + return fs.readFile(target).then(content => { content.should.eql(body); return fs.rmdir(join(tmpDir, 'a')); }); @@ -131,19 +130,19 @@ it('appendFile()', () => { return fs.appendFile(target, body2); }).then(() => { return fs.readFile(target); - }).then((content) => { + }).then(content => { content.should.eql(body + body2); return fs.rmdir(join(tmpDir, 'a')); }); }); -it('appendFile() - callback', (callback) => { +it('appendFile() - callback', callback => { const target = join(tmpDir, 'a', 'b', 'test.txt'); const body = 'foo'; const body2 = 'bar'; fs.writeFile(target, body, () => { - fs.appendFile(target, body2, (err) => { + fs.appendFile(target, body2, err => { should.not.exist(err); fs.readFile(target, (_, content) => { @@ -162,7 +161,7 @@ it('appendFileSync()', () => { return fs.writeFile(target, body).then(() => { fs.appendFileSync(target, body2); return fs.readFile(target); - }).then((content) => { + }).then(content => { content.should.eql(body + body2); return fs.rmdir(join(tmpDir, 'a')); }); @@ -177,7 +176,7 @@ it('copyFile()', () => { return fs.copyFile(src, dest); }).then(() => { return fs.readFile(dest); - }).then((content) => { + }).then(content => { content.should.eql(body); return Promise.all([ @@ -187,15 +186,15 @@ it('copyFile()', () => { }); }); -it('copyFile() - callback', (callback) => { +it('copyFile() - callback', callback => { const src = join(tmpDir, 'test.txt'); const dest = join(tmpDir, 'a', 'b', 'test.txt'); const body = 'foo'; - fs.writeFile(src, body, (err) => { + fs.writeFile(src, body, err => { if (err) return callback(err); - fs.copyFile(src, dest, (err) => { + fs.copyFile(src, dest, err => { if (err) return callback(err); fs.readFile(dest, (err, content) => { @@ -217,7 +216,7 @@ it('copyDir()', () => { return createDummyFolder(src).then(() => { return fs.copyDir(src, dest); - }).then((files) => { + }).then(files => { files.should.have.members([ 'e.txt', 'f.js', @@ -231,7 +230,7 @@ it('copyDir()', () => { fs.readFile(join(dest, 'folder', 'h.txt')), fs.readFile(join(dest, 'folder', 'i.js')) ]); - }).then((result) => { + }).then(result => { result.should.eql(['e', 'f', 'h', 'i']); }).then(() => { return Promise.all([ @@ -241,7 +240,7 @@ it('copyDir()', () => { }); }); -it('copyDir() - callback', (callback) => { +it('copyDir() - callback', callback => { const src = join(tmpDir, 'a'); const dest = join(tmpDir, 'b'); @@ -260,7 +259,7 @@ it('copyDir() - callback', (callback) => { fs.readFile(join(dest, 'f.js')), fs.readFile(join(dest, 'folder', 'h.txt')), fs.readFile(join(dest, 'folder', 'i.js')) - ]).then((result) => { + ]).then(result => { result.should.eql(['e', 'f', 'h', 'i']); }).then(() => { return Promise.all([ @@ -278,7 +277,7 @@ it('copyDir() - ignoreHidden off', () => { return createDummyFolder(src).then(() => { return fs.copyDir(src, dest, { ignoreHidden: false }); - }).then((files) => { + }).then(files => { files.should.have.members([ join('.hidden', 'a.txt'), join('.hidden', 'b.js'), @@ -302,7 +301,7 @@ it('copyDir() - ignoreHidden off', () => { fs.readFile(join(dest, 'folder', 'i.js')), fs.readFile(join(dest, 'folder', '.j')) ]); - }).then((result) => { + }).then(result => { result.should.eql(['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j']); }).then(() => { return Promise.all([ @@ -318,14 +317,14 @@ it('copyDir() - ignorePattern', () => { return createDummyFolder(src).then(() => { return fs.copyDir(src, dest, { ignorePattern: /\.js/ }); - }).then((files) => { + }).then(files => { files.should.have.members(['e.txt', join('folder', 'h.txt')]); return Promise.all([ fs.readFile(join(dest, 'e.txt')), fs.readFile(join(dest, 'folder', 'h.txt')) ]); - }).then((result) => { + }).then(result => { result.should.eql(['e', 'h']); }).then(() => { return Promise.all([ @@ -340,7 +339,7 @@ it('listDir()', () => { return createDummyFolder(target).then(() => { return fs.listDir(target); - }).then((files) => { + }).then(files => { files.should.have.members([ 'e.txt', 'f.js', @@ -352,7 +351,7 @@ it('listDir()', () => { }); }); -it('listDir() - callback', (callback) => { +it('listDir() - callback', callback => { const target = join(tmpDir, 'test'); createDummyFolder(target).then(() => { @@ -376,7 +375,7 @@ it('listDir() - ignoreHidden off', () => { return createDummyFolder(target).then(() => { return fs.listDir(target, { ignoreHidden: false }); - }).then((files) => { + }).then(files => { files.should.have.members([ join('.hidden', 'a.txt'), join('.hidden', 'b.js'), @@ -398,7 +397,7 @@ it('listDir() - ignorePattern', () => { return createDummyFolder(target).then(() => { return fs.listDir(target, { ignorePattern: /\.js/ }); - }).then((files) => { + }).then(files => { files.should.have.members(['e.txt', join('folder', 'h.txt')]); return fs.rmdir(target); }); @@ -457,17 +456,17 @@ it('readFile()', () => { return fs.writeFile(target, body).then(() => { return fs.readFile(target); - }).then((content) => { + }).then(content => { content.should.eql(body); return fs.unlink(target); }); }); -it('readFile() - callback', (callback) => { +it('readFile() - callback', callback => { const target = join(tmpDir, 'test.txt'); const body = 'test'; - fs.writeFile(target, body, (err) => { + fs.writeFile(target, body, err => { if (err) return callback(err); fs.readFile(target, (err, content) => { @@ -486,7 +485,7 @@ it('readFile() - escape BOM', () => { return fs.writeFile(target, body).then(() => { return fs.readFile(target); - }).then((content) => { + }).then(content => { content.should.eql('foo'); return fs.unlink(target); }); @@ -498,7 +497,7 @@ it('readFile() - escape Windows line ending', () => { return fs.writeFile(target, body).then(() => { return fs.readFile(target); - }).then((content) => { + }).then(content => { content.should.eql('foo\nbar'); return fs.unlink(target); }); @@ -539,12 +538,12 @@ it('unlink()', () => { return fs.writeFile(target, '').then(() => { return fs.exists(target); - }).then((exist) => { + }).then(exist => { exist.should.eql(true); return fs.unlink(target); }).then(() => { return fs.exists(target); - }).then((exist) => { + }).then(exist => { exist.should.eql(false); }); }); @@ -554,7 +553,7 @@ it('emptyDir()', () => { return createDummyFolder(target).then(() => { return fs.emptyDir(target); - }).then>((files) => { + }).then(files => { files.should.have.members([ 'e.txt', 'f.js', @@ -574,7 +573,7 @@ it('emptyDir()', () => { [join(target, 'folder', '.j'), true] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -582,7 +581,7 @@ it('emptyDir()', () => { }); }); -it('emptyDir() - callback', (callback) => { +it('emptyDir() - callback', callback => { const target = join(tmpDir, 'test'); createDummyFolder(target).then(() => { @@ -596,7 +595,7 @@ it('emptyDir() - callback', (callback) => { join('folder', 'i.js') ]); - Promise.map<[string, boolean], void>([ + Promise.map([ [join(target, '.hidden', 'a.txt'), true], [join(target, '.hidden', 'b.js'), true], [join(target, '.hidden', 'c', 'd'), true], @@ -606,8 +605,8 @@ it('emptyDir() - callback', (callback) => { [join(target, 'folder', 'h.txt'), false], [join(target, 'folder', 'i.js'), false], [join(target, 'folder', '.j'), true] - ], (data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + ] as Array<[string, boolean]>, data => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -622,7 +621,7 @@ it('emptyDir() - ignoreHidden off', () => { return createDummyFolder(target).then(() => { return fs.emptyDir(target, { ignoreHidden: false }); - }).then>((files) => { + }).then(files => { files.should.have.members([ join('.hidden', 'a.txt'), join('.hidden', 'b.js'), @@ -647,7 +646,7 @@ it('emptyDir() - ignoreHidden off', () => { [join(target, 'folder', '.j'), false] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -660,7 +659,7 @@ it('emptyDir() - ignorePattern', () => { return createDummyFolder(target).then(() => { return fs.emptyDir(target, { ignorePattern: /\.js/ }); - }).then>((files) => { + }).then(files => { files.should.have.members(['e.txt', join('folder', 'h.txt')]); return [ @@ -675,7 +674,7 @@ it('emptyDir() - ignorePattern', () => { [join(target, 'folder', '.j'), true] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -688,7 +687,7 @@ it('emptyDir() - exclude', () => { return createDummyFolder(target).then(() => { return fs.emptyDir(target, { exclude: ['e.txt', join('folder', 'i.js')] }); - }).then>((files) => { + }).then(files => { files.should.have.members(['f.js', join('folder', 'h.txt')]); return [ @@ -703,7 +702,7 @@ it('emptyDir() - exclude', () => { [join(target, 'folder', '.j'), true] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -714,7 +713,7 @@ it('emptyDir() - exclude', () => { it('emptyDirSync()', () => { const target = join(tmpDir, 'test'); - return createDummyFolder(target).then>(() => { + return createDummyFolder(target).then(() => { const files = fs.emptyDirSync(target); files.should.have.members([ 'e.txt', @@ -735,7 +734,7 @@ it('emptyDirSync()', () => { [join(target, 'folder', '.j'), true] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -746,7 +745,7 @@ it('emptyDirSync()', () => { it('emptyDirSync() - ignoreHidden off', () => { const target = join(tmpDir, 'test'); - return createDummyFolder(target).then>(() => { + return createDummyFolder(target).then(() => { const files = fs.emptyDirSync(target, { ignoreHidden: false }); files.should.have.members([ join('.hidden', 'a.txt'), @@ -772,7 +771,7 @@ it('emptyDirSync() - ignoreHidden off', () => { [join(target, 'folder', '.j'), false] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -783,7 +782,7 @@ it('emptyDirSync() - ignoreHidden off', () => { it('emptyDirSync() - ignorePattern', () => { const target = join(tmpDir, 'test'); - return createDummyFolder(target).then>(() => { + return createDummyFolder(target).then(() => { const files = fs.emptyDirSync(target, { ignorePattern: /\.js/ }); files.should.have.members(['e.txt', join('folder', 'h.txt')]); @@ -799,7 +798,7 @@ it('emptyDirSync() - ignorePattern', () => { [join(target, 'folder', '.j'), true] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -810,7 +809,7 @@ it('emptyDirSync() - ignorePattern', () => { it('emptyDirSync() - exclude', () => { const target = join(tmpDir, 'test'); - return createDummyFolder(target).then>(() => { + return createDummyFolder(target).then(() => { const files = fs.emptyDirSync(target, { exclude: ['e.txt', join('folder', 'i.js')] }); files.should.have.members(['f.js', join('folder', 'h.txt')]); @@ -826,7 +825,7 @@ it('emptyDirSync() - exclude', () => { [join(target, 'folder', '.j'), true] ]; }).map((data: [string, boolean]) => { - return fs.exists(data[0]).then((exist) => { + return fs.exists(data[0]).then(exist => { exist.should.eql(data[1]); }); }).then(() => { @@ -841,19 +840,19 @@ it('rmdir()', () => { return fs.rmdir(target); }).then(() => { return fs.exists(target); - }).then((exist) => { + }).then(exist => { exist.should.be.false; }); }); -it('rmdir() - callback', (callback) => { +it('rmdir() - callback', callback => { const target = join(tmpDir, 'test'); createDummyFolder(target).then(() => { - fs.rmdir(target, (err) => { + fs.rmdir(target, err => { should.not.exist(err); - fs.exists(target, (exist) => { + fs.exists(target, exist => { exist.should.be.false; callback(); }); @@ -867,7 +866,7 @@ it('rmdirSync()', () => { return createDummyFolder(target).then(() => { fs.rmdirSync(target); return fs.exists(target); - }).then((exist) => { + }).then(exist => { exist.should.be.false; }); }); @@ -877,7 +876,7 @@ import { FSWatcher } from 'chokidar'; it('watch()', () => { let watcher: FSWatcher; - return fs.watch(tmpDir).then((watcher_) => { + return fs.watch(tmpDir).then(watcher_ => { watcher = watcher_; return new Promise((resolve, reject) => { @@ -905,7 +904,7 @@ it('ensurePath() - file exists', () => { fs.writeFile(join(target, 'bar.txt'), '') ]).then(() => { return fs.ensurePath(join(target, 'foo.txt')); - }).then((path) => { + }).then(path => { path.should.eql(join(target, 'foo-2.txt')); return fs.rmdir(target); }); @@ -914,12 +913,12 @@ it('ensurePath() - file exists', () => { it('ensurePath() - file not exist', () => { const target = join(tmpDir, 'foo.txt'); - return fs.ensurePath(target).then((path) => { + return fs.ensurePath(target).then(path => { path.should.eql(target); }); }); -it('ensurePath() - callback', (callback) => { +it('ensurePath() - callback', callback => { const target = join(tmpDir, 'test'); Promise.all([ @@ -962,7 +961,7 @@ it('ensurePathSync() - file not exist', () => { it('ensureWriteStream()', () => { const target = join(tmpDir, 'foo', 'bar.txt'); - return fs.ensureWriteStream(target).then((stream) => { + return fs.ensureWriteStream(target).then(stream => { stream.path.should.eql(target); stream.on('finish', () => { return fs.unlink(target); @@ -970,7 +969,7 @@ it('ensureWriteStream()', () => { }); }); -it('ensureWriteStream() - callback', (callback) => { +it('ensureWriteStream() - callback', callback => { const target = join(tmpDir, 'foo', 'bar.txt'); fs.ensureWriteStream(target, (err, stream) => { @@ -986,6 +985,6 @@ it('ensureWriteStreamSync()', () => { stream.path.should.eql(target); stream.on('finish', () => { - return fs.rmdir(path.dirname(target)); + return fs.rmdir(dirname(target)); }); }); diff --git a/types/hexo-fs/index.d.ts b/types/hexo-fs/index.d.ts index 237071d7c6..b1b9ef0405 100644 --- a/types/hexo-fs/index.d.ts +++ b/types/hexo-fs/index.d.ts @@ -2,6 +2,7 @@ // Project: http://hexo.io/ // Definitions by: segayuu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import Promise = require('bluebird'); import { From 498e2c46417703cf11f930cc235708b13a5904dd Mon Sep 17 00:00:00 2001 From: renjfk Date: Thu, 19 Oct 2017 18:40:40 +0300 Subject: [PATCH 011/232] add definitions for mark.js (#20700) --- types/mark.js/index.d.ts | 61 ++++++++++++++++++++++++++++++++++ types/mark.js/mark.js-tests.ts | 4 +++ types/mark.js/tsconfig.json | 24 +++++++++++++ types/mark.js/tslint.json | 1 + 4 files changed, 90 insertions(+) create mode 100644 types/mark.js/index.d.ts create mode 100644 types/mark.js/mark.js-tests.ts create mode 100644 types/mark.js/tsconfig.json create mode 100644 types/mark.js/tslint.json diff --git a/types/mark.js/index.d.ts b/types/mark.js/index.d.ts new file mode 100644 index 0000000000..2215c4e65c --- /dev/null +++ b/types/mark.js/index.d.ts @@ -0,0 +1,61 @@ +// Type definitions for mark.js 8.11 +// Project: https://markjs.io/ +// Definitions by: Soner Köksal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +type MarkAccuracy = "partially" | "complementary" | "exactly"; + +interface MarkOptions { + element?: string; + className?: string; + exclude?: string[]; + separateWordSearch?: boolean; + accuracy?: MarkAccuracy | { value: MarkAccuracy }; + diacritics?: boolean; + synonyms?: { [index: string]: string }; + iframes?: boolean; + iframesTimeout?: number; + acrossElements?: boolean; + caseSensitive?: boolean; + ignoreJoiners?: boolean; + wildcards?: "disabled" | "enabled" | "withSpaces"; + + each?(element: Element): void; + + filter?(textNode: Element, term: string, marksSoFar: number, marksTotal: number): boolean; + + noMatch?(term: string): void; + + done?(marksTotal: number): void; + + debug?: boolean; + log?: object; +} + +interface UnmarkOptions { + element?: string; + className?: string; + exclude?: string[]; + iframes?: boolean; + iframesTimeout?: number; + + done?(marksTotal: number): void; + + debug?: boolean; + log?: object; +} + +interface JQuery { + mark(term: string, options?: MarkOptions): void; + + unmark(options?: UnmarkOptions): void; +} + +interface JQueryStatic { + mark(term: string, options?: MarkOptions): void; + + unmark(options?: UnmarkOptions): void; +} diff --git a/types/mark.js/mark.js-tests.ts b/types/mark.js/mark.js-tests.ts new file mode 100644 index 0000000000..136098d39d --- /dev/null +++ b/types/mark.js/mark.js-tests.ts @@ -0,0 +1,4 @@ +$("div.context").mark("text", { + element: "span", + className: "highlight" +}); diff --git a/types/mark.js/tsconfig.json b/types/mark.js/tsconfig.json new file mode 100644 index 0000000000..381f150954 --- /dev/null +++ b/types/mark.js/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mark.js-tests.ts" + ] +} diff --git a/types/mark.js/tslint.json b/types/mark.js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mark.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6688ade3ea728ae56e15288f14f2f3a43cbc6708 Mon Sep 17 00:00:00 2001 From: renjfk Date: Thu, 19 Oct 2017 18:42:05 +0300 Subject: [PATCH 012/232] added definitions for selectables 1.4 (#20699) * added definitions for selectables 1.4 * options are now optional * constructor is now optional --- types/selectables/index.d.ts | 35 ++++++++++++++++++++++++++ types/selectables/selectables-tests.ts | 15 +++++++++++ types/selectables/tsconfig.json | 24 ++++++++++++++++++ types/selectables/tslint.json | 1 + 4 files changed, 75 insertions(+) create mode 100644 types/selectables/index.d.ts create mode 100644 types/selectables/selectables-tests.ts create mode 100644 types/selectables/tsconfig.json create mode 100644 types/selectables/tslint.json diff --git a/types/selectables/index.d.ts b/types/selectables/index.d.ts new file mode 100644 index 0000000000..3834428240 --- /dev/null +++ b/types/selectables/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for selectables 1.4 +// Project: https://github.com/p34eu/Selectables#readme +// Definitions by: Soner Köksal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = Selectables; + +declare class Selectables { + options: Selectables.Options; + + constructor(options?: Selectables.Options); + + enable(): void; + + disable(): void; +} + +declare namespace Selectables { + interface Options { + zone?: string; + elements?: string; + selectedClass?: string; + key?: string | boolean; + moreUsing?: string; + enabled?: boolean; + + start?(e: Event): void; + + stop?(e: Event): void; + + onSelect?(el: Element): void; + + onDeselect?(el: Element): void; + } +} diff --git a/types/selectables/selectables-tests.ts b/types/selectables/selectables-tests.ts new file mode 100644 index 0000000000..595f2ca738 --- /dev/null +++ b/types/selectables/selectables-tests.ts @@ -0,0 +1,15 @@ +import * as Selectables from "selectables"; + +const dr = new Selectables({ + zone: '#div', + elements: 'li' +}); + +// later +dr.disable(); + +// enable again +dr.enable(); + +// set options +dr.options.key = 'altKey'; diff --git a/types/selectables/tsconfig.json b/types/selectables/tsconfig.json new file mode 100644 index 0000000000..e34d4a6078 --- /dev/null +++ b/types/selectables/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "selectables-tests.ts" + ] +} diff --git a/types/selectables/tslint.json b/types/selectables/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/selectables/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ba5c25b8c7aa5acd0a062c832f53857cf8958663 Mon Sep 17 00:00:00 2001 From: Junyoung Clare Jang Date: Thu, 19 Oct 2017 11:42:41 -0400 Subject: [PATCH 013/232] Fix ModifyOptions (#20698) --- types/openlayers/index.d.ts | 2 ++ types/openlayers/openlayers-tests.ts | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 539db01b4d..441214cce6 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -12617,6 +12617,7 @@ declare module olx { /** * @typedef {{condition: (ol.EventsConditionType|undefined), * deleteCondition: (ol.EventsConditionType|undefined), + * insertVertexCondition: (ol.EventsConditionType|undefined), * pixelTolerance: (number|undefined), * style: (ol.style.Style|Array.|ol.StyleFunction|undefined), * features: ol.Collection., @@ -12626,6 +12627,7 @@ declare module olx { interface ModifyOptions { condition?: ol.EventsConditionType; deleteCondition?: ol.EventsConditionType; + insertVertexCondition?: ol.EventsConditionType; pixelTolerance?: number; style?: (ol.style.Style | ol.style.Style[] | ol.StyleFunction); features: ol.Collection; diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 29d763344a..50281ff0fe 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -703,7 +703,8 @@ jsonValue = geojsonFormat.writeGeometryObject(geometry, writeOptions); // ol.interactions // let modify: ol.interaction.Modify = new ol.interaction.Modify({ - features: new ol.Collection(featureArray) + insertVertexCondition: ol.events.condition.never, + features: new ol.Collection(featureArray), }); let draw: ol.interaction.Draw = new ol.interaction.Draw({ @@ -811,4 +812,4 @@ numberValue = ol.Sphere.getArea(geometry, { numberValue = ol.Sphere.getLength(geometry, { projection: projection, radius: numberValue, -}); \ No newline at end of file +}); From 2c1dc4970e23bfcff04851e4b9e241832b18c680 Mon Sep 17 00:00:00 2001 From: Pratheek Adidela Date: Thu, 19 Oct 2017 22:46:17 +0530 Subject: [PATCH 014/232] Added types for node-horseman (#20030) * Added declarations for 'node-horseman'. * Linting is successful. * Made required changes for pushing to @types. --- types/node-horseman/index.d.ts | 241 +++++++++++++++++++++ types/node-horseman/node-horseman-tests.ts | 11 + types/node-horseman/tsconfig.json | 24 ++ types/node-horseman/tslint.json | 1 + 4 files changed, 277 insertions(+) create mode 100644 types/node-horseman/index.d.ts create mode 100644 types/node-horseman/node-horseman-tests.ts create mode 100644 types/node-horseman/tsconfig.json create mode 100644 types/node-horseman/tslint.json diff --git a/types/node-horseman/index.d.ts b/types/node-horseman/index.d.ts new file mode 100644 index 0000000000..46ca810233 --- /dev/null +++ b/types/node-horseman/index.d.ts @@ -0,0 +1,241 @@ +// Type definitions for node-horseman 3.3 +// Project: https://github.com/johntitus/node-horseman#readme +// Definitions by: Pratheek Adidela +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = horseman; + +declare class horseman { + constructor(options: any); + /** Handle page events inside PhantomJS. Phantom receives callback return value with .at but not with .on */ + at(eventType: string, callback: () => void): this; + + /** Get the value of an attribute for a selector. */ + attribute(selector: string, attr: string): string; + + /** Use basic HTTP authentication when opening a page. */ + authentication(username: string, password: string): this; + + /** Go back a page. */ + back(): this; + + /** Get the bounding rectangle of a selector. */ + boundingRectangle(selector: string): ClientRect; + + /** Clear an input field. */ + clear(selector: string): any; + + /** Click on a selector and fire a 'click event'. */ + click(selector: string): this; + + /** Close the instance and perform cleanup. */ + close(): this; + + /** Close a tab and release its resources. */ + closeTab(tabNumber: string): this; + + /** Set the cookies for Phantom. */ + cookies(args: object | object[] | string): this; + /** Get the cookies from Phantom. */ + cookies(): string; + + /** Count the number of occurances of 'selector' on the page. */ + count(selector: string): number; + + /** Save a cropped screenshot to disk. */ + crop(area: string | object, path: string): this; + + /** Take a base64 encoded cropped screenshot. */ + cropBase64(area: string, type: string | 'PNG'): any; + + /** Get the value of an css property of a selector. */ + cssProperty(selector: string, prop: string): string; + + /** Execute a function without breaking the api chain. */ + do(fn: () => void): this; + + /** Download a URL. */ + download(url: string, path: string, binary: boolean, method: string, data: string): this; + + /** Run a javascript function on the current page and optionally return the results. */ + evaluate(fn: () => void, args?: any[]): this; + + /** Determine if the selector exists, at least once, on the page. */ + exists(selector: string): boolean; + + /** Go forward a page. */ + forward(): this; + + /** Get the count of frames inside the current frame. */ + frameCount(): number; + + /** Get the name of the current frame. */ + frameName(): string; + + /** Get the names of the frames inside the current frame. */ + frameNames(): string; + + /** Set headers sent to the remote server during an 'open'. */ + headers(headers: object[]): this; + + /** Get the height of an element. */ + height(selector: string): number; + + /** Get the HTML for the page, or optionally for a selector. */ + html(selector?: string, file?: string): Promise; + + /** Includes javascript script from a url on the page. */ + includeJs(url: string): this; + + /** Injects javascript from a file into the page. */ + injectJs(file: string): this; + + /** Fire a key event. */ + keyboardEvent(type?: string, key?: string, modifier?: number): this; + + /** Log the output from either a previous chain method, or a string the user passed in. */ + log(output?: string): this; + + /** Run javascript on the page. */ + manipulate(fn: () => void, args?: any[]): this; + + /** Fire a mouse event. */ + mouseEvent(type?: string, x?: number, y?: number, button?: string): this; + + /** Handles page events. * eventType can be one of: + * initialized - callback() + * loadStarted - callback() + * loadFinished - callback(status) + * tabCreated - callback(tabNum, tab) + * tabClosed - callback(tabNum, tab) + * urlChanged - callback(targetUrl) + * navigationRequested - callback(url, type, willNavigate, main) + * resourceRequested - callback(requestData, networkRequest) + * resourceReceived - callback(response) + * pageCreated - callback(newPage) + * consoleMessage(msg, lineNum, sourceId) + * alert - callback(msg) + * confirm - callback(msg) + * prompt - callback(msg, defaultVal) + * filePicker - callback(oldFile) + * error - callback(msg, trace); + * timeout - callback(type) + */ + on(event: string | "timeout" | "tabCreated" | "tabClosed"| "resourceTimeout"| "urlChanged"| "resourceReceived"| "pageCreated"| "loadFinished", func: (...args: any[]) => void): this; + + /** Open a url in Phantom. */ + open(url: string, method?: string | 'GET'): this; + + /** Open URL in a new tab */ + openTab(url: string): this; + + pageMaker(url: any, _page: any, ...args: any[]): any; + + /** Save the current page as a pdf. */ + pdf(path: string, paperSize: { + format?: "A3" | "A4" | "A5" | "Legal" | "Letter" | "Tabloid", + orientation?: "portrait" | "landscape", + margin?: string + }): this; + + /** Get the plain text for the body of the page. */ + plainText(): string; + + /** Send Post data to a url. */ + post(url: string, postData: string): this; + + /** Send Put data to a url. */ + put(url: string, putData: string): this; + + /** Reload the page. */ + reload(): this; + + /** Save a screenshot to disk. */ + screenshot(path: string): this; + + /** Take a base64 encoded screenshot, e.g., PNG. */ + screenshotBase64(type: string | 'PNG'): any; + + /** Scroll to a position on the page. */ + scrollTo(top: number, left: number): this; + + /** Select a value in an html select element. */ + select(selector: string, value: string): any; + + /** Change the proxy settings. */ + setProxy(ip: string, port: string, type: string, username: string, password: string): this; + + /** Get the HTTP status of the last opened page. */ + status(): string; + + /** Switch to a child frame. */ + switchToChildFrame(nameOrPosition: string | number): this; + + /** Switch to the focused frame. */ + switchToFocusedFrame(): this; + + /** Switch to a frame inside the current frame. */ + switchToFrame(nameOrPosition: string | number): this; + + /** Switch to the main frame. */ + switchToMainFrame(): this; + + /** Switch to the parent frame of the current frame. */ + switchToParentFrame(): this; + + /** Switch to another of the open tabs */ + switchToTab(tabNumber: number): this; + + /** Returns the number of tabs */ + tabCount(): number; + + /** Get the text for the body of the page, or optionally for a selector. */ + text(selector?: string): string; + + /** Get the title of the current page. */ + title(): string; + + /** Simulate a keypress on a selector */ + type(selector: string, text: string, options?: object): this; + + /** Upload a file to the page. */ + upload(selector: string, file: string): this; + + /** Get the url of the current page. */ + url(): string; + + /** Get or set the user agent for Phantom. */ + userAgent(...args: any[]): any; + + /** Get the value of an element. */ + value(selector: string): string; + /** Sets the value of an element. */ + value(selector: string, value: string): this; + + /** Set the size of the viewport. */ + viewport(width: number, height: number): this; + /** Get the size of the viewport. */ + viewport(): object; + + /** Determines if an element is visible. */ + visible(selector: string): boolean; + + /** Wait for a specified period of time */ + wait(milliseconds: number): this; + + /** Waits for a function to evaluate to a given value in browser. If optsOrFn is a function, use the classic signature waitFor(fn, arg1, arg2, value), If arg is an object, use waitFor(options). */ + waitFor(...args: any[]): this; + + /** Wait for a page load to occur */ + waitForNextPage(object?: object): this; + + /** Wait for a selector to be present on the current page. */ + waitForSelector(selector: string, options: object): this; + + /** Get the width of an element. */ + width(selector: string): number; + + /** Set the zoom factor of the page. */ + zoom(zoomFactor: number): this; +} diff --git a/types/node-horseman/node-horseman-tests.ts b/types/node-horseman/node-horseman-tests.ts new file mode 100644 index 0000000000..f1d81058f6 --- /dev/null +++ b/types/node-horseman/node-horseman-tests.ts @@ -0,0 +1,11 @@ +import horseman = require("node-horseman"); + +const horse = new horseman({ + timeout: 10000 +}); + +horse.on('error', (msg: any, trace: any) => { console.log(msg, trace); }) +.open("http://example.org/").waitForNextPage().html().then((pageContent: string) => { + console.log(pageContent); + horse.close(); +}); diff --git a/types/node-horseman/tsconfig.json b/types/node-horseman/tsconfig.json new file mode 100644 index 0000000000..5490648512 --- /dev/null +++ b/types/node-horseman/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "strictFunctionTypes": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "node-horseman-tests.ts" + ] +} diff --git a/types/node-horseman/tslint.json b/types/node-horseman/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/node-horseman/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e86a56d0ccd8cf5d074e2cf5b0cc41acba663bf3 Mon Sep 17 00:00:00 2001 From: Jinwoo Lee Date: Thu, 19 Oct 2017 10:22:12 -0700 Subject: [PATCH 015/232] Node http2: statCheck() may also return `false`. (#20692) * Node http2: statCheck() may also return `false`. https://nodejs.org/dist/latest-v8.x/docs/api/http2.html#http2_http2stream_respondwithfile_path_headers_options says: The options.statCheck function may also be used to cancel the send operation by returning false Related node code: - https://github.com/nodejs/node/blob/master/lib/internal/http2/core.js#L1621 - https://github.com/nodejs/node/blob/master/lib/internal/http2/core.js#L1671 * add tests for returning false from statCheck() * change `void|false` to `void|boolean` * fix lint error --- types/node/index.d.ts | 2 +- types/node/node-tests.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index d8e8fe3358..5d0ba05b93 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -6112,7 +6112,7 @@ declare module "http2" { } export interface ServerStreamFileResponseOptions { - statCheck?: (stats: fs.Stats, headers: IncomingHttpHeaders, statOptions: StatOptions) => void; + statCheck?: (stats: fs.Stats, headers: IncomingHttpHeaders, statOptions: StatOptions) => void|boolean; getTrailers?: (trailers: IncomingHttpHeaders) => void; offset?: number; length?: number; diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index c4cd693e03..7b36c859c7 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -3288,6 +3288,7 @@ namespace http2_tests { serverHttp2Stream.respondWithFD(0); serverHttp2Stream.respondWithFD(0, headers); serverHttp2Stream.respondWithFD(0, headers, options2); + serverHttp2Stream.respondWithFD(0, headers, {statCheck: () => false}); let options3: http2.ServerStreamFileResponseOptionsWithError = { onError: (err: NodeJS.ErrnoException) => {}, statCheck: (stats: fs.Stats, headers: http2.IncomingHttpHeaders, statOptions: http2.StatOptions) => {}, @@ -3298,6 +3299,7 @@ namespace http2_tests { serverHttp2Stream.respondWithFile(''); serverHttp2Stream.respondWithFile('', headers); serverHttp2Stream.respondWithFile('', headers, options3); + serverHttp2Stream.respondWithFile('', headers, {statCheck: () => false}); } // Http2Server / Http2SecureServer From 891a0d68419009e460948febd1d40f19b3efff4d Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 19 Oct 2017 11:29:04 -0700 Subject: [PATCH 016/232] dts-generator: Add dependency on "typescript" (#20730) --- types/dts-generator/package.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 types/dts-generator/package.json diff --git a/types/dts-generator/package.json b/types/dts-generator/package.json new file mode 100644 index 0000000000..2195330f38 --- /dev/null +++ b/types/dts-generator/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "typescript": "*" + } +} From fec630a446d8cd1155d0d8e4f53a4bc119143e92 Mon Sep 17 00:00:00 2001 From: Stephen Ierodiaconou Date: Thu, 19 Oct 2017 19:34:06 +0100 Subject: [PATCH 017/232] [next-redux-wrapper] update to support new option param and export interfaces used in return types (#20732) * [next-redux-wrapper] update to support new option param and export interfaces used in return types * Revert change to package.json --- types/next-redux-wrapper/index.d.ts | 29 ++++++++++--------- .../next-redux-wrapper-tests.tsx | 2 +- types/next-redux-wrapper/package.json | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/types/next-redux-wrapper/index.d.ts b/types/next-redux-wrapper/index.d.ts index dae0cf3841..1f5945741b 100644 --- a/types/next-redux-wrapper/index.d.ts +++ b/types/next-redux-wrapper/index.d.ts @@ -14,7 +14,7 @@ */ import * as React from 'react'; -import { IncomingMessage } from 'http'; +import { IncomingMessage, ServerResponse } from 'http'; import { Store, Component, MapDispatchToPropsParam, MapStateToPropsParam, @@ -23,28 +23,28 @@ import { export = nextReduxWrapper; -interface NextPageComponentMethods { - getInitialProps(props: any): Promise; -} -type NextReduxWrappedComponent = React.Component & NextPageComponentMethods; - -type NextStoreCreator = ( - initialState: TInitialState, - options: nextReduxWrapper.StoreCreatorOptions -) => Store; - declare function nextReduxWrapper( options: nextReduxWrapper.Options -): (Component: Component) => NextReduxWrappedComponent; +): (Component: Component) => nextReduxWrapper.NextReduxWrappedComponent; declare function nextReduxWrapper( - createStore: NextStoreCreator, + createStore: nextReduxWrapper.NextStoreCreator, mapStateToProps?: MapStateToPropsParam, mapDispatchToProps?: MapDispatchToPropsParam, mergeProps?: MergeProps, options?: ConnectOptions -): (Component: Component) => NextReduxWrappedComponent; +): (Component: Component) => nextReduxWrapper.NextReduxWrappedComponent; declare namespace nextReduxWrapper { + interface NextPageComponentMethods { + getInitialProps(props: any): Promise; + } + type NextReduxWrappedComponent = React.Component & NextPageComponentMethods; + + type NextStoreCreator = ( + initialState: TInitialState, + options: StoreCreatorOptions + ) => Store; + interface Options { createStore: NextStoreCreator; debug?: boolean; @@ -57,6 +57,7 @@ declare namespace nextReduxWrapper { interface StoreCreatorOptions extends Options { isServer: boolean; req?: IncomingMessage; + res?: ServerResponse; query?: any; } diff --git a/types/next-redux-wrapper/next-redux-wrapper-tests.tsx b/types/next-redux-wrapper/next-redux-wrapper-tests.tsx index 37bd8af4b8..40069aeb8d 100644 --- a/types/next-redux-wrapper/next-redux-wrapper-tests.tsx +++ b/types/next-redux-wrapper/next-redux-wrapper-tests.tsx @@ -70,7 +70,7 @@ const com5 = withRedux( (initialState: InitialState, options: StoreCreatorOptions) => { - if (options.isServer || options.req || options.query) { + if (options.isServer || options.req || options.query || options.res) { const a = 1; } return createStore(reducer, initialState); diff --git a/types/next-redux-wrapper/package.json b/types/next-redux-wrapper/package.json index 4bcc170ca3..6d68bf2f9b 100644 --- a/types/next-redux-wrapper/package.json +++ b/types/next-redux-wrapper/package.json @@ -3,4 +3,4 @@ "dependencies": { "redux": "^3.6.0" } -} \ No newline at end of file +} From 254fb86815a697567662f27592dc1f07256ae6ba Mon Sep 17 00:00:00 2001 From: Simon McClive Date: Thu, 19 Oct 2017 19:38:48 +0100 Subject: [PATCH 018/232] Add types for parent-package-json (#20714) * Add types for parent-package-json * Update return type to false and restructure tests * Remove multiple calls of parent() in tests * Test optional properties --- types/parent-package-json/index.d.ts | 17 +++++++++++++ .../parent-package-json-tests.ts | 10 ++++++++ types/parent-package-json/tsconfig.json | 24 +++++++++++++++++++ types/parent-package-json/tslint.json | 3 +++ 4 files changed, 54 insertions(+) create mode 100644 types/parent-package-json/index.d.ts create mode 100644 types/parent-package-json/parent-package-json-tests.ts create mode 100644 types/parent-package-json/tsconfig.json create mode 100644 types/parent-package-json/tslint.json diff --git a/types/parent-package-json/index.d.ts b/types/parent-package-json/index.d.ts new file mode 100644 index 0000000000..b0ab9ec3ce --- /dev/null +++ b/types/parent-package-json/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for parent-package-json 2.0 +// Project: https://github.com/maxrimue/parent-package-json +// Definitions by: Simon McClive +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = ParentPackageJson; + +declare function ParentPackageJson(startPath?: string | null, ignore?: number): ParentPackageJson.ParentPackage | false; + +declare namespace ParentPackageJson { + interface ParentPackage { + read(): string; + path: string; + parse(): {[key: string]: any}; + } +} diff --git a/types/parent-package-json/parent-package-json-tests.ts b/types/parent-package-json/parent-package-json-tests.ts new file mode 100644 index 0000000000..41a5a7bdd0 --- /dev/null +++ b/types/parent-package-json/parent-package-json-tests.ts @@ -0,0 +1,10 @@ +import * as parent from 'parent-package-json'; + +const hasParent = parent('/optional/path/', 1); + +if (hasParent !== false) { + const pathToParent: string = hasParent.path; + const contentOfParent: string = hasParent.read(); + const JSONOfParent = hasParent.parse(); + const versionOfParent = JSONOfParent.version; +} diff --git a/types/parent-package-json/tsconfig.json b/types/parent-package-json/tsconfig.json new file mode 100644 index 0000000000..33d474c851 --- /dev/null +++ b/types/parent-package-json/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "parent-package-json-tests.ts" + ] +} diff --git a/types/parent-package-json/tslint.json b/types/parent-package-json/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/parent-package-json/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 18ab71a912052b27d2ab2af235865f3cd6cd74ae Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 19 Oct 2017 13:23:16 -0700 Subject: [PATCH 019/232] Additions to ISSUE_TEMPLATE (#20735) --- .github/ISSUE_TEMPLATE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 4078b4808b..536e38c4e2 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,5 +1,9 @@ +If you know how to fix the issue, make a pull request instead. + - [ ] I tried using the `@types/xxxx` package and had problems. - [ ] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript - [ ] I have a question that is inappropriate for [StackOverflow](https://stackoverflow.com/). (Please ask any appropriate questions there). - [ ] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see `Definitions by:` in `index.d.ts`) so they can respond. - Authors: @.... + +If you do not mention the authors the issue will be ignored. From be60958bd85d1a2d63cfc3c403b06bad3635112b Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 19 Oct 2017 13:23:32 -0700 Subject: [PATCH 020/232] Mention strictFunctionTypes in PULL_REQUUEST_TEMPLATE (#20736) --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 979a8311e0..4217471f9d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,7 +12,7 @@ If adding a new definition: - [ ] The package does not provide its own types, and you can not add them. - [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package. - [ ] Create it with `dts-gen --dt`, not by basing it on an existing project. -- [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, and `strictNullChecks` set to `true`. +- [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, `strictNullChecks`, and `strictFunctionTypes` set to `true`. If changing an existing definition: - [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <> From 8f53357a4cc054add2111f7c3a07a92541298b5c Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 19 Oct 2017 13:32:47 -0700 Subject: [PATCH 021/232] sequelize: Allow 'boolean' in WhereOptions (#20690) --- types/sequelize/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index f1dc66fce5..f5b1befcc4 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -3108,7 +3108,7 @@ declare namespace sequelize { * typesafety, but there is no way to pass the tests if we just remove it. */ type WhereOptions = { - [P in keyof T]?: string | number | WhereLogic | WhereOptions | col | and | or | WhereGeometryOptions | Array | null; + [P in keyof T]?: string | number | boolean | WhereLogic | WhereOptions | col | and | or | WhereGeometryOptions | Array | null; }; /** From 149031f781bcd52fe8b13940d51bbe6feae289ca Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 19 Oct 2017 13:32:59 -0700 Subject: [PATCH 022/232] Update TypeScript versions of packages that depend on vue (#20733) --- types/vue-i18n/index.d.ts | 1 + types/vue-scrollto/index.d.ts | 1 + types/vue-scrollto/tsconfig.json | 1 + 3 files changed, 3 insertions(+) diff --git a/types/vue-i18n/index.d.ts b/types/vue-i18n/index.d.ts index 19225a83dd..030487a98b 100644 --- a/types/vue-i18n/index.d.ts +++ b/types/vue-i18n/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kazupon/vue-i18n // Definitions by: Kombu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import Vue, { PluginFunction } from 'vue'; diff --git a/types/vue-scrollto/index.d.ts b/types/vue-scrollto/index.d.ts index e20879473f..5ca330d646 100644 --- a/types/vue-scrollto/index.d.ts +++ b/types/vue-scrollto/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rigor789/vue-scrollto#readme // Definitions by: Kovács Vince // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 import { PluginFunction } from "vue"; diff --git a/types/vue-scrollto/tsconfig.json b/types/vue-scrollto/tsconfig.json index 6afe67dfcb..fd030de5e6 100644 --- a/types/vue-scrollto/tsconfig.json +++ b/types/vue-scrollto/tsconfig.json @@ -8,6 +8,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From dd980c087a917ef4dc93cf4c3de6cab228fd8936 Mon Sep 17 00:00:00 2001 From: BehindTheMath Date: Thu, 19 Oct 2017 19:15:07 -0400 Subject: [PATCH 023/232] [github-username-regex] Add definitions (#20665) * [github-username-regex] Add definitions * [github-username-regex] Change to match CommonJS export format --- .../github-username-regex-tests.ts | 4 ++++ types/github-username-regex/index.d.ts | 7 ++++++ types/github-username-regex/tsconfig.json | 23 +++++++++++++++++++ types/github-username-regex/tslint.json | 1 + 4 files changed, 35 insertions(+) create mode 100644 types/github-username-regex/github-username-regex-tests.ts create mode 100644 types/github-username-regex/index.d.ts create mode 100644 types/github-username-regex/tsconfig.json create mode 100644 types/github-username-regex/tslint.json diff --git a/types/github-username-regex/github-username-regex-tests.ts b/types/github-username-regex/github-username-regex-tests.ts new file mode 100644 index 0000000000..d829752776 --- /dev/null +++ b/types/github-username-regex/github-username-regex-tests.ts @@ -0,0 +1,4 @@ +import githubUsernameRegex = require("github-username-regex"); + +const githubUsernameRegexString: string = githubUsernameRegex.source; +const valid: boolean = githubUsernameRegex.test("abc-123"); diff --git a/types/github-username-regex/index.d.ts b/types/github-username-regex/index.d.ts new file mode 100644 index 0000000000..59b3d703f7 --- /dev/null +++ b/types/github-username-regex/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for github-username-regex 1.0 +// Project: https://github.com/shinnn/github-username-regex +// Definitions by: BehindTheMath +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const githubUsernameRegex: RegExp; +export = githubUsernameRegex; diff --git a/types/github-username-regex/tsconfig.json b/types/github-username-regex/tsconfig.json new file mode 100644 index 0000000000..4a30cf07ad --- /dev/null +++ b/types/github-username-regex/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "github-username-regex-tests.ts" + ] +} diff --git a/types/github-username-regex/tslint.json b/types/github-username-regex/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/github-username-regex/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From d2cfe0ba3e1ecd6592700b346f4dae4957173e8a Mon Sep 17 00:00:00 2001 From: voxmatt Date: Thu, 19 Oct 2017 16:43:17 -0700 Subject: [PATCH 024/232] fixes for compat mode types when you're straddling modern and classic environments --- types/react-relay/compat.d.ts | 42 +++++++++++++---- types/react-relay/test/react-relay-tests.tsx | 47 +++++++++++++++++++- 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/types/react-relay/compat.d.ts b/types/react-relay/compat.d.ts index d214e451ae..527ef6fa42 100644 --- a/types/react-relay/compat.d.ts +++ b/types/react-relay/compat.d.ts @@ -1,13 +1,13 @@ export { QueryRenderer, - commitMutation, - createFragmentContainer, - createPaginationContainer, - createRefetchContainer, fetchQuery, graphql, } from "./index"; - +import { + ConnectionConfig, + RelayPaginationProp as RelayModernPaginationProp, + RelayRefetchProp as RelayModernRefetchProp +} from "./index"; import * as RelayRuntimeTypes from "relay-runtime"; import { RelayEnvironmentInterface } from "./classic"; @@ -33,34 +33,58 @@ export type ReactFragmentComponent = ComponentWithFragment | StatelessWith export type ReactBaseComponent = React.ComponentClass | React.StatelessComponent; export type RelayClassicEnvironment = RelayEnvironmentInterface; + // ~~~~~~~~~~~~~~~~~~~~~ // RelayCompatTypes // ~~~~~~~~~~~~~~~~~~~~~ export type CompatEnvironment = RelayRuntimeTypes.Environment | RelayClassicEnvironment; +// ~~~~~~~~~~~~~~~~~~~~~ +// RelayProps +// ~~~~~~~~~~~~~~~~~~~~~ +export interface RelayProp { + environment: CompatEnvironment; +} + +export type RelayPaginationProp = RelayModernPaginationProp & RelayProp; +export type RelayRefetchProp = RelayModernRefetchProp & RelayProp; + // ~~~~~~~~~~~~~~~~~~~~~ // RelayCompatMutations // ~~~~~~~~~~~~~~~~~~~~~ -export function commitUpdate( +export function commitMutation( environment: CompatEnvironment, config: RelayRuntimeTypes.MutationConfig ): RelayRuntimeTypes.Disposable; -export function applyUpdate( +export function applyOptimisticMutation( environment: CompatEnvironment, config: RelayRuntimeTypes.OptimisticMutationConfig ): RelayRuntimeTypes.Disposable; // ~~~~~~~~~~~~~~~~~~~~~ -// RelayCompatContainer +// RelayCompatContainers // ~~~~~~~~~~~~~~~~~~~~~ export interface GeneratedNodeMap { [key: string]: RelayRuntimeTypes.GraphQLTaggedNode; } -export function createContainer( + +export function createFragmentContainer( Component: ReactBaseComponent, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap ): ReactFragmentComponent; +export function createRefetchContainer( + Component: ReactBaseComponent, + fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, + taggedNode: RelayRuntimeTypes.GraphQLTaggedNode +): ReactFragmentComponent; + +export function createPaginationContainer( + Component: ReactBaseComponent, + fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, + connectionConfig: ConnectionConfig +): ReactFragmentComponent; + // ~~~~~~~~~~~~~~~~~~~~~ // injectDefaultVariablesProvider // ~~~~~~~~~~~~~~~~~~~~~ diff --git a/types/react-relay/test/react-relay-tests.tsx b/types/react-relay/test/react-relay-tests.tsx index 6caf997dba..612df078a1 100644 --- a/types/react-relay/test/react-relay-tests.tsx +++ b/types/react-relay/test/react-relay-tests.tsx @@ -332,9 +332,53 @@ requestSubscription( import { QueryRenderer as CompatQueryRenderer, createFragmentContainer as createFragmentContainerCompat, + commitMutation as commitMutationCompat, + CompatEnvironment, + RelayPaginationProp as RelayPaginationPropCompat, } from "react-relay/compat"; -// TODO? This is all more or less identical to modern... +// testting compat mutation with classic environment +function markNotificationAsReadCompat(environment: CompatEnvironment, source: string, storyID: string) { + const variables = { + input: { + source, + storyID, + }, + }; + + commitMutationCompat(environment, { + configs, + mutation, + optimisticResponse, + variables, + onCompleted: (response, errors) => { + console.log("Response received from server."); + }, + onError: err => console.error(err), + updater: (store, data) => { + const field = store.get(storyID); + if (field) { + field.setValue(data.story, "story"); + } + } + }); +} + +interface CompatProps { + relay: RelayPaginationPropCompat; +} + +export class CompatComponent extends React.Component { + markNotificationAsRead(source: string, storyID: string) { + markNotificationAsReadCompat(this.props.relay.environment, source, storyID); + } + + render() { + return (
); + } +} + +const CompatContainer = createFragmentContainerCompat(CompatComponent, {}); //////////////////////////// // RELAY-CLASSIC TESTS @@ -398,6 +442,7 @@ const ArtworkContainer = Relay.createContainer(Artwork, { artwork: () => Relay.QL` fragment on Artwork { title + ${ CompatContainer.getFragment('whatever') } } `, }, From f697a7ca1db4ca1a2a26c7379b4d6231caf8a628 Mon Sep 17 00:00:00 2001 From: voxmatt Date: Thu, 19 Oct 2017 16:59:00 -0700 Subject: [PATCH 025/232] fixing linting errors surfaced by Travis --- types/react-relay/compat.d.ts | 1 - types/react-relay/test/react-relay-tests.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/types/react-relay/compat.d.ts b/types/react-relay/compat.d.ts index 527ef6fa42..22585d03d0 100644 --- a/types/react-relay/compat.d.ts +++ b/types/react-relay/compat.d.ts @@ -33,7 +33,6 @@ export type ReactFragmentComponent = ComponentWithFragment | StatelessWith export type ReactBaseComponent = React.ComponentClass | React.StatelessComponent; export type RelayClassicEnvironment = RelayEnvironmentInterface; - // ~~~~~~~~~~~~~~~~~~~~~ // RelayCompatTypes // ~~~~~~~~~~~~~~~~~~~~~ diff --git a/types/react-relay/test/react-relay-tests.tsx b/types/react-relay/test/react-relay-tests.tsx index 612df078a1..f73b7c00c7 100644 --- a/types/react-relay/test/react-relay-tests.tsx +++ b/types/react-relay/test/react-relay-tests.tsx @@ -368,7 +368,7 @@ interface CompatProps { relay: RelayPaginationPropCompat; } -export class CompatComponent extends React.Component { +export class CompatComponent extends React.Component { markNotificationAsRead(source: string, storyID: string) { markNotificationAsReadCompat(this.props.relay.environment, source, storyID); } From 6deecd5aaf40a74c1ba43911ee1ffab97e4fca17 Mon Sep 17 00:00:00 2001 From: Viktor Isaev Date: Fri, 20 Oct 2017 17:09:01 +0300 Subject: [PATCH 026/232] Fixed types in "restify-cookies". (#20752) * Added typings for "require-dir". * Fixed dtslint errors. * Fixed By field. * Added typings for "restify-cookies". * Added "cookies" field to Request interface. * Added typings for "heapdump". * Fixed types in "restify-cookies". * Added sameSite field to types in "restify-cookies". * Bumped version for "restify-cookies". * Fixed version for "restify-cookies". --- types/restify-cookies/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/restify-cookies/index.d.ts b/types/restify-cookies/index.d.ts index 7e794855cb..8f00f97538 100644 --- a/types/restify-cookies/index.d.ts +++ b/types/restify-cookies/index.d.ts @@ -11,9 +11,10 @@ declare module 'restify' { maxAge?: number; domain?: string; path?: string; - expires?: string; + expires?: Date; httpOnly?: boolean; secure?: boolean; + sameSite?: boolean|'lax'|'strict'; } interface Request { From 7239c6a38d1454aeb7ecffa297292de9a96da6c3 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 20 Oct 2017 17:21:38 +0300 Subject: [PATCH 027/232] new definition for youtube-dl (#20428) * new definition for youtube-dl * Could not parse version 2.5 * fixes * fixes * fixes * fixes * fixes * fixes * Prefer /// * few fixes * fixes * assert info: youtubedl.Info * fixes --- types/youtube-dl/index.d.ts | 22 ++++++++++++++++++++++ types/youtube-dl/tsconfig.json | 21 +++++++++++++++++++++ types/youtube-dl/tslint.json | 1 + types/youtube-dl/youtube-dl-tests.ts | 18 ++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 types/youtube-dl/index.d.ts create mode 100644 types/youtube-dl/tsconfig.json create mode 100644 types/youtube-dl/tslint.json create mode 100644 types/youtube-dl/youtube-dl-tests.ts diff --git a/types/youtube-dl/index.d.ts b/types/youtube-dl/index.d.ts new file mode 100644 index 0000000000..4daf21884b --- /dev/null +++ b/types/youtube-dl/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for youtube-dl 1.12 +// Project: https://www.npmjs.com/package/youtube-dl +// Definitions by: Bogdan Surai +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// +import * as fs from "fs"; + +export = youtubedl; +declare function youtubedl(url: string, arg: string[], opt: {[key: string]: string}): youtubedl.Youtubedl; +declare namespace youtubedl { + interface Youtubedl { + on(event: string, func: (info: Info) => void): this; + pipe(stream: fs.WriteStream): this; + } + interface Info { + _filename: string; + filename: string; + size: number; + } +} diff --git a/types/youtube-dl/tsconfig.json b/types/youtube-dl/tsconfig.json new file mode 100644 index 0000000000..2634bd2234 --- /dev/null +++ b/types/youtube-dl/tsconfig.json @@ -0,0 +1,21 @@ +{ + "files": [ + "index.d.ts", + "youtube-dl-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/types/youtube-dl/tslint.json b/types/youtube-dl/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/youtube-dl/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/youtube-dl/youtube-dl-tests.ts b/types/youtube-dl/youtube-dl-tests.ts new file mode 100644 index 0000000000..c85b1ffc92 --- /dev/null +++ b/types/youtube-dl/youtube-dl-tests.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import youtubedl = require('youtube-dl'); + +const video = youtubedl('http://www.youtube.com/watch?v=90AiXO1pAiA', + // Optional arguments passed to youtube-dl. + ['--format=18'], + // Additional options can be given for calling `child_process.execFile()`. + { cwd: __dirname }); + +// Will be called when the download starts. +video.on('info', (info: youtubedl.Info) => { + console.log('Download started'); + console.log('_filename: ' + info._filename); + console.log('filename: ' + info.filename); + console.log('size: ' + info.size); +}); + +video.pipe(fs.createWriteStream('myvideo.mp4')); From 490c4210d68c8bb0b271b39695eec76016cebbf4 Mon Sep 17 00:00:00 2001 From: Philipp Shestakov Date: Fri, 20 Oct 2017 17:25:57 +0300 Subject: [PATCH 028/232] Added definitions for clusterize.js (#20738) * Added definitions for clusterize.js * Fixed definitions author. * Review fixes. * Review fix. --- types/clusterize.js/clusterize.js-tests.ts | 20 +++++++++++ types/clusterize.js/index.d.ts | 41 ++++++++++++++++++++++ types/clusterize.js/tsconfig.json | 23 ++++++++++++ types/clusterize.js/tslint.json | 1 + 4 files changed, 85 insertions(+) create mode 100644 types/clusterize.js/clusterize.js-tests.ts create mode 100644 types/clusterize.js/index.d.ts create mode 100644 types/clusterize.js/tsconfig.json create mode 100644 types/clusterize.js/tslint.json diff --git a/types/clusterize.js/clusterize.js-tests.ts b/types/clusterize.js/clusterize.js-tests.ts new file mode 100644 index 0000000000..acbfbc36f8 --- /dev/null +++ b/types/clusterize.js/clusterize.js-tests.ts @@ -0,0 +1,20 @@ +import Clusterize = require('clusterize.js'); + +const options: Clusterize.Options = { contentId: '', scrollId: '' }; +const clusterize = new Clusterize(options); + +clusterize.append(['
  • ']); + +clusterize.prepend(['
  • ']); + +clusterize.getRowsAmount(); + +clusterize.update(['
  • ']); + +clusterize.getScrollProgress(); + +clusterize.refresh(); + +clusterize.clear(); + +clusterize.destroy(); diff --git a/types/clusterize.js/index.d.ts b/types/clusterize.js/index.d.ts new file mode 100644 index 0000000000..7c549761d6 --- /dev/null +++ b/types/clusterize.js/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for clusterize.js 0.17 +// Project: https://github.com/NeXTs/Clusterize.js +// Definitions by: Pr1st0n +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class Clusterize { + constructor(options: Clusterize.Options); + + destroy(clean?: boolean): void; + refresh(force?: boolean): void; + clear(): void; + getRowsAmount(): number; + getScrollProgress(): number; + update(data?: string[]): void; + append(rows: string[]): void; + prepend(rows: string[]): void; +} + +declare namespace Clusterize { + interface Options { + scrollId: string; + contentId: string; + rows?: string[]; + tag?: string; + rows_in_block?: number; + blocks_in_cluster?: number; + show_no_data_row?: boolean; + no_data_text?: string; + no_data_class?: string; + keep_parity?: boolean; + callbacks?: Callbacks; + } + + interface Callbacks { + clusterWillChange?(cb: () => void): void; + clusterChanged?(cb: () => void): void; + scrollingProgress?(cb: (progress: number) => void): void; + } +} + +export = Clusterize; diff --git a/types/clusterize.js/tsconfig.json b/types/clusterize.js/tsconfig.json new file mode 100644 index 0000000000..10ca5c2a1a --- /dev/null +++ b/types/clusterize.js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clusterize.js-tests.ts" + ] +} diff --git a/types/clusterize.js/tslint.json b/types/clusterize.js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/clusterize.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ed5cfecfd7ae7ce0a4a2c6911ffa4f5c05fbef83 Mon Sep 17 00:00:00 2001 From: Jacek Dargiel Date: Fri, 20 Oct 2017 17:17:25 +0200 Subject: [PATCH 029/232] Add ChartLayoutOptions (#20758) --- types/chart.js/index.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 78f1aa6142..7d416ff6c5 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -160,6 +160,7 @@ declare namespace Chart { hover?: ChartHoverOptions; animation?: ChartAnimationOptions; elements?: ChartElementsOptions; + layout?: ChartLayoutOptions; scales?: ChartScales; showLines?: boolean; spanGaps?: boolean; @@ -312,6 +313,18 @@ declare namespace Chart { borderColor?: ChartColor; borderSkipped?: string; } + + interface ChartLayoutOptions { + padding?: ChartLayoutPaddingObject | number; + } + + interface ChartLayoutPaddingObject { + top?: number; + right?: number; + bottom?: number; + left?: number; + } + interface GridLineOptions { display?: boolean; color?: ChartColor; From 2753c44ac158c13db00c111153195062ca23df36 Mon Sep 17 00:00:00 2001 From: Nikolay Solovyov Date: Fri, 20 Oct 2017 18:17:49 +0300 Subject: [PATCH 030/232] Update index.d.ts (#20756) `activeIndex` and `activeShape` is optional parameters. Also, `activeIndex` can contains numbers and array of numbers, not an array of any. --- types/recharts/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 95656a7247..404fe5c444 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -345,8 +345,8 @@ export interface PieProps extends Partial { label?: boolean | any | React.ReactElement | RechartsFunction; labelLine?: boolean | any | React.ReactElement | RechartsFunction; data: any[]; - activeIndex: any[]; - activeShape: any | React.ReactElement | RechartsFunction; + activeIndex?: number | number[]; + activeShape?: any | React.ReactElement | RechartsFunction; isAnimationActive?: boolean; animationBegin?: number; animationEasing?: AnimationEasingType | RechartsFunction; From a41f8d2ddd0d325a0da5fb0b996da6897f8f50ae Mon Sep 17 00:00:00 2001 From: Piotr Roszatycki Date: Fri, 20 Oct 2017 17:21:44 +0200 Subject: [PATCH 031/232] nodemailer: version 4.2 (#20754) --- types/nodemailer/index.d.ts | 2 +- types/nodemailer/lib/smtp-connection.d.ts | 6 ++++++ types/nodemailer/nodemailer-tests.ts | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/nodemailer/index.d.ts b/types/nodemailer/index.d.ts index da0605ddcf..6a587bb720 100644 --- a/types/nodemailer/index.d.ts +++ b/types/nodemailer/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Nodemailer 4.1 +// Type definitions for Nodemailer 4.2 // Project: https://github.com/nodemailer/nodemailer // Definitions by: Rogier Schouten // Piotr Roszatycki diff --git a/types/nodemailer/lib/smtp-connection.d.ts b/types/nodemailer/lib/smtp-connection.d.ts index a2cb095210..49b1adef8e 100644 --- a/types/nodemailer/lib/smtp-connection.d.ts +++ b/types/nodemailer/lib/smtp-connection.d.ts @@ -88,6 +88,12 @@ declare namespace SMTPConnection { rejectedErrors?: SMTPError[]; /** the last response received from the server */ response: string; + /** how long was envelope prepared */ + envelopeTime: number; + /** how long was send stream prepared */ + messageTime: number; + /** how many bytes were streamed */ + messageSize: number; } interface Options { diff --git a/types/nodemailer/nodemailer-tests.ts b/types/nodemailer/nodemailer-tests.ts index 8baff03674..cb2cd9641f 100644 --- a/types/nodemailer/nodemailer-tests.ts +++ b/types/nodemailer/nodemailer-tests.ts @@ -1036,7 +1036,6 @@ namespace smtp_connection_test { if (err) throw err; connection.send({ from: 'a@example.com', to: 'b@example.net' }, 'message', (err, info) => { if (err) throw err; - console.log(info); connection.reset(() => { if (err) throw err; connection.quit(); From 399af551e6963ceca3b7ad15b0cc14f3708d1d24 Mon Sep 17 00:00:00 2001 From: Diogo Franco Date: Sat, 21 Oct 2017 00:28:12 +0900 Subject: [PATCH 032/232] [react-router] Fix for --strictFunctionTypes (#20746) * [react-router] Fix for --strictFunctionTypes It seems it's not possible for a SFC to conform to React.ComponentType | {}> with both strictFunctionTypes and strictNullChecks (they have to either be `Partial>` or `{}`). The whole point of the `| {}` is to allow for components that have defaulted `Props` / don't use any `Props` anyway, so adding it as another listed type should work. * Fix dtslint errors --- types/react-router/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index bfb5f16e7b..4e547c8341 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -65,7 +65,7 @@ export interface RouteComponentProps

    { export interface RouteProps { location?: H.Location; - component?: React.ComponentType | {}>; + component?: React.ComponentType> | React.ComponentType; render?: ((props: RouteComponentProps) => React.ReactNode); children?: ((props: RouteComponentProps) => React.ReactNode) | React.ReactNode; path?: string; From 25af4237d27e89e49166b007861a8e9ee5370329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Tegelund?= Date: Sat, 21 Oct 2017 00:28:27 +0900 Subject: [PATCH 033/232] Add passHref to Link (#20745) --- types/next/link.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/next/link.d.ts b/types/next/link.d.ts index aca3190f7e..d931dd550d 100644 --- a/types/next/link.d.ts +++ b/types/next/link.d.ts @@ -10,6 +10,7 @@ export interface LinkState { onError?(error: any): void; href?: string | UrlLike; as?: string | UrlLike; + passHref?: boolean; children: React.ReactElement; } From 3bb8a665130be3304a81d52279d0b227f10ebd59 Mon Sep 17 00:00:00 2001 From: Cory Deppen Date: Fri, 20 Oct 2017 10:28:39 -0500 Subject: [PATCH 034/232] [redux-logger] Add optional logEntry param to LoggerPredicate (#20740) * Add optional logEntry param to LoggerPredicate * Enable linting Resolve errors and comply with DT formatting recommendations. --- types/redux-logger/index.d.ts | 64 ++++++---- types/redux-logger/package.json | 2 +- types/redux-logger/redux-logger-tests.ts | 152 ++++++++++++----------- types/redux-logger/tsconfig.json | 16 +-- types/redux-logger/tslint.json | 3 + 5 files changed, 125 insertions(+), 112 deletions(-) create mode 100644 types/redux-logger/tslint.json diff --git a/types/redux-logger/index.d.ts b/types/redux-logger/index.d.ts index d60d3ad218..c8ca66eda0 100644 --- a/types/redux-logger/index.d.ts +++ b/types/redux-logger/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for redux-logger v3.0.0 +// Type definitions for redux-logger 3.0 // Project: https://github.com/fcomb/redux-logger // Definitions by: Alexander Rusakov // Kevin Groat @@ -6,45 +6,59 @@ export as namespace ReduxLogger; -import * as Redux from "redux"; +import * as Redux from 'redux'; export const logger: Redux.Middleware; -export type LoggerPredicate = (getState: () => any, action: any) => boolean; +export type LoggerPredicate = ( + getState: () => any, + action: any, + logEntry?: LogEntryObject +) => boolean; export type StateToString = (state: any) => string; export type ActionToString = (action: any) => string; export type ErrorToString = (error: any, prevState: any) => string; export interface ColorsObject { - title?: boolean | ActionToString; - prevState?: boolean | StateToString; - action?: boolean | ActionToString; - nextState?: boolean | StateToString; - error?: boolean | ErrorToString; + title?: boolean | ActionToString; + prevState?: boolean | StateToString; + action?: boolean | ActionToString; + nextState?: boolean | StateToString; + error?: boolean | ErrorToString; } export interface LevelObject { - prevState?: string | boolean | StateToString; - action?: string | boolean | ActionToString; - nextState?: string | boolean | StateToString; - error?: string | boolean | ErrorToString; + prevState?: string | boolean | StateToString; + action?: string | boolean | ActionToString; + nextState?: string | boolean | StateToString; + error?: string | boolean | ErrorToString; +} + +export interface LogEntryObject { + action?: string | boolean | ActionToString; + started?: number; + startedTime?: Date; + took?: number; + error?(error: any): any; + nextState?(state: any): any; + prevState?(state: any): any; } export interface ReduxLoggerOptions { - level?: string | ActionToString | LevelObject; - duration?: boolean; - timestamp?: boolean; - colors?: ColorsObject | false; - logger?: any; - logErrors?: boolean; - collapsed?: boolean | LoggerPredicate; - predicate?: LoggerPredicate; - stateTransformer?: (state: any) => any; - actionTransformer?: (action: any) => any; - errorTransformer?: (error: any) => any; - diff?: boolean; - diffPredicate?: LoggerPredicate; + level?: string | ActionToString | LevelObject; + duration?: boolean; + timestamp?: boolean; + colors?: ColorsObject | false; + logger?: any; + logErrors?: boolean; + collapsed?: boolean | LoggerPredicate; + predicate?: LoggerPredicate; + diff?: boolean; + diffPredicate?: LoggerPredicate; + stateTransformer?(state: any): any; + actionTransformer?(action: any): any; + errorTransformer?(error: any): any; } export function createLogger(options?: ReduxLoggerOptions): Redux.Middleware; diff --git a/types/redux-logger/package.json b/types/redux-logger/package.json index 4bcc170ca3..6d68bf2f9b 100644 --- a/types/redux-logger/package.json +++ b/types/redux-logger/package.json @@ -3,4 +3,4 @@ "dependencies": { "redux": "^3.6.0" } -} \ No newline at end of file +} diff --git a/types/redux-logger/redux-logger-tests.ts b/types/redux-logger/redux-logger-tests.ts index 7349e556c4..a3b77debd8 100644 --- a/types/redux-logger/redux-logger-tests.ts +++ b/types/redux-logger/redux-logger-tests.ts @@ -1,100 +1,104 @@ - -import { createLogger } from 'redux-logger'; -import logger from 'redux-logger'; +import logger, { createLogger } from 'redux-logger'; import { applyMiddleware, createStore } from 'redux'; -let loggerSimple = createLogger(); +const loggerSimple = createLogger(); -let loggerSimpleOpts = createLogger({ - duration: true, - timestamp: true, - logger: console, - logErrors: true, - predicate: (getState, action) => true, - stateTransformer: (state) => state, - actionTransformer: (action) => action, - errorTransformer: (error) => error, - diff: true, - diffPredicate: (getState, action) => true, +const loggerSimpleOpts = createLogger({ + duration: true, + timestamp: true, + logger: console, + logErrors: true, + predicate: (getState, action) => true, + stateTransformer: state => state, + actionTransformer: action => action, + errorTransformer: error => error, + diff: true, + diffPredicate: (getState, action) => true }); -let loggerCollapsedBool = createLogger({ - collapsed: true +const loggerCollapsedBool = createLogger({ + collapsed: true }); -let loggerCollapsedPredicate = createLogger({ - collapsed: (getAction, action) => true +const loggerCollapsedPredicate = createLogger({ + collapsed: (getAction, action) => true }); -let loggerColorsOverallBoolean = createLogger({ - colors: false +const loggerCollapsedLogEntryPredicate = createLogger({ + collapsed: (getAction, action, logEntry) => + logEntry !== undefined && !logEntry.error }); -let loggerColorsBoolean = createLogger({ - colors: { - title: false, - prevState: false, - action: false, - nextState: false, - error: false - } +const loggerColorsOverallBoolean = createLogger({ + colors: false }); -let loggerColorsFunction = createLogger({ - colors: { - title: (action) => '#000', - prevState: (state) => '#000', - action: (action) => '#000', - nextState: (state) => '#000', - error: (error, prevState) => '#000' - } +const loggerColorsBoolean = createLogger({ + colors: { + title: false, + prevState: false, + action: false, + nextState: false, + error: false + } }); -let loggerLevelString = createLogger({ - level: 'log' +const loggerColorsFunction = createLogger({ + colors: { + title: action => '#000', + prevState: state => '#000', + action: action => '#000', + nextState: state => '#000', + error: (error, prevState) => '#000' + } }); -let loggerLevelFunction = createLogger({ - level: (action) => 'log' +const loggerLevelString = createLogger({ + level: 'log' }); -let loggerLevelObjectFunction = createLogger({ - level: { - prevState: (state) => 'log', - action: (action) => 'log', - nextState: (state) => 'log', - error: (error, prevState) => 'log' - } +const loggerLevelFunction = createLogger({ + level: action => 'log' }); -let loggerLevelObjectBoolean = createLogger({ - level: { - prevState: false, - action: false, - nextState: false, - error: false - } +const loggerLevelObjectFunction = createLogger({ + level: { + prevState: state => 'log', + action: action => 'log', + nextState: state => 'log', + error: (error, prevState) => 'log' + } }); -let loggerLevelObjectString = createLogger({ - level: { - prevState: 'log', - action: 'log', - nextState: 'log', - error: 'log' - } +const loggerLevelObjectBoolean = createLogger({ + level: { + prevState: false, + action: false, + nextState: false, + error: false + } }); -let createStoreWithMiddleware = applyMiddleware( - logger, - loggerSimpleOpts, - loggerCollapsedBool, - loggerCollapsedPredicate, - loggerColorsBoolean, - loggerColorsFunction, - loggerLevelString, - loggerLevelFunction, - loggerLevelObjectFunction, - loggerLevelObjectBoolean, - loggerLevelObjectString +const loggerLevelObjectString = createLogger({ + level: { + prevState: 'log', + action: 'log', + nextState: 'log', + error: 'log' + } +}); + +const createStoreWithMiddleware = applyMiddleware( + logger, + loggerSimpleOpts, + loggerCollapsedBool, + loggerCollapsedPredicate, + loggerCollapsedLogEntryPredicate, + loggerColorsBoolean, + loggerColorsFunction, + loggerLevelString, + loggerLevelFunction, + loggerLevelObjectFunction, + loggerLevelObjectBoolean, + loggerLevelObjectString )(createStore); diff --git a/types/redux-logger/tsconfig.json b/types/redux-logger/tsconfig.json index 7441f646d7..1789641398 100644 --- a/types/redux-logger/tsconfig.json +++ b/types/redux-logger/tsconfig.json @@ -1,24 +1,16 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6", - "dom" - ], + "lib": ["es6", "dom"], "noImplicitAny": true, "noImplicitThis": false, "strictNullChecks": false, "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": [ - "index.d.ts", - "redux-logger-tests.ts" - ] -} \ No newline at end of file + "files": ["index.d.ts", "redux-logger-tests.ts"] +} diff --git a/types/redux-logger/tslint.json b/types/redux-logger/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/redux-logger/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From fee527c10343127ea695ac1370e893d60d0558d6 Mon Sep 17 00:00:00 2001 From: UrielCh Date: Fri, 20 Oct 2017 18:28:54 +0300 Subject: [PATCH 035/232] update CasperJS 1.0.29 to 1.1.4 (#20739) * update CasperJS 1.0.29 to 1.1.4 remove most oh the any type Set Optional parameter As Optional. * tslint casperJS --- types/casperjs/index.d.ts | 173 +++++++++++++++++++++++-------------- types/casperjs/tslint.json | 12 +++ 2 files changed, 119 insertions(+), 66 deletions(-) create mode 100644 types/casperjs/tslint.json diff --git a/types/casperjs/index.d.ts b/types/casperjs/index.d.ts index e8388d17c7..f2378f1f97 100644 --- a/types/casperjs/index.d.ts +++ b/types/casperjs/index.d.ts @@ -1,17 +1,17 @@ -// Type definitions for CasperJS v1.0.29 +// Type definitions for CasperJS 1.1 // Project: http://casperjs.org/ // Definitions by: Jed Mao +// Uriel Chemouni // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// - export function create(options?: CasperOptions): Casper; -export function selectXPath(expression: string): Object; +export function selectXPath(expression: string): object; export class Casper { - constructor(options: CasperOptions); test: Tester; @@ -23,23 +23,23 @@ export class Casper { // Methods back(): Casper; base64encode(url: string, method?: string, data?: any): string; - bypass(nb: number): any; - click(selector: string): boolean; + bypass(nb: number): Casper; + click(selector: string, X?: number | string, Y?: number | string): boolean; clickLabel(label: string, tag?: string): boolean; - capture(targetFilePath: string, clipRect: ClipRect): Casper; - captureBase64(format: string): string; - captureBase64(format: string, area: string): string; - captureBase64(format: string, area: ClipRect): string; - captureBase64(format: string, area: any): string; - captureSelector(targetFile: string, selector: string): Casper; + capture(targetFilePath: string, clipRect?: ClipRect, imgOptions?: ImgOptions): Casper; + captureBase64(format: string, area?: string | ClipRect | CasperSelector): string; + captureSelector(targetFile: string, selector: string, imgOptions?: ImgOptions): Casper; clear(): Casper; + clearCache(): Casper; + clearMemoryCache(): Casper; debugHTML(selector?: string, outer?: boolean): Casper; debugPage(): Casper; die(message: string, status?: number): Casper; - download(url: string, target?: string, method?: string, data?: any): Casper; + download(url: string, target: string, method?: string, data?: any): Casper; each(array: T[], fn: (this: Casper, item: T, index: number) => void): Casper; + eachThen(array: any[], then?: FunctionThen): Casper; echo(message: string, style?: string): Casper; - evaluate(fn: (...args: any[]) => T, ...args: any[]): T + evaluate(fn: (...args: any[]) => T, ...args: any[]): T; evaluateOrDie(fn: () => any, message?: string, status?: number): Casper; exit(status?: number): Casper; exists(selector: string): boolean; @@ -52,7 +52,7 @@ export class Casper { getCurrentUrl(): string; getElementAttribute(selector: string, attribute: string): string; getElementsAttribute(selector: string, attribute: string): string; - getElementBounds(selector: string): ElementBounds; + getElementBounds(selector: string, page?: boolean): ElementBounds | null; getElementsBounds(selector: string): ElementBounds[]; getElementInfo(selector: string): ElementInfo; getElementsInfo(selector: string): ElementInfo; @@ -61,83 +61,125 @@ export class Casper { getHTML(selector?: string, outer?: boolean): string; getPageContent(): string; getTitle(): string; - mouseEvent(type: string, selector: string): boolean; + mouseEvent(type: string, selector: string, X?: number|string, Y?: number|string): boolean; + newPage(): any; open(location: string, settings: OpenSettings): Casper; - reload(then?: (response: HttpResponse) => void): Casper; - repeat(times: number, then: Function): Casper; - resourceExists(test: Function): boolean; - resourceExists(test: string): boolean; - run(onComplete: Function, time?: number): Casper; + reload(then?: FunctionThen): Casper; + repeat(times: number, then: FunctionThen): Casper; + resourceExists(test: string | Function | RegExp): boolean; + run(onComplete?: Function, time?: number): Casper; scrollTo(x: number, y: number): Casper; scrollToBottom(): Casper; - sendKeys(selector: string, keys: string, options?: any): Casper; + sendKeys(selector: string, keys: string, options?: KeyOptions): Casper; setHttpAuth(username: string, password: string): Casper; - start(url?: string, then?: (response: HttpResponse) => void): Casper; - status(asString: boolean): any; + setMaxListeners(maxListeners: number): Casper; + start(url?: string, then?: FunctionThen): Casper; + status(asString?: false): number; + status(asString: true): string; + switchToFrame(frameInfo: string | number): Casper; + switchToMainFrame(): Casper; + switchToParentFrame(): Casper; then(fn: (this: Casper) => void): Casper; thenBypass(nb: number): Casper; thenBypassIf(condition: any, nb: number): Casper; thenBypassUnless(condition: any, nb: number): Casper; - thenClick(selector: string): Casper; + thenClick(selector: string, then?: FunctionThen): Casper; thenEvaluate(fn: () => any, ...args: any[]): Casper; thenOpen(location: string, then?: (response: HttpResponse) => void): Casper; thenOpen(location: string, options?: OpenSettings, then?: (response: HttpResponse) => void): Casper; - thenOpenAndEvaluate(location: string, then?: Function, ...args: any[]): Casper; + thenOpenAndEvaluate(location: string, then?: FunctionThen, ...args: any[]): Casper; toString(): string; unwait(): Casper; - userAgent(agent: string): string; - viewport(width: number, height: number): Casper; + // 2017-10-19 Doc said returning String but code return Casper object. + userAgent(agent: string): Casper; + viewport(width: number, height: number, then?: FunctionThen): Casper; visible(selector: string): boolean; - wait(timeout: number, then?: Function): Casper; - waitFor(testFx: Function, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForAlert(then: Function, onTimeout?: Function, timeout?: number): Casper; - waitForPopup(urlPattern: string, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForPopup(urlPattern: RegExp, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForUrl(url: string, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForUrl(url: RegExp, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForSelector(selector: string, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitWhileSelector(selector: string, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForResource(testFx: Function, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForText(pattern: string, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitForText(pattern: RegExp, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitUntilVisible(selector: string, then?: Function, onTimeout?: Function, timeout?: number): Casper; - waitWhileVisible(selector: string, then?: Function, onTimeout?: Function, timeout?: number): Casper; + wait(timeout: number, then?: FunctionThen): Casper; + waitFor(testFx: Function, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number, details?: any): Casper; + waitForAlert(then: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitForExec(command: string | null, parameter: string[], then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitForPopup(urlPattern: RegExp | string | number | FindByUrlNameTitle, then?: FunctionThen, onTimeout?: Function, timeout?: number): Casper; + waitForResource(testFx: RegExp | string | ((resource: {url: string}) => boolean), then?: FunctionThen, onTimeout?: Function, timeout?: number): Casper; + waitForUrl(url: RegExp | string, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitForSelector(selector: string, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitWhileSelector(selector: string, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitForSelectorTextChange(selectors: string, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitForText(pattern: RegExp | string, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitUntilVisible(selector: string, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; + waitWhileVisible(selector: string, then?: FunctionThen, onTimeout?: FunctionOnTimeout, timeout?: number): Casper; warn(message: string): Casper; - withFrame(frameInfo: string, then: Function): Casper; - withFrame(frameInfo: number, then: Function): Casper; - withPopup(popupInfo: string, step: Function): Casper; - withPopup(popupInfo: RegExp, step: Function): Casper; + withFrame(frameInfo: string | number, then: FunctionThen): Casper; + withPopup(popupInfo: RegExp | string | number | FindByUrlNameTitle, step: FunctionThen): Casper; + withSelectorScope(selector: string, then: FunctionThen): Casper; zoom(factor: number): Casper; - removeAllFilters(filter: string): Casper; - setFilter(filter: string, cb: Function): boolean; + // do not exists anymore + // removeAllFilters(filter: string): Casper; + // do not exists anymore + // setFilter(filter: string, cb: Function): boolean; } -interface HttpResponse { +export type FunctionThen = (this: Casper, response: HttpResponse) => void; +export type FunctionOnTimeout = (this: Casper, timeout: number, details: any) => void; +// not visible in doc +// interface QtRuntimeObject {id?: any; url?: string;} +// see modules/pagestack.js in casperjs + +export interface ImgOptions { + // format to set the image format manually, avoiding relying on the filename + format?: string; + // quality to set the image quality, from 1 to 100 + quality?: number; +} + +export interface FindByUrlNameTitle { + url?: string; + title?: string; + windowName?: string; +} + +export interface Header { + name: string; + value: string; +} + +export interface CasperSelector { + type?: 'xpath' | 'css'; + path: string; +} + +export interface KeyOptions { + reset?: boolean; + keepFocus?: boolean; + modifiers?: string; // combinaison of 'ctrl+alt+shift+meta+keypad' +} + +export interface HttpResponse { contentType: string; - headers: any[]; + headers: Header[]; id: number; - redirectURL: string; + redirectURL: string | null; stage: string; status: number; statusText: string; time: string; url: string; + data: any; } -interface OpenSettings { +export interface OpenSettings { method: string; data: any; headers: any; } -interface ElementBounds { +export interface ElementBounds { top: number; left: number; width: number; height: number; } -interface ElementInfo { +export interface ElementInfo { nodeName: string; attributes: any; tag: string; @@ -150,7 +192,7 @@ interface ElementInfo { visible: boolean; } -interface CasperOptions { +export interface CasperOptions { clientScripts?: any[]; exitOnError?: boolean; httpStatusHandlers?: any; @@ -179,7 +221,7 @@ interface CasperOptions { waitTimeout?: number; } -interface ClientUtils { +export interface ClientUtils { echo(message: string): void; encode(contents: string): void; exists(selector: string): void; @@ -200,12 +242,12 @@ interface ClientUtils { visible(selector: string): void; } -interface Colorizer { +export interface Colorizer { colorize(text: string, styleName: string): void; format(text: string, style: any): void; } -interface Tester { +export interface Tester { assert(condition: boolean, message?: string): any; assertDoesntExist(selector: string, message?: string): any; assertElementCount(selctor: string, expected: number, message?: string): any; @@ -235,15 +277,14 @@ interface Tester { assertTruthy(subject: any, message?: string): any; assertType(input: any, type: string, message?: string): any; assertInstanceOf(input: any, ctor: Function, message?: string): any; - assertUrlMatch(pattern: string, message?: string): any; - assertUrlMatch(pattern: RegExp, message?: string): any; + assertUrlMatch(pattern: RegExp | string, message?: string): any; assertVisible(selector: string, message?: string): any; /* since 1.1 */ begin(description: string, planned: number, suite: Function): any; begin(description: string, suite: Function): any; - begin(description: string, planned: number, config: Object): any; - begin(description: string, config: Object): any; + begin(description: string, planned: number, config: object): any; + begin(description: string, config: object): any; colorize(message: string, style: string): any; comment(message: string): any; @@ -262,12 +303,12 @@ interface Tester { tearDown(fn: Function): any; } -interface Cases { +export interface Cases { length: number; cases: Case[]; } -interface Case { +export interface Case { success: boolean; type: string; standard: string; @@ -275,12 +316,12 @@ interface Case { values: CaseValues; } -interface CaseValues { +export interface CaseValues { subject: boolean; expected: boolean; } -interface Utils { +export interface Utils { betterTypeOf(input: any): any; dump(value: any): any; fileExt(file: string): any; diff --git a/types/casperjs/tslint.json b/types/casperjs/tslint.json new file mode 100644 index 0000000000..c2a140228c --- /dev/null +++ b/types/casperjs/tslint.json @@ -0,0 +1,12 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // need to fix some Function type + "ban-types": false, + // can not merge + // begin(description: string, planned: number, suite: Function): any; + // and + // begin(description: string, planned: number, config: object): any; + "unified-signatures": false + } +} From 09b08e4b7d90608d4849bfd7aecc937860314ea9 Mon Sep 17 00:00:00 2001 From: Alessandro Vergani Date: Fri, 20 Oct 2017 18:10:45 +0200 Subject: [PATCH 036/232] Fix circular-json declarations to match JSON object (#20755) * Fix circular-json declarations * Simplify definitions of circular-json --- types/circular-json/circular-json-tests.ts | 10 +++------- types/circular-json/index.d.ts | 13 +++---------- types/circular-json/tslint.json | 3 +++ 3 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 types/circular-json/tslint.json diff --git a/types/circular-json/circular-json-tests.ts b/types/circular-json/circular-json-tests.ts index 41ec8f0a36..786ec5cec6 100644 --- a/types/circular-json/circular-json-tests.ts +++ b/types/circular-json/circular-json-tests.ts @@ -1,14 +1,10 @@ - import CircularJSON = require('circular-json'); -var replacer = (key: any, val: any) => { +const replacer = (key: any, val: any) => { return val; -} +}; -var replacerArray = ['a', 'x']; - -// implements JSON interface -var json_obj: JSON = CircularJSON; +const replacerArray = ['a', 'x']; CircularJSON.parse('{"a":"b"}'); diff --git a/types/circular-json/index.d.ts b/types/circular-json/index.d.ts index 1b4e5c1d2b..ce94972de4 100644 --- a/types/circular-json/index.d.ts +++ b/types/circular-json/index.d.ts @@ -1,14 +1,7 @@ -// Type definitions for circular-json v0.1.6 +// Type definitions for circular-json 0.4 // Project: https://github.com/WebReflection/circular-json // Definitions by: Jonathan Pevarnek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface ICircularJSON extends JSON { - parse(text: string, reviver?: (key: any, value: any) => any): any; - stringify(value: any, replacer?: ((key: string, value: any) => any) | any[], space?: any, placeholder?: boolean): string; -} - -declare var CircularJSON: ICircularJSON; - -export = CircularJSON; +export function parse(text: string, reviver?: (key: any, value: any) => any): any; +export function stringify(value: any, replacer?: ((key: string, value: any) => any) | Array | null, space?: any, placeholder?: boolean): string; diff --git a/types/circular-json/tslint.json b/types/circular-json/tslint.json new file mode 100644 index 0000000000..b4b47a0378 --- /dev/null +++ b/types/circular-json/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From bba52abf8e508948643f09549b9b9fde025a4f33 Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 20 Oct 2017 10:00:14 -0700 Subject: [PATCH 037/232] js-data-angular and js-data-http: Add dependency on the old @types/js-data (#20689) --- types/js-data-angular/package.json | 6 ++++++ types/js-data-http/package.json | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 types/js-data-angular/package.json create mode 100644 types/js-data-http/package.json diff --git a/types/js-data-angular/package.json b/types/js-data-angular/package.json new file mode 100644 index 0000000000..f932c0aa52 --- /dev/null +++ b/types/js-data-angular/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "@types/js-data": "^2.8.31" + } +} diff --git a/types/js-data-http/package.json b/types/js-data-http/package.json new file mode 100644 index 0000000000..f932c0aa52 --- /dev/null +++ b/types/js-data-http/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "@types/js-data": "^2.8.31" + } +} From ab68c62063e2289fcf636ab9d2f3aa4f7b3ddc9a Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 20 Oct 2017 10:00:53 -0700 Subject: [PATCH 038/232] signals: Lint (#20648) --- types/signals/index.d.ts | 24 ++-- types/signals/signals-tests.ts | 206 ++++++++++++++++----------------- types/signals/tslint.json | 8 ++ 3 files changed, 125 insertions(+), 113 deletions(-) create mode 100644 types/signals/tslint.json diff --git a/types/signals/index.d.ts b/types/signals/index.d.ts index 3f0ed1fa84..50982ec988 100644 --- a/types/signals/index.d.ts +++ b/types/signals/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for JS-Signals +// Type definitions for JS-Signals 1.0 // Project: http://millermedeiros.github.io/js-signals/ // Definitions by: Diullei Gomes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare var signals: signals.SignalWrapper; @@ -9,9 +10,8 @@ export = signals; export as namespace signals; declare namespace signals { - interface SignalWrapper { - Signal: Signal + Signal: Signal; } interface SignalBinding { @@ -57,17 +57,21 @@ declare namespace signals { * * @param listener Signal handler function. * @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) + * @param priority The priority level of the event listener. + * Listeners with higher priority will be executed before listeners with lower priority. + * Listeners with same priority level will be executed at the same order as they were added. (default = 0) */ add(listener: (...params: T[]) => void, listenerContext?: any, priority?: Number): SignalBinding; /** - * Add listener to the signal that should be removed after first execution (will be executed only once). - * - * @param listener Signal handler function. - * @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) - */ + * Add listener to the signal that should be removed after first execution (will be executed only once). + * + * @param listener Signal handler function. + * @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function). + * @param priority The priority level of the event listener. + * Listeners with higher priority will be executed before listeners with lower priority. + * Listeners with same priority level will be executed at the same order as they were added. (default = 0) + */ addOnce(listener: (...params: T[]) => void, listenerContext?: any, priority?: Number): SignalBinding; /** diff --git a/types/signals/signals-tests.ts b/types/signals/signals-tests.ts index 414b91edd7..b3d16d9d39 100644 --- a/types/signals/signals-tests.ts +++ b/types/signals/signals-tests.ts @@ -1,207 +1,207 @@ import signals = require("signals"); // lifted from https://github.com/millermedeiros/js-signals/wiki/Examples interface TestObject { - started: signals.Signal; - stopped: signals.Signal; + started: signals.Signal; + stopped: signals.Signal; } -namespace Signals.Tests { - //store local reference for brevity - var Signal = signals.Signal; +function tests() { + // store local reference for brevity + const Signal = signals.Signal; - //custom object that dispatch signals - var myObject: TestObject = { - started : new Signal(), //past tense is the recommended signal naming convention + // custom object that dispatch signals + const myObject: TestObject = { + started : new Signal(), // past tense is the recommended signal naming convention stopped : new Signal() }; - //single listener - function onStarted(param1:string, param2:string){ + // single listener + function onStarted(param1: string, param2: string) { alert(param1 + param2); } - myObject.started.add(onStarted); //add listener - myObject.started.dispatch('foo', 'bar'); //dispatch signal passing custom parameters - myObject.started.remove(onStarted); //remove a single listener + myObject.started.add(onStarted); // add listener + myObject.started.dispatch('foo', 'bar'); // dispatch signal passing custom parameters + myObject.started.remove(onStarted); // remove a single listener - //multiple listeners - function onStopped(){ + // multiple listeners + function onStopped() { alert('stopped'); } - function onStopped2(){ + function onStopped2() { alert('stopped listener 2'); } myObject.stopped.add(onStopped); myObject.stopped.add(onStopped2); myObject.stopped.dispatch(); - myObject.stopped.removeAll(); //remove all listeners of the `stopped` signal + myObject.stopped.removeAll(); // remove all listeners of the `stopped` signal - //multiple dispatches - var i = 0; - myObject.started.add(function(){ + // multiple dispatches + let i = 0; + myObject.started.add(() => { i += 1; alert(i); }); - myObject.started.dispatch(); //will alert 1 - myObject.started.dispatch(); //will alert 2 + myObject.started.dispatch(); // will alert 1 + myObject.started.dispatch(); // will alert 2 - //multiple dispatches + addOnce() - var i = 0; - myObject.started.addOnce(function(){ + // multiple dispatches + addOnce() + i = 0; + myObject.started.addOnce(() => { i += 1; alert(i); }); - myObject.started.dispatch(); //will alert 1 - myObject.started.dispatch(); //nothing happens + myObject.started.dispatch(); // will alert 1 + myObject.started.dispatch(); // nothing happens - //enable/disable signal - var i = 0; - myObject.started.add(function(){ + // enable/disable signal + i = 0; + myObject.started.add(() => { i += 1; alert(i); }); - myObject.started.dispatch(); //will alert 1 + myObject.started.dispatch(); // will alert 1 myObject.started.active = false; - myObject.started.dispatch(); //nothing happens + myObject.started.dispatch(); // nothing happens myObject.started.active = true; - myObject.started.dispatch(); //will alert 2 + myObject.started.dispatch(); // will alert 2 - //Stop/Halt Propagation (method 1) - myObject.started.add(function(){ - myObject.started.halt(); //prevent next listeners on the queue from being executed + // Stop/Halt Propagation (method 1) + myObject.started.add(() => { + myObject.started.halt(); // prevent next listeners on the queue from being executed }); - myObject.started.add(function(){ - alert('second listener'); //won't be called since first listener stops propagation + myObject.started.add(() => { + alert('second listener'); // won't be called since first listener stops propagation }); myObject.started.dispatch(); - //Stop/Halt Propagation (method 2) - myObject.started.add(function(){ - return false; //if handler returns `false` will also stop propagation + // Stop/Halt Propagation (method 2) + myObject.started.add(() => { + return false; // if handler returns `false` will also stop propagation }); - myObject.started.add(function(){ - alert('second listener'); //won't be called since first listener stops propagation + myObject.started.add(() => { + alert('second listener'); // won't be called since first listener stops propagation }); myObject.started.dispatch(); - //Set execution context of the listener handler - var foo = 'bar'; - var obj = { + // Set execution context of the listener handler + const foo = 'bar'; + const obj = { foo : 10 }; - function handler1(){ + function handler1() { alert(this.foo); } - function handler2(){ + function handler2() { alert(this.foo); } - //note that you cannot add the same handler twice to the same signal without removing it first - myObject.started.add(handler1); //default execution context - myObject.started.add(handler2, obj); //set a different execution context - myObject.started.dispatch(); //first handler will alert "bar", second will alert "10". + // note that you cannot add the same handler twice to the same signal without removing it first + myObject.started.add(handler1); // default execution context + myObject.started.add(handler2, obj); // set a different execution context + myObject.started.dispatch(); // first handler will alert "bar", second will alert "10". } -namespace Signals.AdvancedTests { - //store local reference for brevity - var Signal = signals.Signal; +function advancedTests() { + // store local reference for brevity + const Signal = signals.Signal; - //custom object that dispatch signals - var myObject: TestObject = { - started : new Signal(), //past tense is the recommended signal naming convention + // custom object that dispatch signals + const myObject: TestObject = { + started : new Signal(), // past tense is the recommended signal naming convention stopped : new Signal() }; - //Set listener priority/order (v0.5.3+) - var handler1 = function(){ + // Set listener priority/order (v0.5.3+) + let handler1 = () => { alert('foo'); }; - var handler2 = function(){ + let handler2 = () => { alert('bar'); }; - myObject.started.add(handler1); //default priority is 0 - myObject.started.add(handler2, null, 2); //setting priority to 2 will make `handler2` execute before `handler1` - myObject.started.dispatch(); //will alert "bar" than "foo" + myObject.started.add(handler1); // default priority is 0 + myObject.started.add(handler2, null, 2); // setting priority to 2 will make `handler2` execute before `handler1` + myObject.started.dispatch(); // will alert "bar" than "foo" - //Enable/Disable a single SignalBinding - var handler1 = function(){ + // Enable/Disable a single SignalBinding + handler1 = () => { alert('foo bar'); }; - var handler2 = function(){ + handler2 = () => { alert('lorem ipsum'); }; - var binding1 = myObject.started.add(handler1); //methods `add()` and `addOnce()` returns a SignalBinding object + let binding1 = myObject.started.add(handler1); // methods `add()` and `addOnce()` returns a SignalBinding object myObject.started.add(handler2); - myObject.started.dispatch(); //will alert "foo bar" than "lorem ipsum" - binding1.active = false; //disable a single binding - myObject.started.dispatch(); //will alert "lorem ipsum" + myObject.started.dispatch(); // will alert "foo bar" than "lorem ipsum" + binding1.active = false; // disable a single binding + myObject.started.dispatch(); // will alert "lorem ipsum" binding1.active = true; - myObject.started.dispatch(); //will alert "foo bar" than "lorem ipsum" + myObject.started.dispatch(); // will alert "foo bar" than "lorem ipsum" - //Manually execute a signal handler - var handler = function(){ + // Manually execute a signal handler + const handler = () => { alert('foo bar'); }; - var binding: signals.SignalBinding<() => void> = myObject.started.add(handler); //methods `add()` and `addOnce()` returns a SignalBinding object - binding.execute(); //will alert "foo bar" + let binding: signals.SignalBinding<() => void> = myObject.started.add(handler); // methods `add()` and `addOnce()` returns a SignalBinding object + binding.execute(); // will alert "foo bar" - //Retrieve anonymous listener - var binding:signals.SignalBinding<() => void> = myObject.started.add(function(){ + // Retrieve anonymous listener + binding = myObject.started.add(() => { alert('foo bar'); }); // note: in the original docs, this is handler, but that collides with handler above because these are in one giant scope // perhaps these are best split into functions for readability - var anonymousHandler = binding.getListener(); //reference to the anonymous function + const anonymousHandler = binding.getListener(); // reference to the anonymous function - //Remove / Detach anonymous listener - var binding:signals.SignalBinding<() => void> = myObject.started.add(function(){ + // Remove / Detach anonymous listener + binding = myObject.started.add(() => { alert('foo bar'); }); - myObject.started.dispatch(); //will alert "foo bar" + myObject.started.dispatch(); // will alert "foo bar" binding.detach(); - alert(binding.isBound()); //will alert `false` - myObject.started.dispatch(); //nothing happens + alert(binding.isBound()); // will alert `false` + myObject.started.dispatch(); // nothing happens - //Check if binding will execute only once - var binding1:signals.SignalBinding = myObject.started.add(function(){ + // Check if binding will execute only once + binding1 = myObject.started.add(() => { alert('foo bar'); }); - var binding2:signals.SignalBinding<() => void> = myObject.started.addOnce(function(){ + const binding2: signals.SignalBinding<() => void> = myObject.started.addOnce(() => { alert('foo bar'); }); - alert(binding1.isOnce()); //alert "false" - alert(binding2.isOnce()); //alert "true" + alert(binding1.isOnce()); // alert "false" + alert(binding2.isOnce()); // alert "true" - //Change listener execution context on-the-fly - var foo = 'bar'; - var obj = { + // Change listener execution context on-the-fly + const foo = 'bar'; + const obj = { foo : "it's over 9000!" }; - var binding:signals.SignalBinding<() => void> = myObject.started.add(function(){ + binding = myObject.started.add(function() { alert(this.foo); }); - myObject.started.dispatch(); //will alert "bar" + myObject.started.dispatch(); // will alert "bar" binding.context = obj; - myObject.started.dispatch(); //will alert "it's over 9000!" + myObject.started.dispatch(); // will alert "it's over 9000!" - //Add default parameters to Signal dispatch (v0.6.3+) - var binding:signals.SignalBinding<() => void> = myObject.started.add(function(a:string, b:string, c:string){ - alert(a +' '+ b +' '+ c); + // Add default parameters to Signal dispatch (v0.6.3+) + binding = myObject.started.add((a: string, b: string, c: string) => { + alert(`${a} ${b} ${c}`); }); - binding.params = ['lorem', 'ipsum']; //set default parameters of the binding - myObject.started.dispatch('dolor'); //will alert "lorem ipsum dolor" + binding.params = ['lorem', 'ipsum']; // set default parameters of the binding + myObject.started.dispatch('dolor'); // will alert "lorem ipsum dolor" - //Check if Signal has specific listener (v0.7.0+) - function onStart(a:string){ + // Check if Signal has specific listener (v0.7.0+) + function onStart(a: string) { console.log(a); } myObject.started.add(onStart); myObject.started.has(onStart); // true - //Memorize previously dispatched values / forget values (v0.7.0+) + // Memorize previously dispatched values / forget values (v0.7.0+) myObject.started.memorize = true; // default is false myObject.started.dispatch('foo'); diff --git a/types/signals/tslint.json b/types/signals/tslint.json new file mode 100644 index 0000000000..09c89d645d --- /dev/null +++ b/types/signals/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // TODOs + "ban-types": false, + "no-misused-new": false + } +} From e51980df25f26e7aa53816a4d6b5cf991a715454 Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 20 Oct 2017 10:02:01 -0700 Subject: [PATCH 039/232] openpgp: Convert to external module (#20622) --- types/openpgp/index.d.ts | 407 ++++++++++++++++----------------- types/openpgp/openpgp-tests.ts | 4 +- types/openpgp/tslint.json | 20 ++ 3 files changed, 221 insertions(+), 210 deletions(-) create mode 100644 types/openpgp/tslint.json diff --git a/types/openpgp/index.d.ts b/types/openpgp/index.d.ts index 91b8dc2ca6..79e92daa7f 100644 --- a/types/openpgp/index.d.ts +++ b/types/openpgp/index.d.ts @@ -3,120 +3,119 @@ // Definitions by: Guillaume Lacasa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace openpgp { +export as namespace openpgp; - interface KeyPair { - key: key.Key, - privateKeyArmored: string, - publicKeyArmored: string - } - - interface KeyOptions { - keyType?: enums.publicKey, - numBits: number, - userId: string, - passphrase: string, - unlocked?: boolean - } - - interface Keyid { - bytes: string, - } - - interface Signature { - keyid: Keyid, - valid: boolean - } - - interface VerifiedMessage { - text: string, - signatures: Array - } - - /** Decrypts message and verifies signatures - - @param privateKey private key with decrypted secret key data - @param publicKeys array of keys to verify signatures - @param msg the message object with signed and encrypted data - */ - function decryptAndVerifyMessage(privateKey: key.Key, publicKeys: Array, msg: string): Promise; - /** Decrypts message and verifies signatures - - @param privateKey private key with decrypted secret key data - @param publicKey single key to verify signatures - @param msg the message object with signed and encrypted data - */ - function decryptAndVerifyMessage(privateKey: key.Key, publicKey: key.Key, msg: string): Promise; - - /** Decrypts message - - @param privateKey private key with decrypted secret key data - @param msg the message object with the encrypted data - */ - function decryptMessage(privateKey: key.Key, msg: message.Message): Promise; - - /** Encrypts message text with keys - @param keys array of keys used to encrypt the message - @param text message as native JavaScript string - @returns encrypted ASCII armored message - */ - function encryptMessage(keys: Array, message: string): Promise; - /** Encrypts message text with keys - - @param single key used to encrypt the message - @param text message as native JavaScript string - */ - function encryptMessage(key: key.Key, message: string): Promise; - - /** Generates a new OpenPGP key pair. Currently only supports RSA keys. Primary and subkey will be of same type. - @param options - */ - function generateKeyPair(options: KeyOptions): Promise; - - /** Signs message text and encrypts it - - @param publicKeys array of keys used to encrypt the message - @param privateKey private key with decrypted secret key data for signing - @param text private key with decrypted secret key data for signing - */ - function signAndEncryptMessage(publicKeys: Array, privateKey: key.Key, text: string): Promise; - /** Signs message text and encrypts it - - @param publicKeys single key used to encrypt the message - @param privateKey private key with decrypted secret key data for signing - @param text private key with decrypted secret key data for signing - */ - function signAndEncryptMessage(publicKey: key.Key, privateKey: key.Key, text: string): Promise; - - /** Signs a cleartext message - - @param privateKeys array of keys with decrypted secret key data to sign cleartext - @param text cleartext - */ - function signClearMessage(privateKeys: Array, text: string): Promise; - /** Signs a cleartext message - - @param privateKeys single key with decrypted secret key data to sign cleartext - @param text cleartext - */ - function signClearMessage(privateKey: key.Key, text: string): Promise; - - /** Verifies signatures of cleartext signed message - - @param publicKeys array of keys to verify signatures - @param msg cleartext message object with signatures - */ - function verifyClearSignedMessage(publicKeys: Array, msg: cleartext.CleartextMessage): Promise; - /** Verifies signatures of cleartext signed message - - @param publicKeys single key to verify signatures - @param msg cleartext message object with signatures - */ - function verifyClearSignedMessage(publicKey: key.Key, msg: cleartext.CleartextMessage): Promise; +export interface KeyPair { + key: key.Key, + privateKeyArmored: string, + publicKeyArmored: string } -declare namespace openpgp.armor { +export interface KeyOptions { + keyType?: enums.publicKey, + numBits: number, + userId: string, + passphrase: string, + unlocked?: boolean +} +export interface Keyid { + bytes: string, +} + +export interface Signature { + keyid: Keyid, + valid: boolean +} + +export interface VerifiedMessage { + text: string, + signatures: Array +} + +/** Decrypts message and verifies signatures + + @param privateKey private key with decrypted secret key data + @param publicKeys array of keys to verify signatures + @param msg the message object with signed and encrypted data + */ +export function decryptAndVerifyMessage(privateKey: key.Key, publicKeys: Array, msg: string): Promise; +/** Decrypts message and verifies signatures + + @param privateKey private key with decrypted secret key data + @param publicKey single key to verify signatures + @param msg the message object with signed and encrypted data + */ +export function decryptAndVerifyMessage(privateKey: key.Key, publicKey: key.Key, msg: string): Promise; + +/** Decrypts message + + @param privateKey private key with decrypted secret key data + @param msg the message object with the encrypted data + */ +export function decryptMessage(privateKey: key.Key, msg: message.Message): Promise; + +/** Encrypts message text with keys + @param keys array of keys used to encrypt the message + @param text message as native JavaScript string + @returns encrypted ASCII armored message + */ +export function encryptMessage(keys: Array, message: string): Promise; +/** Encrypts message text with keys + + @param single key used to encrypt the message + @param text message as native JavaScript string + */ +export function encryptMessage(key: key.Key, message: string): Promise; + +/** Generates a new OpenPGP key pair. Currently only supports RSA keys. Primary and subkey will be of same type. + @param options + */ +export function generateKeyPair(options: KeyOptions): Promise; + +/** Signs message text and encrypts it + + @param publicKeys array of keys used to encrypt the message + @param privateKey private key with decrypted secret key data for signing + @param text private key with decrypted secret key data for signing + */ +export function signAndEncryptMessage(publicKeys: Array, privateKey: key.Key, text: string): Promise; +/** Signs message text and encrypts it + + @param publicKeys single key used to encrypt the message + @param privateKey private key with decrypted secret key data for signing + @param text private key with decrypted secret key data for signing + */ +export function signAndEncryptMessage(publicKey: key.Key, privateKey: key.Key, text: string): Promise; + +/** Signs a cleartext message + + @param privateKeys array of keys with decrypted secret key data to sign cleartext + @param text cleartext + */ +export function signClearMessage(privateKeys: Array, text: string): Promise; +/** Signs a cleartext message + + @param privateKeys single key with decrypted secret key data to sign cleartext + @param text cleartext + */ +export function signClearMessage(privateKey: key.Key, text: string): Promise; + +/** Verifies signatures of cleartext signed message + + @param publicKeys array of keys to verify signatures + @param msg cleartext message object with signatures + */ +export function verifyClearSignedMessage(publicKeys: Array, msg: cleartext.CleartextMessage): Promise; +/** Verifies signatures of cleartext signed message + + @param publicKeys single key to verify signatures + @param msg cleartext message object with signatures + */ +export function verifyClearSignedMessage(publicKey: key.Key, msg: cleartext.CleartextMessage): Promise; + + +export namespace armor { /** Armor an OpenPGP binary packet block @param messagetype type of the message @@ -133,8 +132,7 @@ declare namespace openpgp.armor { function dearmor(text: string): Object; } -declare namespace openpgp.cleartext { - +export namespace cleartext { /** Class that represents an OpenPGP cleartext signed message. */ interface CleartextMessage { @@ -164,7 +162,7 @@ declare namespace openpgp.cleartext { function readArmored(armoredText: string): CleartextMessage; } -declare namespace openpgp.config { +export namespace config { var prefer_hash_algorithm: enums.hash; var encryption_cipher: enums.symmetric; var compression: enums.compression; @@ -175,7 +173,7 @@ declare namespace openpgp.config { var debug: boolean; } -declare namespace openpgp.crypto { +export namespace crypto { interface Mpi { data: number, read(input: string): number, @@ -211,92 +209,92 @@ declare namespace openpgp.crypto { @param data Data to be encrypted as MPI */ function publicKeyEncrypt(algo: enums.publicKey, publicMPIs: Array, data: Mpi): Array; + + + namespace cfb { + /** This function decrypts a given plaintext using the specified blockcipher to decrypt a message + @param cipherfn the algorithm cipher class to decrypt data in one block_size encryption + @param key binary string representation of key to be used to decrypt the ciphertext. This will be passed to the cipherfn + @param ciphertext to be decrypted provided as a string + @param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Decryption within an encryptedintegrityprotecteddata packet is not resyncing the IV. + */ + function decrypt(cipherfn: string, key: string, ciphertext: string, resync: boolean): string; + + /** This function encrypts a given with the specified prefixrandom using the specified blockcipher to encrypt a message + @param prefixrandom random bytes of block_size length provided as a string to be used in prefixing the data + @param cipherfn the algorithm cipher class to encrypt data in one block_size encryption + @param plaintext data to be encrypted provided as a string + @param key binary string representation of key to be used to encrypt the plaintext. This will be passed to the cipherfn + @param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Encryption within an encryptedintegrityprotecteddata packet is not resyncing the IV. + */ + function encrypt(prefixrandom: string, cipherfn: string, plaintext: string, key: string, resync: boolean): string; + + /** Decrypts the prefixed data for the Modification Detection Code (MDC) computation + @param cipherfn cipherfn.encrypt Cipher function to use + @param key binary string representation of key to be used to check the mdc This will be passed to the cipherfn + @param ciphertext The encrypted data + */ + function mdc(cipherfn: Object, key: string, ciphertext: string): string; + } + + namespace hash { + /** Create a hash on the specified data using the specified algorithm + @param algo Hash algorithm type + @param data Data to be hashed + */ + function digest(algo: enums.hash, data: string): string; + + /** Returns the hash size in bytes of the specified hash algorithm type + @param algo Hash algorithm type + */ + function getHashByteLength(algo: enums.hash): number; + } + + namespace random { + /** Create a secure random big integer of bits length + @param bits Bit length of the MPI to create + */ + function getRandomBigInteger(bits: number): number; + + /** Retrieve secure random byte string of the specified length + @param length Length in bytes to generate + */ + function getRandomBytes(length: number): string; + + /** Helper routine which calls platform specific crypto random generator + @param buf + */ + function getRandomValues(buf: Uint8Array): void; + + /** Return a secure random number in the specified range + @param from Min of the random number + @param to Max of the random number (max 32bit) + */ + function getSecureRandom(from: number, to: number): number; + } + + namespace signature { + /** Create a signature on data using the specified algorithm + @param hash_algo hash Algorithm to use + @param algo Asymmetric cipher algorithm to use + @param publicMPIs Public key multiprecision integers of the private key + @param secretMPIs Private key multiprecision integers which is used to sign the data + @param data Data to be signed + */ + function sign(hash_algo: enums.hash, algo: enums.publicKey, publicMPIs: Array, secretMPIs: Array, data: string): Mpi; + + /** + @param algo public Key algorithm + @param hash_algo Hash algorithm + @param msg_MPIs Signature multiprecision integers + @param publickey_MPIs Public key multiprecision integers + @param data Data on where the signature was computed on + */ + function verify(algo: enums.publicKey, hash_algo: enums.hash, msg_MPIs: Array, publickey_MPIs: Array, data: string): boolean; + } } -declare namespace openpgp.crypto.cfb { - /** This function decrypts a given plaintext using the specified blockcipher to decrypt a message - @param cipherfn the algorithm cipher class to decrypt data in one block_size encryption - @param key binary string representation of key to be used to decrypt the ciphertext. This will be passed to the cipherfn - @param ciphertext to be decrypted provided as a string - @param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Decryption within an encryptedintegrityprotecteddata packet is not resyncing the IV. - */ - function decrypt(cipherfn: string, key: string, ciphertext: string, resync: boolean): string; - - /** This function encrypts a given with the specified prefixrandom using the specified blockcipher to encrypt a message - @param prefixrandom random bytes of block_size length provided as a string to be used in prefixing the data - @param cipherfn the algorithm cipher class to encrypt data in one block_size encryption - @param plaintext data to be encrypted provided as a string - @param key binary string representation of key to be used to encrypt the plaintext. This will be passed to the cipherfn - @param resync a boolean value specifying if a resync of the IV should be used or not. The encrypteddatapacket uses the "old" style with a resync. Encryption within an encryptedintegrityprotecteddata packet is not resyncing the IV. - */ - function encrypt(prefixrandom: string, cipherfn: string, plaintext: string, key: string, resync: boolean): string; - - /** Decrypts the prefixed data for the Modification Detection Code (MDC) computation - @param cipherfn cipherfn.encrypt Cipher function to use - @param key binary string representation of key to be used to check the mdc This will be passed to the cipherfn - @param ciphertext The encrypted data - */ - function mdc(cipherfn: Object, key: string, ciphertext: string): string; -} - -declare namespace openpgp.crypto.hash { - /** Create a hash on the specified data using the specified algorithm - @param algo Hash algorithm type - @param data Data to be hashed - */ - function digest(algo: enums.hash, data: string): string; - - /** Returns the hash size in bytes of the specified hash algorithm type - @param algo Hash algorithm type - */ - function getHashByteLength(algo: enums.hash): number; -} - -declare namespace openpgp.crypto.random { - /** Create a secure random big integer of bits length - @param bits Bit length of the MPI to create - */ - function getRandomBigInteger(bits: number): number; - - /** Retrieve secure random byte string of the specified length - @param length Length in bytes to generate - */ - function getRandomBytes(length: number): string; - - /** Helper routine which calls platform specific crypto random generator - @param buf - */ - function getRandomValues(buf: Uint8Array): void; - - /** Return a secure random number in the specified range - @param from Min of the random number - @param to Max of the random number (max 32bit) - */ - function getSecureRandom(from: number, to: number): number; -} - -declare namespace openpgp.crypto.signature { - /** Create a signature on data using the specified algorithm - @param hash_algo hash Algorithm to use - @param algo Asymmetric cipher algorithm to use - @param publicMPIs Public key multiprecision integers of the private key - @param secretMPIs Private key multiprecision integers which is used to sign the data - @param data Data to be signed - */ - function sign(hash_algo: enums.hash, algo: enums.publicKey, publicMPIs: Array, secretMPIs: Array, data: string): Mpi; - - /** - @param algo public Key algorithm - @param hash_algo Hash algorithm - @param msg_MPIs Signature multiprecision integers - @param publickey_MPIs Public key multiprecision integers - @param data Data on where the signature was computed on - */ - function verify(algo: enums.publicKey, hash_algo: enums.hash, msg_MPIs: Array, publickey_MPIs: Array, data: string): boolean; -} - -declare namespace openpgp.enums { - +export namespace enums { enum armor { multipart_section, multipart_last, @@ -372,8 +370,7 @@ declare namespace openpgp.enums { } } -declare namespace openpgp.key { - +export namespace key { interface KeyResult { keys: Array, err: Array @@ -408,10 +405,9 @@ declare namespace openpgp.key { @param armoredText text to be parsed */ function readArmored(armoredText: string): KeyResult; - } -declare namespace openpgp.message { +export namespace message { /** Class that represents an OpenPGP message. Can be an encrypted message, signed message, compressed message or literal message */ interface Message { @@ -477,8 +473,7 @@ declare namespace openpgp.message { function readArmored(armoredText: string): Message; } -declare namespace openpgp.packet { - +export namespace packet { interface PublicKey { algorithm: enums.publicKey; created: Date; @@ -509,7 +504,7 @@ declare namespace openpgp.packet { function newPacketFromTag(tag: string): Object; } -declare namespace openpgp.util { +export namespace util { /** Convert an array of integers(0.255) to a string @param bin An array of (binary) integers to convert */ @@ -583,6 +578,4 @@ declare namespace openpgp.util { @param bin An array of (binary) integers to convert */ function Uint8Array2str(bin: Uint8Array): string; - - } diff --git a/types/openpgp/openpgp-tests.ts b/types/openpgp/openpgp-tests.ts index a4a4200c56..fbe8a2e691 100644 --- a/types/openpgp/openpgp-tests.ts +++ b/types/openpgp/openpgp-tests.ts @@ -1,5 +1,3 @@ - - // Open PGP Sample codes var options: openpgp.KeyOptions = { @@ -125,4 +123,4 @@ openpgp.util.print_debug_hexstr_dump(""); openpgp.util.shiftRight("", 1); openpgp.util.str2bin(""); openpgp.util.str2Uint8Array(""); -openpgp.util.Uint8Array2str(openpgp.util.str2Uint8Array("")); \ No newline at end of file +openpgp.util.Uint8Array2str(openpgp.util.str2Uint8Array("")); diff --git a/types/openpgp/tslint.json b/types/openpgp/tslint.json new file mode 100644 index 0000000000..c28368c002 --- /dev/null +++ b/types/openpgp/tslint.json @@ -0,0 +1,20 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // TODOs + "array-type": false, + "ban-types": false, + "dt-header": false, + "jsdoc-format": false, + "max-line-length": false, + "no-consecutive-blank-lines": false, + "no-var-keyword": false, + "only-arrow-functions": false, + "prefer-const": false, + "semicolon": false, + "space-before-function-paren": false, + "typedef-whitespace": false, + "unified-signatures": false, + "whitespace": false + } +} \ No newline at end of file From 38e3db12b83247ccb7ad61503edd726cf2bfb080 Mon Sep 17 00:00:00 2001 From: Artem Malko Date: Sat, 21 Oct 2017 01:36:49 +0700 Subject: [PATCH 040/232] react Add 'as' attribute for link element (#20769) --- types/react/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 93cb62fbfa..f79caad296 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -2493,6 +2493,7 @@ declare namespace React { allowFullScreen?: boolean; allowTransparency?: boolean; alt?: string; + as?: string; async?: boolean; autoComplete?: string; autoFocus?: boolean; @@ -2602,6 +2603,7 @@ declare namespace React { rel?: string; target?: string; type?: string; + as?: string; } // tslint:disable-next-line:no-empty-interface @@ -2787,6 +2789,7 @@ declare namespace React { rel?: string; sizes?: string; type?: string; + as?: string; } interface MapHTMLAttributes extends HTMLAttributes { From da6e5dabc87b1590c9f4e90ec71a4871de164663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=B3l?= Date: Fri, 20 Oct 2017 22:19:43 +0200 Subject: [PATCH 041/232] Add react-dnd-touch-backend types (#20770) * Add react-dnd-touch-backend types * CS fixes * Add dom lib --- types/react-dnd-touch-backend/index.d.ts | 12 ++++++++++ .../react-dnd-touch-backend-tests.ts | 7 ++++++ types/react-dnd-touch-backend/tsconfig.json | 24 +++++++++++++++++++ types/react-dnd-touch-backend/tslint.json | 1 + 4 files changed, 44 insertions(+) create mode 100644 types/react-dnd-touch-backend/index.d.ts create mode 100644 types/react-dnd-touch-backend/react-dnd-touch-backend-tests.ts create mode 100644 types/react-dnd-touch-backend/tsconfig.json create mode 100644 types/react-dnd-touch-backend/tslint.json diff --git a/types/react-dnd-touch-backend/index.d.ts b/types/react-dnd-touch-backend/index.d.ts new file mode 100644 index 0000000000..91ea6ce999 --- /dev/null +++ b/types/react-dnd-touch-backend/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for react-dnd-touch-backend 0.3 +// Project: https://github.com/yahoo/react-dnd-touch-backend#readme +// Definitions by: Daniel Król +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as ReactDnd from "react-dnd"; + +export default function createTouchBackend(options: TouchBackendOptions): ReactDnd.Backend; + +export interface TouchBackendOptions { + enableMouseEvents?: boolean; +} diff --git a/types/react-dnd-touch-backend/react-dnd-touch-backend-tests.ts b/types/react-dnd-touch-backend/react-dnd-touch-backend-tests.ts new file mode 100644 index 0000000000..07994e71be --- /dev/null +++ b/types/react-dnd-touch-backend/react-dnd-touch-backend-tests.ts @@ -0,0 +1,7 @@ +import * as ReactDnd from "react-dnd"; +import TouchBackend from "react-dnd-touch-backend"; + +const component = () => null; + +const dndComponent = ReactDnd.DragDropContext(TouchBackend)(component); +const dndComponentMouseEvents = ReactDnd.DragDropContext(TouchBackend({enableMouseEvents: true}))(component); diff --git a/types/react-dnd-touch-backend/tsconfig.json b/types/react-dnd-touch-backend/tsconfig.json new file mode 100644 index 0000000000..926592e1c3 --- /dev/null +++ b/types/react-dnd-touch-backend/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-dnd-touch-backend-tests.ts" + ] +} diff --git a/types/react-dnd-touch-backend/tslint.json b/types/react-dnd-touch-backend/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-dnd-touch-backend/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 3f9b03e6730806b4f7a4abf357a22dbb88acba17 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Sun, 22 Oct 2017 00:35:16 +0800 Subject: [PATCH 042/232] Added type definitions for pino-multi-stream (#20757) --- types/pino-multi-stream/index.d.ts | 27 +++++++++++++++++++ .../pino-multi-stream-tests.ts | 19 +++++++++++++ types/pino-multi-stream/tsconfig.json | 23 ++++++++++++++++ types/pino-multi-stream/tslint.json | 1 + 4 files changed, 70 insertions(+) create mode 100644 types/pino-multi-stream/index.d.ts create mode 100644 types/pino-multi-stream/pino-multi-stream-tests.ts create mode 100644 types/pino-multi-stream/tsconfig.json create mode 100644 types/pino-multi-stream/tslint.json diff --git a/types/pino-multi-stream/index.d.ts b/types/pino-multi-stream/index.d.ts new file mode 100644 index 0000000000..4aa8dcfb7d --- /dev/null +++ b/types/pino-multi-stream/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for pino-multi-stream 3.1 +// Project: https://github.com/pinojs/pino-multi-stream#readme +// Definitions by: Jake Ginnivan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 +import { + LoggerOptions as PinoLoggerOptions, + Logger as PinoLogger, + Level as PinoLevel, + stdSerializers as pinoStdSerializers +} from 'pino'; +import stream = require('stream'); + +declare namespace pinoms { + type Streams = Array<{ stream: NodeJS.WritableStream; level?: Level }>; + interface LoggerOptions extends PinoLoggerOptions { + streams?: Streams; + } + const stdSerializers: typeof pinoStdSerializers; + + function multistream(streams: Streams): stream.Writable; + type Level = PinoLevel; + type Logger = PinoLogger; +} + +declare function pinoms(options: pinoms.LoggerOptions): pinoms.Logger; +export = pinoms; diff --git a/types/pino-multi-stream/pino-multi-stream-tests.ts b/types/pino-multi-stream/pino-multi-stream-tests.ts new file mode 100644 index 0000000000..d9d0899256 --- /dev/null +++ b/types/pino-multi-stream/pino-multi-stream-tests.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs'; +import * as pino from 'pino'; +import * as pinoms from 'pino-multi-stream'; + +const streams: pinoms.Streams = [ + { stream: process.stdout }, // an "info" level destination stream + { level: 'error', stream: process.stderr }, // an "error" level destination stream + { stream: fs.createWriteStream('/tmp/info.stream.out') }, + { level: 'fatal', stream: fs.createWriteStream('/tmp/fatal.stream.out') } +]; +const logger = pinoms({ + level: 'warn', + streams +}); + +const log = pino({ + level: 'debug' // this MUST be set at the lowest level of the + // destinations +}, pinoms.multistream(streams)); diff --git a/types/pino-multi-stream/tsconfig.json b/types/pino-multi-stream/tsconfig.json new file mode 100644 index 0000000000..7a060abb2e --- /dev/null +++ b/types/pino-multi-stream/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pino-multi-stream-tests.ts" + ] +} diff --git a/types/pino-multi-stream/tslint.json b/types/pino-multi-stream/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/pino-multi-stream/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 902a364510937e4dd505468be96908b1119fcad5 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 21 Oct 2017 19:47:48 +0200 Subject: [PATCH 043/232] feat(cpx): add typings for `cpx` (#20786) * feat(cpx): add typings for `cpx` * cpx: add `strictFunctionTypes` * cpx: fix build --- types/cpx/cpx-tests.ts | 21 ++++++++++++++++++++ types/cpx/index.d.ts | 44 +++++++++++++++++++++++++++++++++++++++++ types/cpx/tsconfig.json | 23 +++++++++++++++++++++ types/cpx/tslint.json | 1 + 4 files changed, 89 insertions(+) create mode 100644 types/cpx/cpx-tests.ts create mode 100644 types/cpx/index.d.ts create mode 100644 types/cpx/tsconfig.json create mode 100644 types/cpx/tslint.json diff --git a/types/cpx/cpx-tests.ts b/types/cpx/cpx-tests.ts new file mode 100644 index 0000000000..dc92643fcc --- /dev/null +++ b/types/cpx/cpx-tests.ts @@ -0,0 +1,21 @@ +import * as cpx from "cpx"; + +const SRC = "**/.js"; +const DEST = ".tmp/"; +const callback = (error: Error | null) => { }; +const ASYNC_OPTIONS: cpx.AsyncOptions = { includeEmptyDirs: true }; +const SYNC_OPTIONS: cpx.SyncOptions = { preserve: true }; +const WATCH_OPTIONS: cpx.WatchOptions = { initialCopy: true }; + +cpx.copy(SRC, DEST); +cpx.copy(SRC, DEST, callback); +cpx.copy(SRC, DEST, ASYNC_OPTIONS); +cpx.copy(SRC, DEST, ASYNC_OPTIONS, callback); + +cpx.copySync(SRC, DEST, SYNC_OPTIONS); +cpx.copySync(SRC, DEST); + +const watch = cpx.watch(SRC, DEST, WATCH_OPTIONS); +watch.close(); +watch.open(); +watch.on("copy", (x) => x); diff --git a/types/cpx/index.d.ts b/types/cpx/index.d.ts new file mode 100644 index 0000000000..9a04cf1242 --- /dev/null +++ b/types/cpx/index.d.ts @@ -0,0 +1,44 @@ +// Type definitions for cpx 1.5 +// Project: https://github.com/mysticatea/cpx +// Definitions by: Alan Agius +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from "stream"; + +export interface SyncOptions { + /** remove files that copied on past before copy. */ + clean?: boolean; + /** Follow symbolic links when copying from them. */ + dereference?: boolean; + /** Copy empty directories which is matched with the glob. */ + includeEmptyDirs?: boolean; + /** Preserve UID, GID, ATIME, and MTIME of files. */ + preserve?: boolean; + /** Do not overwrite files on destination if the source file is older. */ + update?: boolean; +} + +export interface AsyncOptions extends SyncOptions { + /** Function that creates a `stream.Transform` object to transform each copying file. */ + transform?(filepath: string): stream.Transform[]; +} + +export interface WatchOptions extends AsyncOptions, SyncOptions { + /** Flag to not copy at the initial time of watch. */ + initialCopy?: boolean; +} + +export class Watcher extends NodeJS.EventEmitter { + constructor(options: WatchOptions); + open(): void; + close(): void; +} + +export function copy(source: string, dest: string, options?: AsyncOptions, callback?: (error: Error | null) => void): void; +export function copy(source: string, dest: string, callback?: (error: Error | null) => void): void; + +export function copySync(source: string, dest: string, options?: SyncOptions): void; + +export function watch(source: string, dest: string, options?: WatchOptions): Watcher; diff --git a/types/cpx/tsconfig.json b/types/cpx/tsconfig.json new file mode 100644 index 0000000000..d22546d432 --- /dev/null +++ b/types/cpx/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cpx-tests.ts" + ] +} diff --git a/types/cpx/tslint.json b/types/cpx/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cpx/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ed36d5538fe4656f9cf79e9c481d2102fc6e7bc6 Mon Sep 17 00:00:00 2001 From: Kaelig Deloumeau-Prigent Date: Sat, 21 Oct 2017 21:38:18 -0700 Subject: [PATCH 044/232] react: Add "as" attribute to link elements (#20628) * Add "as" attribute to links See corresponding addition here: https://github.com/facebook/react/pull/7582 * Add "as" attribute to link elements in React v16 definition * Turn commas into semicolons (React 15) * Turn commas into semicolons (React 16) --- types/react/index.d.ts | 3 ++- types/react/v15/index.d.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index f79caad296..ee3f9616ac 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -33,7 +33,7 @@ And since any object is assignable to {}, we would lose the type safety of the P Therefore, the type of props is left as Q, which should work for most cases. If you need to call cloneElement with key or ref, you'll need a type cast: interface ButtonProps { - label: string, + label: string; isDisabled?: boolean; } var element: React.CElement; @@ -2782,6 +2782,7 @@ declare namespace React { } interface LinkHTMLAttributes extends HTMLAttributes { + as?: string; href?: string; hrefLang?: string; integrity?: string; diff --git a/types/react/v15/index.d.ts b/types/react/v15/index.d.ts index 6be40c0f6b..c35e2df3c0 100644 --- a/types/react/v15/index.d.ts +++ b/types/react/v15/index.d.ts @@ -35,7 +35,7 @@ Therefore, the type of props is left as Q, which should work for most cases. If you need to call cloneElement with key or ref, you'll need a type cast: interface ButtonProps { - label: string, + label: string; isDisabled?: boolean; } var element: React.CElement; @@ -2720,6 +2720,7 @@ declare namespace React { } interface LinkHTMLAttributes extends HTMLAttributes { + as?: string; href?: string; hrefLang?: string; integrity?: string; From 10612bcf84153db3d37a042d08f5b57ab5680333 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Date: Sun, 22 Oct 2017 12:39:35 -0200 Subject: [PATCH 045/232] Update index.d.ts (#20811) remove duplicated `as` --- types/react/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index ee3f9616ac..77356b922b 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -2782,7 +2782,6 @@ declare namespace React { } interface LinkHTMLAttributes extends HTMLAttributes { - as?: string; href?: string; hrefLang?: string; integrity?: string; From 84da98d35b4ed69ccf0f0d79a1b1e96d7316c3bc Mon Sep 17 00:00:00 2001 From: andy-ms Date: Sun, 22 Oct 2017 10:46:51 -0700 Subject: [PATCH 046/232] verror: Fix lint --- types/verror/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/verror/index.d.ts b/types/verror/index.d.ts index bddce14924..36d2a9ef3b 100644 --- a/types/verror/index.d.ts +++ b/types/verror/index.d.ts @@ -39,7 +39,7 @@ declare namespace VError { } interface Options { - cause?: Error | null | undefined; + cause?: Error | null; name?: string; strict?: boolean; constructorOpt?(...args: any[]): void; From 4a0d3be1c054f1e9fa9f94cceb0af0e9c815fed9 Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 22 Oct 2017 11:27:58 -0700 Subject: [PATCH 047/232] leaflet-*: Fix lint (#20841) --- types/leaflet-draw/tslint.json | 4 +++- types/leaflet-polylinedecorator/tslint.json | 8 +++++++- types/leaflet/tslint.json | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/types/leaflet-draw/tslint.json b/types/leaflet-draw/tslint.json index 4f44991c3c..ccc381f52f 100644 --- a/types/leaflet-draw/tslint.json +++ b/types/leaflet-draw/tslint.json @@ -1,6 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "no-empty-interface": false + // TODOs + "no-empty-interface": false, + "no-unnecessary-class": false } } diff --git a/types/leaflet-polylinedecorator/tslint.json b/types/leaflet-polylinedecorator/tslint.json index 3db14f85ea..6a82dd0467 100644 --- a/types/leaflet-polylinedecorator/tslint.json +++ b/types/leaflet-polylinedecorator/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } +} diff --git a/types/leaflet/tslint.json b/types/leaflet/tslint.json index a7cf035dfc..e504c08f8d 100644 --- a/types/leaflet/tslint.json +++ b/types/leaflet/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODOs + "no-unnecessary-class": false, "no-object-literal-type-assertion": false, "no-single-declare-module": false } From 097d2acf711df3ffb7a3df62554769b216876275 Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 22 Oct 2017 15:22:50 -0700 Subject: [PATCH 048/232] Miscellaneous lint fixes (#20849) --- types/activex-libreoffice/tslint.json | 1 + types/angular-block-ui/index.d.ts | 6 +- types/angular/angular-tests.ts | 8 +- types/angular/index.d.ts | 16 ++-- types/annyang/index.d.ts | 44 +-------- types/applicationinsights-js/tslint.json | 2 + types/arrify/index.d.ts | 1 - types/ascii2mathml/index.d.ts | 2 +- types/async/tslint.json | 1 + .../atom-mocha-test-runner-tests.ts | 2 +- types/autosize/index.d.ts | 9 -- types/babel-core/index.d.ts | 5 +- types/backbone.marionette/index.d.ts | 10 +- types/bagpipes/index.d.ts | 5 +- types/bitcoinjs-lib/index.d.ts | 2 +- types/blob-util/index.d.ts | 22 ----- types/bluebird-global/tslint.json | 1 + types/bluebird/tslint.json | 1 + types/bootstrap-slider/index.d.ts | 7 -- types/bull/index.d.ts | 4 +- types/bunyan-blackhole/index.d.ts | 4 +- types/chai-jest-snapshot/index.d.ts | 33 ++----- types/chroma-js/index.d.ts | 3 - types/clipboard/index.d.ts | 15 ++- types/combine-source-map/index.d.ts | 18 ++-- types/convert-source-map/index.d.ts | 18 ++-- types/convict/index.d.ts | 16 +--- types/cookie-signature/index.d.ts | 10 +- .../cordova-plugin-native-keyboard/index.d.ts | 18 ---- types/cytoscape/index.d.ts | 27 ++++-- types/delay/index.d.ts | 6 +- types/dom-inputevent/index.d.ts | 10 +- types/dwt/tslint.json | 2 + types/dwt/v12/tslint.json | 2 + types/electron-settings/v2/index.d.ts | 2 - types/execa/index.d.ts | 2 +- types/express-brute-mongo/index.d.ts | 7 -- types/express-brute-mongo/tslint.json | 5 +- types/express-mysql-session/index.d.ts | 71 -------------- types/firebird/index.d.ts | 18 +--- types/flickity/index.d.ts | 10 +- types/fm-websync/index.d.ts | 3 - types/fs-extra-promise-es6/index.d.ts | 72 -------------- types/fs-extra-promise/index.d.ts | 31 ------ types/fs-extra/index.d.ts | 6 -- types/geodesy/index.d.ts | 15 ++- types/geolib/index.d.ts | 55 +++++++---- .../google-protobuf/google-protobuf-tests.ts | 6 +- types/graphite-udp/index.d.ts | 12 --- types/grecaptcha/index.d.ts | 4 - types/har-format/index.d.ts | 28 ++++-- types/haversine/index.d.ts | 3 - types/hls.js/index.d.ts | 2 +- types/http-assert/index.d.ts | 51 +++------- types/http-proxy/index.d.ts | 1 - types/is-ip/index.d.ts | 24 +---- types/is-number/index.d.ts | 4 +- types/jasmine-fixture/index.d.ts | 7 +- types/jest/index.d.ts | 8 +- types/jquery-match-height/index.d.ts | 2 - types/jsforce/query.d.ts | 4 +- types/jsforce/tslint.json | 1 + types/json-rpc-ws/index.d.ts | 2 - types/jsonfile/index.d.ts | 28 +++--- types/jsrp/index.d.ts | 40 ++++---- types/jszip/index.d.ts | 7 +- types/kafka-node/tslint.json | 5 +- types/keycloak-js/tslint.json | 4 +- types/knuddels-userapps-api/tslint.json | 5 +- types/license-checker/index.d.ts | 1 - types/line-by-line/index.d.ts | 1 - types/linq4js/tslint.json | 1 + types/load-json-file/index.d.ts | 4 - types/make-dir/index.d.ts | 2 - types/merge2/index.d.ts | 2 +- types/modesl/tslint.json | 8 +- types/morgan/index.d.ts | 2 - types/multer/index.d.ts | 3 +- types/multimatch/index.d.ts | 9 +- types/nedb-logger/index.d.ts | 2 +- types/node-horseman/index.d.ts | 4 +- types/node-pg-migrate/tslint.json | 4 +- types/node-waves/index.d.ts | 10 +- types/node-wit/tslint.json | 8 +- types/node-xmpp-core/index.d.ts | 5 +- types/nodemailer/lib/addressparser.d.ts | 4 +- types/openpgp/tslint.json | 1 + types/p-settle/index.d.ts | 2 - .../passport-oauth2/passport-oauth2-tests.ts | 3 +- types/pikaday-time/index.d.ts | 2 +- types/pikaday/index.d.ts | 2 +- types/polylabel/index.d.ts | 7 +- types/pouchdb-find/index.d.ts | 3 +- types/prosemirror-inputrules/tslint.json | 6 +- types/prosemirror-markdown/tslint.json | 8 +- types/qr-image/index.d.ts | 15 +-- types/query-string/index.d.ts | 5 - types/quill/tslint.json | 5 +- types/relay-runtime/tslint.json | 6 +- types/remove-markdown/index.d.ts | 1 - types/restify-plugins/index.d.ts | 2 +- types/restling/index.d.ts | 94 ++++++++----------- types/rfc2047/index.d.ts | 8 +- types/riot/index.d.ts | 8 +- types/safe-regex/index.d.ts | 2 +- types/sap__xsenv/index.d.ts | 8 +- types/serialize-javascript/index.d.ts | 8 +- types/sha1/index.d.ts | 6 +- types/simple-oauth2/index.d.ts | 2 +- types/sinon/index.d.ts | 6 +- types/slocket/index.d.ts | 6 +- types/snazzy-info-window/index.d.ts | 1 - types/soundmanager2/index.d.ts | 5 +- types/sshpk/tslint.json | 8 +- .../string-similarity-tests.ts | 11 +-- types/strong-cluster-control/index.d.ts | 1 - types/sumo-logger/index.d.ts | 3 +- types/swagger-sails-hook/index.d.ts | 4 +- types/tabris-plugin-firebase/index.d.ts | 7 +- types/thrift/thrift-tests.ts | 2 - types/tinymce/tslint.json | 1 + types/tocktimer/index.d.ts | 7 +- types/undertaker-registry/index.d.ts | 8 +- types/universal-router/index.d.ts | 6 +- types/vast-client/index.d.ts | 2 +- types/viewerjs/index.d.ts | 8 +- types/vinyl-fs/index.d.ts | 12 ++- types/webassembly-js-api/tslint.json | 4 +- types/webdriverio/tslint.json | 1 + 129 files changed, 439 insertions(+), 814 deletions(-) diff --git a/types/activex-libreoffice/tslint.json b/types/activex-libreoffice/tslint.json index 098cdac415..58ae722582 100644 --- a/types/activex-libreoffice/tslint.json +++ b/types/activex-libreoffice/tslint.json @@ -3,6 +3,7 @@ "rules": { "interface-name": [false], "ban-types": false, + "no-redundant-jsdoc": false, "no-unnecessary-qualifier": false } } \ No newline at end of file diff --git a/types/angular-block-ui/index.d.ts b/types/angular-block-ui/index.d.ts index 47ba9902b9..f415d386e9 100644 --- a/types/angular-block-ui/index.d.ts +++ b/types/angular-block-ui/index.d.ts @@ -67,7 +67,7 @@ declare module 'angular' { * If the filter function returns a string it will be passed as the message * argument to the start method of the service. * - * @param {angular.IRequestConfig} config - the Angular request config object. + * @param config the Angular request config object. * */ requestFilter?(config: IRequestConfig): (string | boolean); @@ -123,7 +123,7 @@ declare module 'angular' { * * This behaviour can be modified in the configuration. * - * @param {string|IBlockUIConfig} messageOrOptions - + * @param messageOrOptions * Either supply the message (string) to be show in the * overlay or specify an IBlockUIConfig object that will be * merged/extended into the block ui instance state. @@ -156,7 +156,7 @@ declare module 'angular' { * Allows the message shown in the overlay to be updated * while to block is active. * - * @param {string} message - The message to show in the overlay. + * @param message The message to show in the overlay. */ message(message: string): void; diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index 03f7af5160..6d8b11bffe 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -178,7 +178,7 @@ mod.controller('name', class { // $onChanges(x: number) { } }); mod.controller({ - MyCtrl: class{}, + MyCtrl: class {}, MyCtrl2() {}, MyCtrl3: ['$fooService', ($fooService: any) => { }] }); @@ -229,7 +229,7 @@ mod.provider(My.Namespace); mod.service('name', ($scope: ng.IScope) => {}); mod.service('name', ['$scope', ($scope: ng.IScope) => {}]); mod.service({ - MyCtrl: class{}, + MyCtrl: class {}, MyCtrl2: () => {}, // tslint:disable-line:object-literal-shorthand MyCtrl3: ['$fooService', ($fooService: any) => {}] }); @@ -491,9 +491,7 @@ namespace TestInjector { // $injector.instantiate { - class Foobar { - constructor($q) {} - } + class Foobar {} const result: Foobar = $injector.instantiate(Foobar); } diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index bcc8ab7466..45b9bea058 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -1089,7 +1089,7 @@ declare namespace angular { * Retrieves or overrides whether to generate an error when a rejected promise is not handled. * This feature is enabled by default. * - * @returns {boolean} Current value + * @returns Current value */ errorOnUnhandledRejections(): boolean; @@ -1097,8 +1097,8 @@ declare namespace angular { * Retrieves or overrides whether to generate an error when a rejected promise is not handled. * This feature is enabled by default. * - * @param {boolean} value Whether to generate an error when a rejected promise is not handled. - * @returns {ng.IQProvider} Self for chaining otherwise. + * @param value Whether to generate an error when a rejected promise is not handled. + * @returns Self for chaining otherwise. */ errorOnUnhandledRejections(value: boolean): IQProvider; } @@ -1109,8 +1109,8 @@ declare namespace angular { * The successCallBack may return IPromise for when a $q.reject() needs to be returned * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method. */ - then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback?: null | undefined, notifyCallback?: (state: any) => any): IPromise; - then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback?: null | undefined, notifyCallback?: (state: any) => any): IPromise; + then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise; + then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback?: null, notifyCallback?: (state: any) => any): IPromise; then(successCallback: (promiseValue: T) => IPromise|TResult, errorCallback: (reason: any) => IPromise|TCatch, notifyCallback?: (state: any) => any): IPromise; then(successCallback: (promiseValue: T) => IPromise|TResult2, errorCallback: (reason: any) => IPromise|TCatch2, notifyCallback?: (state: any) => any): IPromise; @@ -1639,9 +1639,8 @@ declare namespace angular { useApplyAsync(value: boolean): IHttpProvider; /** - * - * @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods. - * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining. + * @param value If true, `$http` will return a normal promise without the `success` and `error` methods. + * @returns If a value is specified, returns the $httpProvider for chaining. * otherwise, returns the current configured value. */ useLegacyPromiseExtensions(value: boolean): boolean | IHttpProvider; @@ -1762,7 +1761,6 @@ declare namespace angular { (tpl: string, ignoreRequestError?: boolean): IPromise; /** * total amount of pending template requests being downloaded. - * @type {number} */ totalPendingRequests: number; } diff --git a/types/annyang/index.d.ts b/types/annyang/index.d.ts index fee0cb9acb..76f2bdb455 100644 --- a/types/annyang/index.d.ts +++ b/types/annyang/index.d.ts @@ -6,39 +6,23 @@ /** * Options for function `start` - * - * @export - * @interface StartOptions */ export interface StartOptions { /** * Should annyang restart itself if it is closed indirectly, because of silence or window conflicts? - * - * @type {boolean} */ autoRestart?: boolean; /** * Allow forcing continuous mode on or off. Annyang is pretty smart about this, so only set this if you know what you're doing. - * - * @type {boolean} */ continuous?: boolean; } /** * A command option that supports custom regular expressions - * - * @export - * @interface CommandOptionRegex */ export interface CommandOptionRegex { - /** - * @type {RegExp} - */ regexp: RegExp; - /** - * @type {() => any} - */ callback(): void; } @@ -50,8 +34,6 @@ export interface CommandOptionRegex { * {'hello :name': helloFunction, 'howdy': helloFunction}; * {'hi': helloFunction}; * ```` - * @export - * @interface CommandOption */ export interface CommandOption { [command: string]: CommandOptionRegex | (() => void); @@ -92,8 +74,6 @@ export interface Annyang { /** * Start listening. * It's a good idea to call this after adding some commands first, but not mandatory. - * - * @param {StartOptions} options */ start(options?: StartOptions): void; @@ -119,15 +99,13 @@ export interface Annyang { /** * Turn on output of debug messages to the console. Ugly, but super-handy! * - * @export - * @param {boolean} [newState=true] Turn on/off debug messages + * @param [newState=true] Turn on/off debug messages */ debug(newState?: boolean): void; /** * Set the language the user will speak in. If this method is not called, defaults to 'en-US'. * - * @param {string} lang * @see [Languages](https://github.com/TalAter/annyang/blob/master/docs/FAQ.md#what-languages-are-supported) */ setLanguage(lang: string): void; @@ -144,8 +122,6 @@ export interface Annyang { * annyang.addCommands(commands2); * // annyang will now listen to all three commands * ```` - * - * @param {CommandOption} commands */ addCommands(commands: CommandOption): void; @@ -161,7 +137,6 @@ export interface Annyang { * // Remove all existing commands * annyang.removeCommands(); * ```` - * @param {string} command */ removeCommands(command?: string): void; @@ -175,37 +150,22 @@ export interface Annyang { * // Don't respond to howdy or hi * annyang.removeCommands(['howdy', 'hi']); * ```` - * - * @param {string[]} command */ removeCommands(command: string[]): void; - /** - * @param {Events} event - * @param {(userSaid : string, commandText : string, results : string[]) => void} callback - * @param {*} [context] - */ addCallback(event: Events, callback: (userSaid?: string, commandText?: string, results?: string[]) => void, context?: any): void; - /** - * @param {Events} [event] - * @param {Function} [callback] - */ removeCallback(event?: Events, callback?: (userSaid: string, commandText: string, results: string[]) => void): void; /** * Returns true if speech recognition is currently on. * Returns false if speech recognition is off or annyang is paused. - * - * @returns {boolean} */ isListening(): boolean; /** * Returns the instance of the browser's SpeechRecognition object used by annyang. * Useful in case you want direct access to the browser's Speech Recognition engine. - * - * @returns {*} */ getSpeechRecognizer(): any; @@ -223,8 +183,6 @@ export interface Annyang { * ['Time for some thrilling heroics', 'Time for some thrilling aerobics'] * ); * ```` - * - * @param {string} command */ trigger(command: string | string[]): void; } diff --git a/types/applicationinsights-js/tslint.json b/types/applicationinsights-js/tslint.json index e4be61c456..482dffd727 100644 --- a/types/applicationinsights-js/tslint.json +++ b/types/applicationinsights-js/tslint.json @@ -6,7 +6,9 @@ "no-declare-current-package": false, "no-internal-module": false, "no-mergeable-namespace": false, + "no-redundant-jsdoc": false, "no-single-declare-module": false, + "no-unnecessary-class": false, "no-unnecessary-qualifier": false } } diff --git a/types/arrify/index.d.ts b/types/arrify/index.d.ts index 896ee23224..a1dda1b9ec 100644 --- a/types/arrify/index.d.ts +++ b/types/arrify/index.d.ts @@ -12,7 +12,6 @@ * arrify(1) // returns [1] * @example * arrify([2, 3]) // returns [2, 3] - * @param val */ declare function arrify(val: undefined | null | T | T[]): T[]; export = arrify; diff --git a/types/ascii2mathml/index.d.ts b/types/ascii2mathml/index.d.ts index 2b02dfea15..dcb9f7bb98 100644 --- a/types/ascii2mathml/index.d.ts +++ b/types/ascii2mathml/index.d.ts @@ -28,7 +28,7 @@ interface ascii2mathml { /** * Converts ASCIIMath expression to MathML markup. - * @param asciimath {string} ASCIIMath expression + * @param asciimath ASCIIMath expression * @param options Options */ (asciimath: string, options?: Options): string; diff --git a/types/async/tslint.json b/types/async/tslint.json index b1ab4a96cc..9380375afa 100644 --- a/types/async/tslint.json +++ b/types/async/tslint.json @@ -16,6 +16,7 @@ "no-void-expression": false, "object-literal-key-quotes": false, "object-literal-shorthand": false, + "one-line": false, "one-variable-per-declaration": false, "only-arrow-functions": false, "prefer-const": false, diff --git a/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts b/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts index 434e48f261..cae2dd0e54 100644 --- a/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts +++ b/types/atom-mocha-test-runner/atom-mocha-test-runner-tests.ts @@ -34,5 +34,5 @@ async function runTests(): Promise { }; num = await defaultMochaRunner(runnerArgs); - return await testRunner(runnerArgs); + return testRunner(runnerArgs); } diff --git a/types/autosize/index.d.ts b/types/autosize/index.d.ts index a189b32817..b66dcc2aae 100644 --- a/types/autosize/index.d.ts +++ b/types/autosize/index.d.ts @@ -8,17 +8,14 @@ /** * Attach autosize to NodeList - * @param elements */ declare function autosize(elements: NodeList): NodeList; /** * Attach autosize to Element - * @param element */ declare function autosize(element: Element): Element; /** * Attach autosize to JQuery collection - * @param collection */ declare function autosize(collection: JQuery): JQuery; @@ -27,37 +24,31 @@ declare namespace autosize { * Triggers the height adjustment for an assigned textarea element. * Autosize will automatically adjust the textarea height on keyboard and window resize events. * There is no efficient way for Autosize to monitor for when another script has changed the textarea value or for changes in layout that impact the textarea element. - * @param elements */ function update(elements: NodeList): NodeList; /** * Triggers the height adjustment for an assigned textarea element. * Autosize will automatically adjust the textarea height on keyboard and window resize events. * There is no efficient way for Autosize to monitor for when another script has changed the textarea value or for changes in layout that impact the textarea element. - * @param element */ function update(element: Element): Element; /** * Triggers the height adjustment for an assigned textarea element. * Autosize will automatically adjust the textarea height on keyboard and window resize events. * There is no efficient way for Autosize to monitor for when another script has changed the textarea value or for changes in layout that impact the textarea element. - * @param collection */ function update(collection: JQuery): JQuery; /** * Removes Autosize and reverts any changes it made to the textarea element. - * @param elements */ function destroy(elements: NodeList): NodeList; /** * Removes Autosize and reverts any changes it made to the textarea element. - * @param element */ function destroy(element: Element): Element; /** * Removes Autosize and reverts any changes it made to the textarea element. - * @param collection */ function destroy(collection: JQuery): JQuery; } diff --git a/types/babel-core/index.d.ts b/types/babel-core/index.d.ts index a2476245c1..3a41d2d252 100644 --- a/types/babel-core/index.d.ts +++ b/types/babel-core/index.d.ts @@ -162,8 +162,9 @@ export interface TransformOptions { /** Indicate the mode the code should be parsed in. Can be either “script” or “module”. Default: "module" */ sourceType?: "script" | "module"; - /** An optional callback that can be used to wrap visitor methods. - * NOTE: This is useful for things like introspection, and not really needed for implementing anything. + /** + * An optional callback that can be used to wrap visitor methods. + * NOTE: This is useful for things like introspection, and not really needed for implementing anything. */ wrapPluginVisitorMethod?(pluginAlias: string, visitorType: 'enter' | 'exit', callback: (path: NodePath, state: any) => void): (path: NodePath, state: any) => void ; } diff --git a/types/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts index be3dfd8582..cd8ccd3821 100644 --- a/types/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -691,7 +691,7 @@ export class Region extends Object implements DomMixin { * Render a template with data by passing in the template selector and the * data to render. This is the default renderer that is used by Marionette. */ -export class Renderer { +export namespace Renderer { /** * This method returns a string containing the result of applying the * template using the data object as the context. @@ -703,7 +703,7 @@ export class Renderer { * that returns valid HTML as a string from the data parameter passed to * the function. */ - static render(template: any, data: any): string; + function render(template: any, data: any): string; } export interface ViewOptions extends Backbone.ViewOptions, ViewMixinOptions { @@ -1614,11 +1614,11 @@ export class Behavior extends Object { /** * DEPRECATED */ -export class Behaviors { +export namespace Behaviors { /** * This method defines where your behavior classes are stored. Override this to provide another lookup. */ - static behaviorsLookup(): any; + function behaviorsLookup(): any; /** * This method has a default implementation that is simple to override. It @@ -1626,5 +1626,5 @@ export class Behaviors { * Behaviors.behaviorsLookup or elsewhere. Note that it should return the type of the * class to instantiate, not an instance of that class. */ - static getBehaviorClass(options: any, key: string): any; + function getBehaviorClass(options: any, key: string): any; } diff --git a/types/bagpipes/index.d.ts b/types/bagpipes/index.d.ts index ec1d0cceb7..309ae38318 100755 --- a/types/bagpipes/index.d.ts +++ b/types/bagpipes/index.d.ts @@ -4,7 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export interface FittingContext { - /** The input defined in the fitting definition + /** + * The input defined in the fitting definition * (string, number, object, array) */ input: any; @@ -56,7 +57,7 @@ export type Fitting = ( * Executed during parsing * @see {@link https://github.com/apigee-127/bagpipes#fittings|Docs} * - * @param {Object} fittingDef Fitting Definition + * @param fittingDef Fitting Definition */ export type FittingFactory = (fittingDef: FittingDef, bagpipes: any) => Fitting; diff --git a/types/bitcoinjs-lib/index.d.ts b/types/bitcoinjs-lib/index.d.ts index 796758715d..4caa6e1e2d 100644 --- a/types/bitcoinjs-lib/index.d.ts +++ b/types/bitcoinjs-lib/index.d.ts @@ -62,7 +62,7 @@ export class Block { } export class ECPair { - constructor(d: BigInteger, Q?: null | undefined, options?: { compressed?: boolean, network?: Network }); + constructor(d: BigInteger, Q?: null, options?: { compressed?: boolean, network?: Network }); constructor(d: null | undefined, Q: any, options?: { compressed?: boolean, network?: Network }); // Q should be ECPoint, but not sure how to define such type diff --git a/types/blob-util/index.d.ts b/types/blob-util/index.d.ts index 9ab6cb4b5f..7710734bf2 100644 --- a/types/blob-util/index.d.ts +++ b/types/blob-util/index.d.ts @@ -14,59 +14,43 @@ export function createBlob(parts: any[], options?: { type: string }): Blob; /** * Shim for URL.createObjectURL() to support browsers that only have the prefixed webkitURL (e.g. Android <4.4). - * - * @param blob */ export function createObjectURL(blob: Blob): string; /** * Shim for URL.revokeObjectURL() to support browsers that only have the prefixed webkitURL (e.g. Android <4.4). - * - * @param url */ export function revokeObjectURL(url: string): void; /** * Convert a Blob to a binary string. - * - * @param blob */ export function blobToBinaryString(blob: Blob): Promise; /** * Convert a binary string to a Blob. - * - * @param binary * @param type the content type */ export function binaryStringToBlob(binary: string, type?: string): Promise; /** * Convert a Blob to a base-64 string. - * - * @param blob */ export function blobToBase64String(blob: Blob): Promise; /** * Convert a base-64 string to a Blob. - * - * @param base64 * @param type the content type */ export function base64StringToBlob(base64: string, type?: string): Promise; /** * Convert a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`) to a Blob. - * - * @param dataURL */ export function dataURLToBlob(dataURL: string): Promise; /** * Convert a Blob to a data URL string (e.g. `'data:image/png;base64,iVBORw0KG...'`). - * - * @param blob */ export function blobToDataURL(blob: Blob): Promise; @@ -75,7 +59,6 @@ export function blobToDataURL(blob: Blob): Promise; * * Note: this will coerce the image to the desired content type, and it will only paint the first frame of an animated GIF. * - * @param src * @param type the content type (optional, defaults to 'image/png') * @param crossOrigin for CORS-enabled images, set this to 'Anonymous' to avoid "tainted canvas" errors * @param quality a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' @@ -85,7 +68,6 @@ export function imgSrcToDataURL(src: string, type?: string, crossOrigin?: string /** * Convert a canvas to a Blob. * - * @param src * @param type the content type (optional, defaults to 'image/png') * @param quality a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' */ @@ -96,7 +78,6 @@ export function canvasToBlob(canvas: HTMLCanvasElement, type?: string, quality?: * * Note: this will coerce the image to the desired content type, and it will only paint the first frame of an animated GIF. * - * @param src * @param type the content type (optional, defaults to 'image/png') * @param crossOrigin for CORS-enabled images, set this to 'Anonymous' to avoid "tainted canvas" errors * @param quality a number between 0 and 1 indicating image quality if the requested type is 'image/jpeg' or 'image/webp' @@ -106,14 +87,11 @@ export function imgSrcToBlob(src: string, type?: string, crossOrigin?: string, q /** * Convert an ArrayBuffer to a Blob. * - * @param arrayBuff * @param type the content type */ export function arrayBufferToBlob(arrayBuff: ArrayBuffer, type?: string): Promise; /** * Convert a Blob to an ArrayBuffer. - * - * @param blob */ export function blobToArrayBuffer(blob: Blob): Promise; diff --git a/types/bluebird-global/tslint.json b/types/bluebird-global/tslint.json index 1d81af2349..31bf31d881 100644 --- a/types/bluebird-global/tslint.json +++ b/types/bluebird-global/tslint.json @@ -6,6 +6,7 @@ "array-type": false, "unified-signatures": false, "ban-types": false, + "no-redundant-undefined": false, "no-unnecessary-generics": false } } diff --git a/types/bluebird/tslint.json b/types/bluebird/tslint.json index 44da6a5d92..3f946593ed 100644 --- a/types/bluebird/tslint.json +++ b/types/bluebird/tslint.json @@ -3,6 +3,7 @@ "rules": { "adjacent-overload-signatures": false, "max-line-length": [true, 490], + "no-redundant-undefined": false, "no-unnecessary-callback-wrapper": false, "no-unnecessary-generics": false, "no-void-expression": false, diff --git a/types/bootstrap-slider/index.d.ts b/types/bootstrap-slider/index.d.ts index 557c7aa5ad..b17f912d57 100644 --- a/types/bootstrap-slider/index.d.ts +++ b/types/bootstrap-slider/index.d.ts @@ -134,7 +134,6 @@ interface SliderPlugin { (methodName: string, ...args: any[]): TJQuery; /** * Creates a slider from the current element. - * @param options */ (options?: SliderOptions): TJQuery; } @@ -163,9 +162,6 @@ declare class Slider { /** * Set a new value for the slider. If optional triggerSlideEvent parameter is true, 'slide' events will be triggered. * If optional triggerChangeEvent parameter is true, 'change' events will be triggered. - * @param newValue - * @param triggerSlideEvent - * @param triggerChangeEvent */ setValue(newValue: number, triggerSlideEvent?: boolean, triggerChangeEvent?: boolean): this; /** @@ -186,13 +182,10 @@ declare class Slider { isEnabled(): boolean; /** * Updates the slider's attributes - * @param attribute - * @param value */ setAttribute(attribute: string, value: any): this; /** * Get the slider's attributes - * @param attribute */ getAttribute(attribute: string): any; /** diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index 5754236da8..abfd4ddd98 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -88,13 +88,13 @@ declare namespace Bull { /** * Removes a job from the queue and from any lists it may be included in. - * @returns {Promise} A promise that resolves when the job is removed. + * @returns A promise that resolves when the job is removed. */ remove(): Promise; /** * Re-run a job that has failed. - * @returns {Promise} A promise that resolves when the job is scheduled for retry. + * @returns A promise that resolves when the job is scheduled for retry. */ retry(): Promise; diff --git a/types/bunyan-blackhole/index.d.ts b/types/bunyan-blackhole/index.d.ts index f8be6fc730..2ece8b2f40 100644 --- a/types/bunyan-blackhole/index.d.ts +++ b/types/bunyan-blackhole/index.d.ts @@ -7,8 +7,8 @@ import * as Logger from "bunyan"; /** * Constructor. - * @param {string} [name] name of the blackhole Logger - * @return {Logger} A bunyan logger . + * @param name name of the blackhole Logger + * @return A bunyan logger . */ declare function bunyanBlackHole(name: string): Logger; export = bunyanBlackHole; diff --git a/types/chai-jest-snapshot/index.d.ts b/types/chai-jest-snapshot/index.d.ts index f19158e282..40ce5afc1b 100644 --- a/types/chai-jest-snapshot/index.d.ts +++ b/types/chai-jest-snapshot/index.d.ts @@ -9,12 +9,7 @@ declare global { namespace Chai { interface Assertion { - /** - * Assert that the object matches the snapshot - * @param snapshotFilename - * @param snapshotName - * @param update - */ + /** Assert that the object matches the snapshot */ matchSnapshot(snapshotFilename?: string, snapshotName?: string, update?: boolean): Assertion; matchSnapshot(update: boolean): Assertion; } @@ -22,40 +17,24 @@ declare global { } interface ChaiJestSnapshot { - /** - * Chai bootstrapper - * @param chai - * @param utils - */ + /** Chai bootstrapper */ (chai: any, utils: any): void; - /** - * Set snapshot file name - * @param filename - */ + /** Set snapshot file name */ setFileName(filename: string): void; /** * Set snapshot test name - * @param testname */ setTestName(testname: string): void; - /** - * Configure snapshot name using mocha context - * @param context - */ + /** Configure snapshot name using mocha context */ configureUsingMochaContext(context: Mocha.IBeforeAndAfterContext): void; - /** - * Reset snapshot registry - */ + /** Reset snapshot registry */ resetSnapshotRegistry(): void; - /** - * Add a serializer plugin - * @param serializer - */ + /** Add a serializer plugin */ addSerializer(serializer: any): void; } diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index f826c8f254..c18484dc1f 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -34,9 +34,6 @@ declare namespace chroma { /** * Create a color in the specified color space using a, b and c as values. * - * @param a - * @param b - * @param c * @param colorSpace The color space to use. Defaults to "rgb". * @return the color object. */ diff --git a/types/clipboard/index.d.ts b/types/clipboard/index.d.ts index 0aa51518dd..76d28674d6 100644 --- a/types/clipboard/index.d.ts +++ b/types/clipboard/index.d.ts @@ -8,7 +8,7 @@ declare class Clipboard { /** * Subscribes to events that indicate the result of a copy/cut operation. - * @param type {"success" | "error"} Event type ('success' or 'error'). + * @param type Event type ('success' or 'error'). * @param handler Callback function. */ on(type: "success" | "error", handler: (e: Clipboard.Event) => void): this; @@ -29,22 +29,21 @@ declare namespace Clipboard { interface Options { /** * Overwrites default command ('cut' or 'copy'). - * @param {Element} elem Current element - * @returns {String} Only 'cut' or 'copy'. + * @param elem Current element */ - action?(elem: Element): string; + action?(elem: Element): "cut" | "copy"; /** * Overwrites default target input element. - * @param {Element} elem Current element - * @returns {Element} element to use. + * @param elem Current element + * @returns element to use. */ target?(elem: Element): Element; /** * Returns the explicit text to copy. - * @param {Element} elem Current element - * @returns {String} Text to be copied. + * @param elem Current element + * @returns Text to be copied. */ text?(elem: Element): string; } diff --git a/types/combine-source-map/index.d.ts b/types/combine-source-map/index.d.ts index 43f1c994b0..3855942092 100644 --- a/types/combine-source-map/index.d.ts +++ b/types/combine-source-map/index.d.ts @@ -3,13 +3,15 @@ // Definitions by: TeamworkGuy2 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/** Add source maps of multiple files, offset them and then combine them into one source map. +/** + * Add source maps of multiple files, offset them and then combine them into one source map. * (documentation based on project's README file) */ declare class Combiner { constructor(file?: string, sourceRoot?: string); - /** Adds map to underlying source map. + /** + * Adds map to underlying source map. * If source contains a source map comment that has the source of the original file inlined it will offset these * mappings and include them. * If no source map comment is found or it has no source inlined, mappings for the file will be generated and included @@ -18,12 +20,14 @@ declare class Combiner { */ addFile(opts: { sourceFile: string; source: string }, offset?: Combiner.Offset): Combiner; - /** output the combined source map in base64 format + /** + * output the combined source map in base64 format * @return base64 encoded combined source map */ base64(): string; - /** generate a base64 encoded sourceMappingURL comment + /** + * generate a base64 encoded sourceMappingURL comment * @return base64 encoded sourceMappingUrl comment of the combined source map */ comment(): string; @@ -40,15 +44,15 @@ declare namespace Combiner { column?: number; } - /** Create a source map combiner that accepts multiple files, offsets them and then combines them into one source map. + /** + * Create a source map combiner that accepts multiple files, offsets them and then combines them into one source map. * @param file optional name of the generated file * @param sourceRoot optional sourceRoot of the map to be generated * @return Combiner instance to which source maps can be added and later combined */ function create(file?: string, sourceRoot?: string): Combiner; - /** removeComments - * @param src + /** * @return src with all sourceMappingUrl comments removed */ function removeComments(src: string): string; diff --git a/types/convert-source-map/index.d.ts b/types/convert-source-map/index.d.ts index 6b1346b61f..6950445a6c 100644 --- a/types/convert-source-map/index.d.ts +++ b/types/convert-source-map/index.d.ts @@ -3,7 +3,8 @@ // Definitions by: Andrew Gaspar , Melvin Groenhoff , TeamworkGuy2 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/** Converts a source-map from/to different formats and allows adding/changing properties. +/** + * Converts a source-map from/to different formats and allows adding/changing properties. * (documentation based on project's README file) */ export interface SourceMapConverter { @@ -19,7 +20,8 @@ export interface SourceMapConverter { /** Converts source map to base64 encoded json string */ toBase64(): string; - /** Converts source map to an inline comment that can be appended to the source-file. + /** + * Converts source map to an inline comment that can be appended to the source-file. * By default, the comment is formatted like: //# sourceMappingURL=..., which you would normally see in a JS source file. * When options.multiline == true, the comment is formatted like: /*# sourceMappingURL=... *\/, which you would find in a CSS source file */ @@ -47,16 +49,19 @@ export function fromBase64(base64: string): SourceMapConverter; /** Returns source map converter from given base64 encoded json string prefixed with //# sourceMappingURL=... */ export function fromComment(comment: string): SourceMapConverter; -/** Returns source map converter from given filename by parsing //# sourceMappingURL=filename. +/** + * Returns source map converter from given filename by parsing //# sourceMappingURL=filename. * filename must point to a file that is found inside the mapFileDir. Most tools store this file right next to the generated file, i.e. the one containing the source map. */ export function fromMapFileComment(comment: string, commentFileDir: string): SourceMapConverter; -/** Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. +/** + * Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. */ export function fromSource(content: string): SourceMapConverter | null; -/** Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. +/** + * Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. * The sourcemap will be read from the map file found by parsing # sourceMappingURL=file comment. For more info see fromMapFileComment. */ export function fromMapFileSource(content: string, commentFileDir: string): SourceMapConverter | null; @@ -73,7 +78,8 @@ export const commentRegex: RegExp; /** Returns a new regex used to find source map comments pointing to map files */ export const mapFileCommentRegex: RegExp; -/** Returns a comment that links to an external source map via file. +/** + * Returns a comment that links to an external source map via file. * By default, the comment is formatted like: //# sourceMappingURL=..., which you would normally see in a JS source file. * When options.multiline == true, the comment is formatted like: /*# sourceMappingURL=... *\/, which you would find in a CSS source file. */ diff --git a/types/convict/index.d.ts b/types/convict/index.d.ts index 5aac427dd0..9a31e0ccbb 100644 --- a/types/convict/index.d.ts +++ b/types/convict/index.d.ts @@ -69,48 +69,40 @@ declare namespace convict { * Sets the value of name to value. name can use dot notation to reference * nested values, e.g. "database.port". If objects in the chain don't yet * exist, they will be initialized to empty objects - * - * @return {Config} instance */ set(name: string, value: any): Config; /** * Loads and merges a JavaScript object into config - * - * @return {Config} instance */ load(conf: Object): Config; /** * Loads and merges JSON configuration file(s) into config - * - * @return {Config} instance */ loadFile(files: string | string[]): Config; /** * Validates config against the schema used to initialize it - * - * @param options */ validate(options?: ValidateOptions): Config; /** * Exports all the properties (that is the keys and their current values) as a {JSON} {Object} - * @returns {Object} A {JSON} compliant {Object} + * @returns A {JSON} compliant {Object} */ getProperties(): Object; /** * Exports the schema as a {JSON} {Object} - * @returns {Object} A {JSON} compliant {Object} + * @returns A {JSON} compliant {Object} */ getSchema(): Object; /** * Exports all the properties (that is the keys and their current values) as a JSON string. - * @returns {String} a string representing this object + * @returns A string representing this object */ toString(): string; /** * Exports the schema as a JSON string. - * @returns {String} a string representing the schema of this {Config} + * @returns A string representing the schema of this {Config} */ getSchemaString(): string; } diff --git a/types/cookie-signature/index.d.ts b/types/cookie-signature/index.d.ts index b9b29911a6..cb044f4636 100644 --- a/types/cookie-signature/index.d.ts +++ b/types/cookie-signature/index.d.ts @@ -3,19 +3,11 @@ // Definitions by: François Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/** - * Sign the given `val` with `secret`. - * @param {string} val - * @param {string} secret - * @return {string} - */ +/** Sign the given `val` with `secret`. */ export function sign(value: string, secret: string): string; /** * Unsign and decode the given `val` with `secret`, * returning `false` if the signature is invalid. - * @param {string} val - * @param {string} secret - * @return {string|boolean} */ export function unsign(value: string, secret: string): string | boolean; diff --git a/types/cordova-plugin-native-keyboard/index.d.ts b/types/cordova-plugin-native-keyboard/index.d.ts index 0f64199bd1..9acc3d0be5 100644 --- a/types/cordova-plugin-native-keyboard/index.d.ts +++ b/types/cordova-plugin-native-keyboard/index.d.ts @@ -6,7 +6,6 @@ interface NativeKeyboard { /** * Show the messenger, the bare minimum which has to be passed to the function is * the onSubmit callback - * @param options */ showMessenger( options: NativeKeyboardShowOptions @@ -16,10 +15,6 @@ interface NativeKeyboard { * It's likely your app only has 1 one page where you want to show the messenger, * so you want to hide it when the user navigates away. You can choose to do this * either animated (a quick slide down animation) or not. - * - * @param options - * @param onSuccess - * @param onError */ hideMessenger( options?: NativeKeyboardHideOptions, @@ -29,9 +24,6 @@ interface NativeKeyboard { /** * Show a previously hidden keyboard - * - * @param onSuccess - * @param onError */ showMessengerKeyboard( onSuccess?: () => void, @@ -40,9 +32,6 @@ interface NativeKeyboard { /** * Hide the keyboard, but not the messenger bar - * - * @param onSuccess - * @param onError */ hideMessengerKeyboard( onSuccess?: () => void, @@ -53,10 +42,6 @@ interface NativeKeyboard { * Manipulate the messenger while it's open. For instance if you want to * update the text programmatically based on what the user typed (by responding to * onTextChanged events). - * - * @param options - * @param onSuccess - * @param onError */ updateMessenger( options: NativeKeyboardUpdateOptions, @@ -92,7 +77,6 @@ interface NativeKeyboardHideOptions { interface NativeKeyboardShowOptions { /** * Callback function, which is being called as soon as the user submits - * @param text */ onSubmit(text: string): void; @@ -119,8 +103,6 @@ interface NativeKeyboardShowOptions { /** * Callback function which is being executed as soon as the entered text changes. Will * return the new text - * - * @param text */ onTextChanged?(text: string): void; diff --git a/types/cytoscape/index.d.ts b/types/cytoscape/index.d.ts index 3a618195d1..21d6d4344b 100644 --- a/types/cytoscape/index.d.ts +++ b/types/cytoscape/index.d.ts @@ -2711,7 +2711,8 @@ declare namespace cytoscape { * http://js.cytoscape.org/#eles.degreeCentrality */ interface SearchDegreeCentralityOptions { - /** The root node (selector or collection) for which the + /** + * The root node (selector or collection) for which the * centrality calculation is made. */ root: NodeSingular | Selector; @@ -2725,7 +2726,8 @@ declare namespace cytoscape { * in the centrality calculation. */ alpha?: number; - /** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or + /** + * Whether the directed indegree and outdegree centrality is calculated (true) or * whether the undirected centrality is calculated (false, default). */ directed?: boolean; @@ -2757,7 +2759,8 @@ declare namespace cytoscape { * in the centrality calculation. */ alpha?: number; - /** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or + /** + * A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or * whether the undirected centrality is calculated (false, default). */ directed?: boolean; @@ -2780,14 +2783,16 @@ declare namespace cytoscape { * http://js.cytoscape.org/#eles.closenessCentrality */ interface SearchClosenessCentralityOptions { - /** The root node (selector or collection) for which the + /** + * The root node (selector or collection) for which the * centrality calculation is made. */ root: NodeSingular | Selector; /** A function that returns the weight for the edge. */ weight?(edge: EdgeSingular): number; - /** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or + /** + * A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or * whether the undirected centrality is calculated (false, default). */ directed?: boolean; @@ -2829,7 +2834,8 @@ declare namespace cytoscape { /** A function that returns the weight for the edge. */ weight?(edge: EdgeSingular): number; - /** A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or + /** + * A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or * whether the undirected centrality is calculated (false, default). */ directed?: boolean; @@ -3976,7 +3982,8 @@ declare namespace cytoscape { originalEvent: EventObject; } interface LayoutEventObject extends AbstractEventObject { - /** layout : indicates the corresponding layout that triggered the event + /** + * layout : indicates the corresponding layout that triggered the event * (useful if running multiple layouts simultaneously) */ layout: any; @@ -4357,12 +4364,14 @@ declare namespace cytoscape { * A new, developer accessible layout can be made via cy.makeLayout(). */ interface LayoutManipulation { - /** Start running the layout + /** + * Start running the layout * http://js.cytoscape.org/#layout.run */ run(): void; start(): void; - /** Stop running the (asynchronous/discrete) layout + /** + * Stop running the (asynchronous/discrete) layout * http://js.cytoscape.org/#layout.stop */ stop(): void; diff --git a/types/delay/index.d.ts b/types/delay/index.d.ts index f84c7ab5e4..0ec894f1e1 100644 --- a/types/delay/index.d.ts +++ b/types/delay/index.d.ts @@ -22,9 +22,9 @@ declare namespace delay { type PDelayedPassThroughThunk = ((value: TValue) => DelayedPromiseLike) & DelayedPromiseLike; interface DelayedPromiseLike { - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): Promise; cancel(): void; } } diff --git a/types/dom-inputevent/index.d.ts b/types/dom-inputevent/index.d.ts index df1cce5ec4..0d2111a0e0 100644 --- a/types/dom-inputevent/index.d.ts +++ b/types/dom-inputevent/index.d.ts @@ -7,11 +7,11 @@ interface InputEventInit extends UIEventInit { data?: string; isComposing: boolean; } -interface InputEvent extends UIEvent { + +// tslint:disable-next-line no-empty-interface +interface InputEvent extends UIEvent {} +declare class InputEvent { + constructor(typeArg: 'input' | 'beforeinput', inputEventInit?: InputEventInit); readonly data: string; readonly isComposing: boolean; } - -declare class InputEvent { - constructor(typeArg: 'input' | 'beforeinput', inputEventInit?: InputEventInit); -} diff --git a/types/dwt/tslint.json b/types/dwt/tslint.json index acce7c8a0b..5d3b93bdf9 100644 --- a/types/dwt/tslint.json +++ b/types/dwt/tslint.json @@ -1,7 +1,9 @@ { "extends": "dtslint/dt.json", "rules": { + "jsdoc-format": false, "max-line-length": [false], + "no-redundant-jsdoc": false, "no-trailing-whitespace": false, "space-before-function-paren": false, "only-arrow-functions": [false] diff --git a/types/dwt/v12/tslint.json b/types/dwt/v12/tslint.json index acce7c8a0b..5d3b93bdf9 100644 --- a/types/dwt/v12/tslint.json +++ b/types/dwt/v12/tslint.json @@ -1,7 +1,9 @@ { "extends": "dtslint/dt.json", "rules": { + "jsdoc-format": false, "max-line-length": [false], + "no-redundant-jsdoc": false, "no-trailing-whitespace": false, "space-before-function-paren": false, "only-arrow-functions": [false] diff --git a/types/electron-settings/v2/index.d.ts b/types/electron-settings/v2/index.d.ts index a869fd52b8..2f767358e5 100644 --- a/types/electron-settings/v2/index.d.ts +++ b/types/electron-settings/v2/index.d.ts @@ -73,7 +73,6 @@ declare class Settings extends EventEmitter { * * @param keyPath The path to the key whose value we wish to set. This key need not already exist. * @param value The value to set the key at the chosen key path to. This must be a data type supported by JSON: object, array, string, number, boolean, or null. - * @param options * @throws if key path is not a string. * @throws if options is not an object. * @see setSync @@ -91,7 +90,6 @@ declare class Settings extends EventEmitter { * Deletes the key and value at the chosen key path. * * @param keyPath The path to the key we wish to unset. - * @param options * @throws if keyPath is not a string. * @throws if options is not an object. * @see deleteSync diff --git a/types/execa/index.d.ts b/types/execa/index.d.ts index c74c60672d..84c6939798 100644 --- a/types/execa/index.d.ts +++ b/types/execa/index.d.ts @@ -43,7 +43,7 @@ interface ExecaReturns { type ExecaError = Error & ExecaReturns; interface ExecaChildPromise { - catch(onrejected?: ((reason: ExecaError) => TResult | PromiseLike) | undefined | null): Promise; + catch(onrejected?: ((reason: ExecaError) => TResult | PromiseLike) | null): Promise; } type ExecaChildProcess = ChildProcess & ExecaChildPromise & Promise; diff --git a/types/express-brute-mongo/index.d.ts b/types/express-brute-mongo/index.d.ts index 56af09a099..0b637ed37b 100644 --- a/types/express-brute-mongo/index.d.ts +++ b/types/express-brute-mongo/index.d.ts @@ -8,15 +8,8 @@ import { Collection } from "mongodb"; /** * @summary MongoDB store adapter. - * @class */ declare class MongoStore { - /** - * @summary Constructor. - * @constructor - * @param {Function} getCollection The collection. - * @param {Object} options The otpions. - */ constructor(getCollection: (collection: (c: Collection) => void) => void, options?: Object); } export = MongoStore; diff --git a/types/express-brute-mongo/tslint.json b/types/express-brute-mongo/tslint.json index c0ad422b87..81e3db2614 100644 --- a/types/express-brute-mongo/tslint.json +++ b/types/express-brute-mongo/tslint.json @@ -1,8 +1,9 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO + // TODOs "ban-types": false, - "dt-header": false + "dt-header": false, + "no-unnecessary-class": false } } diff --git a/types/express-mysql-session/index.d.ts b/types/express-mysql-session/index.d.ts index f8d6282ecd..14c857b5dc 100644 --- a/types/express-mysql-session/index.d.ts +++ b/types/express-mysql-session/index.d.ts @@ -30,106 +30,35 @@ declare namespace MySQLStore { } declare class MySQLStore { - /** - * @param {MySQLStore.Options} options - * @param {any} connection? - * @param {(error:any)=>void} callback? - */ constructor(options: MySQLStore.Options, connection?: any, callback?: (error: any) => void); - /** - * @returns void - */ setDefaultOptions(): void; - /** - * @param {(error:any)=>void} callback? - * @returns void - */ createDatabaseTable(callback?: (error: any) => void): void; - /** - * @param {string} sessionId - * @param {(error:any,session:any)=>void} callback? - * @returns void - */ get(sessionId: string, callback?: (error: any, session: any) => void): void; - /** - * @param {string} sessionId - * @param {any} data - * @param {(error:any)=>void} callback? - * @returns void - */ set(sessionId: string, data: any, callback?: (error: any) => void): void; - /** - * @param {string} sessionId - * @param {any} data - * @param {(error:any)=>void} callback? - * @returns void - */ touch(sessionId: string, data: any, callback?: (error: any) => void): void; - /** - * @param {string} sessionId - * @param {(error:any)=>void} callback? - * @returns void - */ destroy(sessionId: string, callback?: (error: any) => void): void; - /** - * @param {(error:any,count:any)=>void} callback? - * @returns void - */ length(callback?: (error: any, count: any) => void): void; - /** - * @param {(error:any)=>void} callback? - * @returns void - */ clear(callback?: (error: any) => void): void; - /** - * @param {(error:any)=>void} callback? - * @returns void - */ clearExpiredSessions(callback?: (error: any) => void): void; - /** - * @param {number} interval - * @returns void - */ setExpirationInterval(interval: number): void; - /** - * @returns void - */ clearExpirationInterval(): void; - /** - * @param {()=>void} callback? - * @returns void - */ close(callback?: () => void): void; - /** - * @param {any} object - * @param {any} defaultValues - * @param {any} options? - * @returns void - */ default(object: any, defaultValues: any, options?: any): void; - /** - * @param {any} object - * @returns void - */ clone(object: any): void; - /** - * @param {any} value - * @returns void - */ isObject(value: any): void; } diff --git a/types/firebird/index.d.ts b/types/firebird/index.d.ts index eaa20682a6..771a61f706 100644 --- a/types/firebird/index.d.ts +++ b/types/firebird/index.d.ts @@ -29,10 +29,6 @@ declare module 'firebird' { * Connects you to database, * * @param database a database name in Firebird notation, i.e. : - * @param username user name - * @param pasword - * @param role - * * @throws raises exception on error (try to catch it). */ connectSync(db: string, user: string, pass: string, role: string): void; @@ -41,9 +37,6 @@ declare module 'firebird' { * Asynchronously connects you to Database. * * @param database a database name in Firebird notation, i.e. : - * @param username user name - * @param pasword - * @param role * @param callback function(err), where err is error object in case of error. */ connect(db: string, user: string, pass: string, role: string, callback: (err: Error | null) => void): void; @@ -148,7 +141,8 @@ declare module 'firebird' { */ start(callback: (err: Error | null) => void): void; - /**Synchronously prepares SQL statement and returns FBStatement object. + /** + * Synchronously prepares SQL statement and returns FBStatement object. * * @param sql an SQL query to prepare. */ @@ -327,7 +321,7 @@ declare module 'firebird' { * Synchronously prepares SQL statement * * @param sql an SQL query to prepare. - * @returns @see FBStatement object in context of this transaction. + * @returns object in context of this transaction. */ prepareSync(sql: string): FBStatement; @@ -357,9 +351,6 @@ declare module 'firebird' { /** * Same as @see execSync but executes statement in context of given @see Transaction obejct. - * - * @param transaction - * @param params */ execInTransSync(transaction: Transaction, ...params: DataType[]): void; @@ -377,9 +368,6 @@ declare module 'firebird' { /** * Same as @see exec but executes statement in context of given @see Transaction obejct. - * - * @param transaction - * @param params */ execInTrans(transaction: Transaction, ...params: DataType[]): void; } diff --git a/types/flickity/index.d.ts b/types/flickity/index.d.ts index fda440b1fe..ae5dc46cb7 100644 --- a/types/flickity/index.d.ts +++ b/types/flickity/index.d.ts @@ -80,19 +80,16 @@ declare class Flickity { // properties /** - * @type integer * The selected cell index. */ selectedIndex: number; /** - * @type Element * The selected cell element. */ selectedElement: Element; /** - * @type Element[] * The array of cells. Use cells.length for the total number of cells. */ cells: Element[]; @@ -144,10 +141,9 @@ declare class Flickity { /** * Select a slide of a cell. Useful for groupCells. * - * @param {number | string} index Zero-based index OR selector string of the cell to select. - * @param {boolean} [isWrapped] Optional. If true, the last slide will be selected if at the first slide. - * @param {boolean} [isInstant] If true, immediately view the selected slide without animation. - * @memberof Flickity + * @param index Zero-based index OR selector string of the cell to select. + * @param isWrapped If true, the last slide will be selected if at the first slide. + * @param isInstant If true, immediately view the selected slide without animation. */ selectCell(index: number | string, isWrapped?: boolean, isInstant?: boolean): void; diff --git a/types/fm-websync/index.d.ts b/types/fm-websync/index.d.ts index ef5d51d64b..997c4666d1 100644 --- a/types/fm-websync/index.d.ts +++ b/types/fm-websync/index.d.ts @@ -469,8 +469,6 @@ declare namespace fm { * While this method will typically run asychronously, the WebSync client is designed to be used without (much) consideration for its asynchronous nature. * To that end, any calls to methods that require an active connection, like bind, subscribe and publish, will be queued automatically and executed once this * method has completed successfully. - * - * @param connectConfig */ connect(config: connectConfig): client; @@ -506,7 +504,6 @@ declare namespace fm { * Unsubscribes the client from receiving messages on one or more channels. * When the unsubscribe completes successfully, the callback specified by onSuccess will be invoked, passing in the unsubscribed channel(s), * including any modifications made on the server. - * @param config */ unsubscribe(config: unsubscribeConfig): client; } diff --git a/types/fs-extra-promise-es6/index.d.ts b/types/fs-extra-promise-es6/index.d.ts index f5847dd6f0..0f52b5c02e 100644 --- a/types/fs-extra-promise-es6/index.d.ts +++ b/types/fs-extra-promise-es6/index.d.ts @@ -117,64 +117,15 @@ export function write(fd: number, buffer: NodeBuffer, offset: number, length: nu export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void): void; export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; -/** - * readFile - * @param filename - * @param options - * string: encoding - * OpenOptions: options - * @param callback - */ export function readFile(filename: string, options: OpenOptions | string, callback: (err: Error, data: string) => void): void; export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void): void; export function readFileSync(filename: string): NodeBuffer; -/** - * readFileSync - * @param filename - * @param options - * string: encoding - * OpenOptions: options - */ export function readFileSync(filename: string, options: OpenOptions | string): string; -/** - * writeFile - * @param filename - * @param data - * @param options - * string: encoding - * OpenOptions: options - * @param callback - */ export function writeFile(filename: string, data: any, callback?: (err: Error) => void): void; export function writeFile(filename: string, data: any, options: OpenOptions | string, callback?: (err: Error) => void): void; -/** - * writeFileSync - * @param filename - * @param data - * @param option - * string: encoding - * OpenOptions: options - */ export function writeFileSync(filename: string, data: any, option?: OpenOptions | string): void; -/** - * appendFile - * @param filename - * @param data - * @param option: - * string: encoding - * OpenOptions: options - * @param callback - */ export function appendFile(filename: string, data: any, callback?: (err: Error) => void): void; export function appendFile(filename: string, data: any, option: OpenOptions | string, callback?: (err: Error) => void): void; -/** - * appendFileSync - * @param filename - * @param data - * @param option - * string: encoding - * OpenOptions: options - */ export function appendFileSync(filename: string, data: any, option?: OpenOptions | string): void; export function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void; export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void; @@ -252,32 +203,9 @@ export function futimesAsync(fd: number, atime: number, mtime: number): Promise< export function fsyncAsync(fd: number): Promise; export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -/** - * readFileAsync - * @param filename - * @param options: - * string: encoding - * OpenOptions: options - */ export function readFileAsync(filename: string, options: OpenOptions | string): Promise; export function readFileAsync(filename: string): Promise; -/** - * writeFileAsync - * @param filename - * @param data - * @param options: - * string: encoding - * OpenOptions: options - */ export function writeFileAsync(filename: string, data: any, options?: OpenOptions | string): Promise; -/** - * appendFileAsync - * @param filename - * @param data - * @param option: - * string: encoding - * OpenOptions: option - */ export function appendFileAsync(filename: string, data: any, option?: OpenOptions | string): Promise; export function existsAsync(path: string): Promise; diff --git a/types/fs-extra-promise/index.d.ts b/types/fs-extra-promise/index.d.ts index 9d174f791f..de47c81a1e 100644 --- a/types/fs-extra-promise/index.d.ts +++ b/types/fs-extra-promise/index.d.ts @@ -19,14 +19,6 @@ export interface MkdirOptions { } // promisified versions -/** - * copyAsync - * @param src - * @param dest - * @param options - * CopyFilter: filter - * CopyOptions: options - */ export function copyAsync(src: string, dest: string, options?: CopyFilter | CopyOptions): Promise; export function createFileAsync(file: string): Promise; @@ -75,32 +67,9 @@ export function futimesAsync(fd: number, atime: number, mtime: number): Promise< export function fsyncAsync(fd: number): Promise; export function writeAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; export function readAsync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): Promise<[number, NodeBuffer]>; -/** - * readFileAsync - * @param filename - * @param options: - * string: encoding - * ReadOptions: options - */ export function readFileAsync(filename: string, options: string | ReadOptions): Promise; export function readFileAsync(filename: string): Promise; -/** - * writeFileAsync - * @param filename - * @param data - * @param options: - * string: encoding - * WriteOptions: options - */ export function writeFileAsync(filename: string, data: any, options?: string | WriteOptions): Promise; -/** - * appendFileAsync - * @param filename - * @param data - * @param options: - * string: encoding - * WriteOptions: options - */ export function appendFileAsync(filename: string, data: any, option?: string | WriteOptions): Promise; export function existsAsync(path: string): Promise; diff --git a/types/fs-extra/index.d.ts b/types/fs-extra/index.d.ts index 60c112c68b..84548e48a4 100644 --- a/types/fs-extra/index.d.ts +++ b/types/fs-extra/index.d.ts @@ -154,15 +154,12 @@ export function lstat(path: string | Buffer): Promise; /** * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * - * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ export function mkdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; /** * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * - * @param path - * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ export function mkdir(path: string | Buffer, mode: number | string, callback: (err?: NodeJS.ErrnoException | null) => void): void; @@ -200,7 +197,6 @@ export function rename(oldPath: string, newPath: string): Promise; /** * Asynchronous rmdir - removes the directory specified in {path} * - * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ export function rmdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; @@ -219,7 +215,6 @@ export function truncate(path: string | Buffer, len?: number): Promise; /** * Asynchronous unlink - deletes the file specified in {path} * - * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ export function unlink(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; @@ -245,7 +240,6 @@ export function writeFile(file: string | Buffer | number, data: any, options: { /** * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. * - * @param prefix * @param callback The created folder path is passed as a string to the callback's second parameter. */ export function mkdtemp(prefix: string): Promise; diff --git a/types/geodesy/index.d.ts b/types/geodesy/index.d.ts index 1d8ef3e110..d66de9fe3d 100644 --- a/types/geodesy/index.d.ts +++ b/types/geodesy/index.d.ts @@ -94,15 +94,12 @@ export class Utm { export namespace Dms { let separator: string; -} - -export class Dms { - static parseDMS(dmsStr: string): number; - static toDMS(deg: number, format?: format, dp?: 0 | 2 | 4): string; - static toLat(deg: number, format?: format, dp?: 0 | 2 | 4): string; - static toLon(deg: number, format?: format, dp?: 0 | 2 | 4): string; - static toBrng(deg: number, format?: format, dp?: 0 | 2 | 4): string; - static compassPoint(bearing: number, precision?: 1 | 2 | 3): string; + function parseDMS(dmsStr: string): number; + function toDMS(deg: number, format?: format, dp?: 0 | 2 | 4): string; + function toLat(deg: number, format?: format, dp?: 0 | 2 | 4): string; + function toLon(deg: number, format?: format, dp?: 0 | 2 | 4): string; + function toBrng(deg: number, format?: format, dp?: 0 | 2 | 4): string; + function compassPoint(bearing: number, precision?: 1 | 2 | 3): string; } export class Vector3d { diff --git a/types/geolib/index.d.ts b/types/geolib/index.d.ts index 8842c3eb20..b8638ecc71 100644 --- a/types/geolib/index.d.ts +++ b/types/geolib/index.d.ts @@ -47,25 +47,29 @@ declare namespace geolib { unit: string; } - /** Calculates the distance between two geo coordinates + /** + * Calculates the distance between two geo coordinates * * Return value is always float and represents the distance in meters. */ function getDistance(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number, precision?: number): number; - /** Calculates the distance between two geo coordinates but this method is far more inaccurate as compared to getDistance. + /** + * Calculates the distance between two geo coordinates but this method is far more inaccurate as compared to getDistance. * It can take up 2 to 3 arguments. start, end and accuracy can be defined in the same as in getDistance. * * Return value is always float that represents the distance in meters. */ function getDistanceSimple(start: PositionAsDecimal|PositionAsSexadecimal, end: PositionAsDecimal|PositionAsSexadecimal, accuracy?: number): number; - /** Calculates the geographical center of all points in a collection of geo coordinates + /** + * Calculates the geographical center of all points in a collection of geo coordinates * Takes an object or array of coordinates and calculates the center of it. */ function getCenter(coords: PositionAsDecimal[]): PositionAsDecimal; - /** Calculates the center of the bounds of geo coordinates. Takes an array of coordinates, + /** + * Calculates the center of the bounds of geo coordinates. Takes an array of coordinates, * calculate the border of those, and gives back the center of that rectangle. On polygons * like political borders (eg. states), this may gives a closer result to human expectation, * than getCenter, because that function can be disturbed by uneven distribution of point in @@ -74,25 +78,29 @@ declare namespace geolib { */ function getCenterOfBounds(coords: PositionAsDecimal[]): PositionAsDecimal; - /** Calculates the bounds of geo coordinates. + /** + * Calculates the bounds of geo coordinates. * * Returns maximum and minimum, latitude, longitude, and elevation (if provided) in form of an object */ function getBounds(coords: PositionWithElevation[]): Bound; - /** Checks whether a point is inside of a polygon or not. Note: the polygon coords must be in correct order! + /** + * Checks whether a point is inside of a polygon or not. Note: the polygon coords must be in correct order! * * Returns true or false */ function isPointInside(latlng: PositionAsDecimal, polygon: PositionAsDecimal[]): boolean; - /** Similar to is point inside: checks whether a point is inside of a circle or not. + /** + * Similar to is point inside: checks whether a point is inside of a circle or not. * * Returns true or false */ function isPointInCircle(latlng: PositionAsDecimal, center: PositionAsDecimal, radius: number): boolean; - /** Gets rhumb line bearing of two points. Find out about the difference between rhumb line and great circle bearing on Wikipedia. + /** + * Gets rhumb line bearing of two points. Find out about the difference between rhumb line and great circle bearing on Wikipedia. * Rhumb line should be fine in most cases: http://en.wikipedia.org/wiki/Rhumb_line#General_and_mathematical_description Function * is heavily based on Doug Vanderweide's great PHP version (licensed under GPL 3.0) * http://www.dougv.com/2009/07/13/calculating-the-bearing-and-compass-rose-direction-between-two-latitude-longitude-coordinates-in-php/ @@ -101,13 +109,15 @@ declare namespace geolib { */ function getRhumbLineBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; - /** Gets great circle bearing of two points. See description of getRhumbLineBearing for more information. + /** + * Gets great circle bearing of two points. See description of getRhumbLineBearing for more information. * * Returns calculated bearing as integer */ function getBearing(originLL: PositionAsDecimal, destLL: PositionAsDecimal): number; - /** Gets the compass direction from an origin coordinate (originLL) to a destination coordinate (destLL). + /** + * Gets the compass direction from an origin coordinate (originLL) to a destination coordinate (destLL). * Bearing mode. Can be either circle or rhumbline (default). * * Returns an object with a rough (NESW) and an exact direction (NNE, NE, ENE, E, ESE, etc). @@ -120,22 +130,27 @@ declare namespace geolib { /** Finds the nearest coordinate to a reference coordinate. */ function findNearest(latlng: PositionAsDecimal, coords: PositionAsDecimal[], offset?: number, limit?: number): Distance[]; - /** Calculates the length of a collection of coordinates. + /** + * Calculates the length of a collection of coordinates. * * Returns the length of the path in meters */ function getPathLength(coords: PositionAsDecimal[]): number; - /** Calculates the speed between two points within a given time span. + /** + * Calculates the speed between two points within a given time span. * * Returns the speed in options.unit (default is km/h). */ function getSpeed(coords: PositionInTime[], option?: SpeedOption): number; - /** Calculates if given point lies in a line formed by start and end */ + /** + * Calculates if given point lies in a line formed by start and end + */ function isPointInLine(point: PositionAsDecimal, start: PositionAsDecimal, end: PositionAsDecimal): boolean; - /** Converts a given distance (in meters) to another unit. + /** + * Converts a given distance (in meters) to another unit. * distance distance to be converted (source must be in meter). unit can be one of: * - m (meter) * - km (kilometers) @@ -155,17 +170,20 @@ declare namespace geolib { /** Converts a decimal coordinate to sexagesimal format */ function decimal2sexagesimal(coord: number): string; - /** Returns the latitude for a given point and converts it to decimal. + /** + * Returns the latitude for a given point and converts it to decimal. * Works with: latitude, lat, 1 (GeoJSON array) */ function latitude(latlng: any): number; - /** Returns the longitude for a given point and converts it to decimal. + /** + * Returns the longitude for a given point and converts it to decimal. * Works with: longitude, lng, lon, 0 (GeoJSON array) */ function longitude(latlng: any): number; - /** Returns the elevation for a given point and converts it to decimal. + /** + * Returns the elevation for a given point and converts it to decimal. * Works with: elevation, elev, alt, altitude, 2 (GeoJSON array) */ function elevation(latlng: any): number; @@ -173,7 +191,8 @@ declare namespace geolib { /** Checks if a coordinate is already in decimal format and, if not, converts it to */ function useDecimal(latlng: string|number): number; - /** Computes the destination point given an initial point, a distance (in meters) and a bearing (in degrees). + /** + * Computes the destination point given an initial point, a distance (in meters) and a bearing (in degrees). * If no radius is given it defaults to the mean earth radius of 6371000 meter. * * Returns an object: `{"latitude": destLat, "longitude": destLng}` diff --git a/types/google-protobuf/google-protobuf-tests.ts b/types/google-protobuf/google-protobuf-tests.ts index 19421754ac..ee9a1c8d66 100644 --- a/types/google-protobuf/google-protobuf-tests.ts +++ b/types/google-protobuf/google-protobuf-tests.ts @@ -93,15 +93,15 @@ class MySimple extends jspb.Message { const field = reader.getFieldNumber(); switch (field) { case 1: - const value1 = /** @type {string} */ (reader.readString()); + const value1 = reader.readString(); msg.setMyString(value1); break; case 2: - const value2 = /** @type {boolean} */ (reader.readBool()); + const value2 = reader.readBool(); msg.setMyBool(value2); break; case 3: - const value3 = /** @type {string} */ (reader.readString()); + const value3 = reader.readString(); msg.addSomeLabels(value3); break; case 4: diff --git a/types/graphite-udp/index.d.ts b/types/graphite-udp/index.d.ts index 167b85673a..dbd07ddf43 100644 --- a/types/graphite-udp/index.d.ts +++ b/types/graphite-udp/index.d.ts @@ -55,10 +55,6 @@ export interface ClientOptions { /** * called when metrics are sent * Defaults to null - * - * @param {error} Error - * @param {metrics} - * @return void */ callback?(error: Error, metrics: any): void; } @@ -68,19 +64,11 @@ export class Client { /** * During the interval time option, if 2 or more metrics with the same name are sent, metrics will be added (summed) - * - * @param {name} - * @param {value} number - * @return void */ add(name: string, value: number): void; /** * During the interval time option, if 2 or more metrics with the same name are sent, the last one will be used - * - * @param {name} metric name (my.test.metric) - * @param {value} number - * @return void */ put(name: string, value: number): void; diff --git a/types/grecaptcha/index.d.ts b/types/grecaptcha/index.d.ts index 59d1fa6699..067139e6c9 100644 --- a/types/grecaptcha/index.d.ts +++ b/types/grecaptcha/index.d.ts @@ -46,21 +46,18 @@ declare namespace ReCaptchaV2 { * Optional. The color theme of the widget. * Accepted values: "light", "dark" * @default "light" - * @type {Theme} */ theme?: Theme; /** * Optional. The type of CAPTCHA to serve. * Accepted values: "audio", "image" * @default "image" - * @type {Type} */ type?: Type; /** * Optional. The size of the widget. * Accepted values: "compact", "normal", "invisible". * @default "compact" - * @type {Size} */ size?: Size; /** @@ -77,7 +74,6 @@ declare namespace ReCaptchaV2 { * Optional. The badge location for g-recaptcha with size of "invisible". * * @default "bottomright" - * @type {Badge} */ badge?: Badge; /** diff --git a/types/har-format/index.d.ts b/types/har-format/index.d.ts index 09ea2791fd..3ab7fd773e 100644 --- a/types/har-format/index.d.ts +++ b/types/har-format/index.d.ts @@ -82,7 +82,8 @@ export interface Browser { * http://www.softwareishard.com/blog/har-12-spec/#pages */ export interface Page { - /** Date and time stamp for the beginning of the page load + /** + * Date and time stamp for the beginning of the page load * * (ISO 8601 - `YYYY-MM-DDThh:mm:ss.sTZD`, * e.g. `2009-07-24T19:20:30.45+01:00`). @@ -266,19 +267,21 @@ export interface Page { * http://www.softwareishard.com/blog/har-12-spec/#pageTimings */ export interface PageTiming { - /** Content of the page loaded. Number of milliseconds since page load + /** + * Content of the page loaded. Number of milliseconds since page load * started (`page.startedDateTime`). * * Use `-1` if the timing does not apply to the current request. */ onContentLoad?: number; - /** Page is loaded (`onLoad` event fired). Number of milliseconds since + /** + * Page is loaded (`onLoad` event fired). Number of milliseconds since * page load started (`page.startedDateTime`). * * Use `-1` if the timing does not apply to the current request. */ onLoad?: number; - /** A comment provided by the user or the application */ + /** A comment provided by the user or the application */ comment?: string; _startRender?: number; } @@ -562,7 +565,8 @@ export interface Response { * of header objects._ */ headersSize: number; - /** Size of the received response body in bytes. + /** + * Size of the received response body in bytes. * * - Set to zero in case of responses coming from the cache (`304`). * - Set to `-1` if the info is not available. @@ -633,12 +637,14 @@ export interface QueryString { export interface PostData { /** Mime type of posted data. */ mimeType: string; - /** List of posted parameters (in case of URL encoded parameters). + /** + * List of posted parameters (in case of URL encoded parameters). * * _`text` and `params` fields are mutually exclusive._ */ params: Param[]; - /** Plain text posted data + /** + * Plain text posted data * * _`params` and `text` fields are mutually exclusive._ */ @@ -733,14 +739,16 @@ export interface Cache { comment?: string; } export interface CacheDetails { - /** Expiration time of the cache entry. + /** + * Expiration time of the cache entry. * * _(Format not documente but assumingly ISO 8601 - * `YYYY-MM-DDThh:mm:ss.sTZD`)_ */ expires?: string; - /** The last time the cache entry was opened. - * * + /** + * The last time the cache entry was opened. + * * _(Format not documente but assumingly ISO 8601 - * `YYYY-MM-DDThh:mm:ss.sTZD`)_ */ diff --git a/types/haversine/index.d.ts b/types/haversine/index.d.ts index aa3c0cb1aa..6fed860d8b 100644 --- a/types/haversine/index.d.ts +++ b/types/haversine/index.d.ts @@ -23,9 +23,6 @@ declare namespace haversine { /** * Determines the great-circle distance between two points on a sphere given their longitudes and latitudes - * @param start - * @param end - * @param options */ declare function haversine( start: haversine.Coordinate, diff --git a/types/hls.js/index.d.ts b/types/hls.js/index.d.ts index f496f2d165..3567db3f87 100644 --- a/types/hls.js/index.d.ts +++ b/types/hls.js/index.d.ts @@ -1540,7 +1540,7 @@ declare namespace Hls { * Customized text track syncronization controller. */ interface TimelineController { - /**d + /** * clean-up all used resources */ destory(): void; diff --git a/types/http-assert/index.d.ts b/types/http-assert/index.d.ts index 47b283db92..4e9ca6657d 100644 --- a/types/http-assert/index.d.ts +++ b/types/http-assert/index.d.ts @@ -4,49 +4,26 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** - * @param {number} [status] the status code - * @param {string} [msg] the message of the error, defaulting to node's text for that status code - * @param {object} [opts] custom properties to attach to the error object + * @param status the status code + * @param msg the message of the error, defaulting to node's text for that status code + * @param opts custom properties to attach to the error object */ declare function assert(value: any, status?: number, msg?: string, opts?: {}): void; declare namespace assert { /** - * @param {number} [status] the status code - * @param {string} [msg] the message of the error, defaulting to node's text for that status code - * @param {object} [opts] custom properties to attach to the error object + * @param status the status code + * @param msg the message of the error, defaulting to node's text for that status code + * @param opts custom properties to attach to the error object */ - function equal(a: T, b: T, status?: number, msg?: string, opts?: {}): void; - /** - * @param {number} [status] the status code - * @param {string} [msg] the message of the error, defaulting to node's text for that status code - * @param {object} [opts] custom properties to attach to the error object - */ - function notEqual(a: T, b: T, status?: number, msg?: string, opts?: {}): void; - /** - * @param {number} [status] the status code - * @param {string} [msg] the message of the error, defaulting to node's text for that status code - * @param {object} [opts] custom properties to attach to the error object - */ - function strictEqual(a: T, b: T, status?: number, msg?: string, opts?: {}): void; - /** - * @param {number} [status] the status code - * @param {string} [msg] the message of the error, defaulting to node's text for that status code - * @param {object} [opts] custom properties to attach to the error object - */ - function notStrictEqual(a: T, b: T, status?: number, msg?: string, opts?: {}): void; - /** - * @param {number} [status] the status code - * @param {string} [msg] the message of the error, defaulting to node's text for that status code - * @param {object} [opts] custom properties to attach to the error object - */ - function deepEqual(a: T, b: T, status?: number, msg?: string, opts?: {}): void; - /** - * @param {number} [status] the status code - * @param {string} [msg] the message of the error, defaulting to node's text for that status code - * @param {object} [opts] custom properties to attach to the error object - */ - function notDeepEqual(a: T, b: T, status?: number, msg?: string, opts?: {}): void; + type Assert = (a: T, b: T, status?: number, msg?: string, opts?: {}) => void; + + const equal: Assert; + const notEqual: Assert; + const strictEqual: Assert; + const notStrictEqual: Assert; + const deepEqual: Assert; + const notDeepEqual: Assert; } export = assert; diff --git a/types/http-proxy/index.d.ts b/types/http-proxy/index.d.ts index 4ed829d390..6c4b885ac2 100644 --- a/types/http-proxy/index.d.ts +++ b/types/http-proxy/index.d.ts @@ -32,7 +32,6 @@ declare class Server extends events.EventEmitter { * @param req - Client request. * @param res - Client response. * @param options - Additionnal options. - * @param */ web( req: http.IncomingMessage, diff --git a/types/is-ip/index.d.ts b/types/is-ip/index.d.ts index c706d50397..70d8ebb88e 100644 --- a/types/is-ip/index.d.ts +++ b/types/is-ip/index.d.ts @@ -3,32 +3,14 @@ // Definitions by: coderslagoon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/** - * Check if input is IPv4 or IPv6. - * - * @param {input} input - * - * @returns {boolean} - */ +/** Check if input is IPv4 or IPv6. */ declare function isIp(input: string): boolean; declare namespace isIp { - /** - * Check if input is IPv4. - * - * @param {input} input - * - * @returns {boolean} - */ + /** Check if input is IPv4. */ function v4(input: string): boolean; - /** - * Check if input is IPv6. - * - * @param {input} input - * - * @returns {boolean} - */ + /** Check if input is IPv6. */ function v6(input: string): boolean; } diff --git a/types/is-number/index.d.ts b/types/is-number/index.d.ts index 27d7328456..fff535c46a 100644 --- a/types/is-number/index.d.ts +++ b/types/is-number/index.d.ts @@ -7,7 +7,7 @@ export = is_number; /** * Will test to see if the argument is a valid number, excluding Infinity and NaN. - * @param {*} num - Any value that should be tested for being a number - * @returns {boolean} - true if the parameter is a valid number, otherwise false + * @param num Any value that should be tested for being a number + * @returns true if the parameter is a valid number, otherwise false */ declare function is_number(num: any): boolean; diff --git a/types/jasmine-fixture/index.d.ts b/types/jasmine-fixture/index.d.ts index a49aeca029..82449ffc01 100644 --- a/types/jasmine-fixture/index.d.ts +++ b/types/jasmine-fixture/index.d.ts @@ -8,13 +8,14 @@ /** * Affixes the given jquery selectors into the body and will be removed after each spec - * @param {string} selector The JQuery selector to be added to the dom + * @param selector The JQuery selector to be added to the dom */ declare function affix(selector: string): JQuery; interface JQuery { - /** Affixes the given jquery selectors into the element and will be removed after each spec - * @param {string} selector The JQuery selector to be added to the dom + /** + * Affixes the given jquery selectors into the element and will be removed after each spec + * @param selector The JQuery selector to be added to the dom */ affix(selector: string): JQuery; } diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 80afeab207..18b3db361a 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -198,9 +198,9 @@ declare namespace jest { /** * Creates a test closure. * - * @param {string} name The name of your test - * @param {fn?} ProvidesCallback The function for your test - * @param {timeout?} timeout The timeout for an async function test + * @param name The name of your test + * @param fn The function for your test + * @param timeout The timeout for an async function test */ (name: string, fn?: ProvidesCallback, timeout?: number): void; /** @@ -290,7 +290,7 @@ declare namespace jest { * The `expect` function is used every time you want to test a value. * You will rarely call `expect` by itself. * - * @param {any} actual The value to apply matchers against. + * @param actual The value to apply matchers against. */ (actual: any): Matchers; anything(): any; diff --git a/types/jquery-match-height/index.d.ts b/types/jquery-match-height/index.d.ts index 491a0dbe1d..2c2a69db67 100644 --- a/types/jquery-match-height/index.d.ts +++ b/types/jquery-match-height/index.d.ts @@ -14,8 +14,6 @@ interface JQueryMatchHeight { /** * Set all selected elements to the height of the tallest. * If the items are on multiple rows, the items of each row will be set to the tallest of that row. - * - * @param options */ (options?: JQueryMatchHeight.Options): JQuery; _update(): void; diff --git a/types/jsforce/query.d.ts b/types/jsforce/query.d.ts index d0353ec638..242d89b358 100644 --- a/types/jsforce/query.d.ts +++ b/types/jsforce/query.d.ts @@ -47,8 +47,8 @@ export class Query extends Readable implements Promise { where(conditions: Object | string): Query; // Implementing promise methods - then(onfulfilled?: any | undefined | null): Promise; - catch(onrejected?: any | undefined | null): Promise; + then(onfulfilled?: any): Promise; + catch(onrejected?: any): Promise; [Symbol.toStringTag]: "Promise"; } diff --git a/types/jsforce/tslint.json b/types/jsforce/tslint.json index 5fdd35f19c..3b1f082eb2 100644 --- a/types/jsforce/tslint.json +++ b/types/jsforce/tslint.json @@ -4,6 +4,7 @@ // TODOs "ban-types": false, "no-any-union": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } } diff --git a/types/json-rpc-ws/index.d.ts b/types/json-rpc-ws/index.d.ts index c3023c409e..9faaeefd66 100644 --- a/types/json-rpc-ws/index.d.ts +++ b/types/json-rpc-ws/index.d.ts @@ -80,8 +80,6 @@ export class Base { getConnection(id: string): Connection; /** * Shut down all existing connections - * - * @public */ hangup(): void; } diff --git a/types/jsonfile/index.d.ts b/types/jsonfile/index.d.ts index bed60556a1..62227c9e84 100644 --- a/types/jsonfile/index.d.ts +++ b/types/jsonfile/index.d.ts @@ -8,13 +8,13 @@ import { Url } from 'url'; export type FSReadOptions = { - encoding?: null | undefined; - flag?: string | undefined; + encoding?: null; + flag?: string; } | null | undefined; export type FSWriteOptions = string | { - encoding?: string | null | undefined; - mode?: string | number | undefined; - flag?: string | undefined; + encoding?: string | null; + mode?: string | number; + flag?: string; } | null | undefined; export type ReadCallback = (err: NodeJS.ErrnoException | null, data: Buffer) => void; @@ -29,23 +29,23 @@ export interface FS { } export type JFReadOptions = { - encoding?: null | undefined; - flag?: string | undefined; + encoding?: null; + flag?: string; throws?: boolean; fs?: FS; - reviver?: ((key: any, value: any) => any) | undefined; + reviver?: (key: any, value: any) => any; } | null | undefined; export type JFWriteOptions = string | { - encoding?: string | null | undefined; - mode?: string | number | undefined; - flag?: string | undefined; + encoding?: string | null; + mode?: string | number; + flag?: string; throws?: boolean; fs?: FS; EOL?: string; - spaces?: string | number | undefined; - replacer?: ((key: string, value: any) => any) | undefined; - } | null | undefined; + spaces?: string | number; + replacer?: (key: string, value: any) => any; + } | null; export type JFReadCallback = (err: NodeJS.ErrnoException | null, data: any) => void; diff --git a/types/jsrp/index.d.ts b/types/jsrp/index.d.ts index 27f52c9e91..6cdb2abd7f 100644 --- a/types/jsrp/index.d.ts +++ b/types/jsrp/index.d.ts @@ -28,58 +28,58 @@ export class client { /** * Initialise the client SRP and calculate needed SRP values - * @param {ClientOptions} options - the client options including the username and password - * @param {function(): any} callback - called when the client instance is ready to use + * @param options - the client options including the username and password + * @param callback - called when the client instance is ready to use */ init(options: ClientOptions, callback: () => any): void; /** * Returns the hex representation of the client's A value - * @returns {string} - hex representation of A + * @returns hex representation of A */ getPublicKey(): string; /** * Set the salt generated by the server for later computations - * @param {string} hexSalt - hex value of the salt + * @param hexSalt - hex value of the salt */ setSalt(hexSalt: string): void; /** * Sets the server's B value on the client and compute values to complete authentication - * @param {string} hexB - hex representation of B + * @param hexB - hex representation of B * @throws Will throw an error if the server provides an incorrect value */ setServerPublicKey(hexB: string): void; /** * Returns the hex representation of the client's M1 proof - * @returns {string} - hex representation of M1 + * @returns hex representation of M1 */ getProof(): string; /** * Verifies the server's M2 proof against the client's. Only call after using {@link getProof}. - * @param {string} hexM2 - hex representation of M2 - * @returns {boolean} - true if it matches the client's proof, false if it doesn't + * @param hexM2 - hex representation of M2 + * @returns true if it matches the client's proof, false if it doesn't */ checkServerProof(hexM2: string): boolean; /** * Returns the hex representation of the shared secret key, K - * @returns {string} - hex representation of K + * @returns hex representation of K */ getSharedKey(): string; /** * Generate the v and salt values from values passed into init(). - * @param {function(*, Verifier): *} callback - callback has an error as the first argument, or an object containing the verifier and salt as the second. + * @param callback - callback has an error as the first argument, or an object containing the verifier and salt as the second. */ createVerifier(callback: (error: any, result: Verifier) => any): void; /** * Returns the hex representation of the salt - * @returns {string} - hex representation of the salt + * @returns hex representation of the salt */ getSalt(): string; } @@ -90,46 +90,46 @@ export class server { /** * Initialise the server SRP and calculate needed SRP values - * @param {ServerOptions} options - the server options including the verifier and salt - * @param {function(): void} callback - called when the server instance is ready to use + * @param options - the server options including the verifier and salt + * @param callback - called when the server instance is ready to use */ init(options: ServerOptions, callback: () => any): void; /** * Returns the hex representation of the server's B value - * @returns {string} - hex representation of B + * @returns hex representation of B */ getPublicKey(): string; /** * Returns the hex representation of the salt, as was passed into {@link init} - * @returns {string} - hex representation of the salt + * @returns hex representation of the salt */ getSalt(): string; /** * Sets the client's A value on the server, and compute values to complete authentication - * @param {string} hexA - hex representation of A + * @param hexA - hex representation of A * @throws Will throw an error if the client provides an incorrect value */ setClientPublicKey(hexA: string): void; /** * Returns the hex representation of the shared secret key, K - * @returns {string} - hex representation of K + * @returns hex representation of K */ getSharedKey(): string; /** * Verifies the clients's M1 proof against the server's. - * @param {string} M1hex - hex representation of M1 - * @returns {boolean} - true if it matches the server's proof, false if it doesn't + * @param M1hex - hex representation of M1 + * @returns true if it matches the server's proof, false if it doesn't */ checkClientProof(M1hex: string): boolean; /** * Returns the hex representation of the server's M2 proof - * @returns {string} - hex representation of M2 + * @returns hex representation of M2 */ getProof(): string; } diff --git a/types/jszip/index.d.ts b/types/jszip/index.d.ts index 0962f46ff8..a6253e60b8 100644 --- a/types/jszip/index.d.ts +++ b/types/jszip/index.d.ts @@ -64,8 +64,8 @@ declare namespace JSZip { /** * Prepare the content in the asked type. - * @param {String} type the type of the result. - * @param {OnUpdateCallback} onUpdate a function to call on each internal update. + * @param type the type of the result. + * @param onUpdate a function to call on each internal update. * @return Promise the promise of the result. */ async(type: T, onUpdate?: OnUpdateCallback): Promise; @@ -75,7 +75,8 @@ declare namespace JSZip { interface JSZipFileOptions { /** Set to `true` if the data is `base64` encoded. For example image data from a `` element. Plain text and HTML do not need this option. */ base64?: boolean; - /** Set to `true` if the data should be treated as raw content, `false` if this is a text. If `base64` is used, + /** + * Set to `true` if the data should be treated as raw content, `false` if this is a text. If `base64` is used, * this defaults to `true`, if the data is not a `string`, this will be set to `true`. */ binary?: boolean; diff --git a/types/kafka-node/tslint.json b/types/kafka-node/tslint.json index b1439230db..75a24b3163 100644 --- a/types/kafka-node/tslint.json +++ b/types/kafka-node/tslint.json @@ -1,7 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO - "no-any-union": false + // TODOs + "no-any-union": false, + "no-unnecessary-class": false } } diff --git a/types/keycloak-js/tslint.json b/types/keycloak-js/tslint.json index f2ffe2445b..df4e2dbdfb 100644 --- a/types/keycloak-js/tslint.json +++ b/types/keycloak-js/tslint.json @@ -1,6 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "no-duplicate-imports": false + // TODOs + "no-duplicate-imports": false, + "no-redundant-jsdoc": false } } diff --git a/types/knuddels-userapps-api/tslint.json b/types/knuddels-userapps-api/tslint.json index 07a8255955..67eb97841e 100644 --- a/types/knuddels-userapps-api/tslint.json +++ b/types/knuddels-userapps-api/tslint.json @@ -1,7 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO - "no-mergeable-namespace": false + // TODOs + "no-mergeable-namespace": false, + "no-unnecsesary-class": false } } diff --git a/types/license-checker/index.d.ts b/types/license-checker/index.d.ts index ec4ec39658..d0286a05af 100644 --- a/types/license-checker/index.d.ts +++ b/types/license-checker/index.d.ts @@ -82,6 +82,5 @@ export interface ModuleInfos { /** * Run the license check * @param opts specifies the path to the module to check dependencies of - * @param callback */ export function init(opts: InitOpts, callback: (err: Error, ret: ModuleInfos) => void): void; diff --git a/types/line-by-line/index.d.ts b/types/line-by-line/index.d.ts index 605c5cd07e..9cfeab723c 100644 --- a/types/line-by-line/index.d.ts +++ b/types/line-by-line/index.d.ts @@ -13,7 +13,6 @@ export = LineByLineReader; interface LineByLineReader extends EventEmitter { /** * subscribe to an event emitted by reader - * @param event {@link LineByLineReaderEvent} * @param listener A void function with one param */ on(event: LineByLineReaderEvent, listener: (value: any) => void): this; diff --git a/types/linq4js/tslint.json b/types/linq4js/tslint.json index 3393f9dcca..bb491510c7 100644 --- a/types/linq4js/tslint.json +++ b/types/linq4js/tslint.json @@ -3,6 +3,7 @@ "rules": { // TODOs "no-any-union": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } } diff --git a/types/load-json-file/index.d.ts b/types/load-json-file/index.d.ts index d52a24d8fe..ec554289a5 100644 --- a/types/load-json-file/index.d.ts +++ b/types/load-json-file/index.d.ts @@ -6,15 +6,11 @@ interface LoadJsonFile { /** * Returns a promise for the parsed JSON. - * - * @param filepath */ (filepath: string): Promise; /** * Returns the parsed JSON. - * - * @param filepath */ sync(filepath: string): any; } diff --git a/types/make-dir/index.d.ts b/types/make-dir/index.d.ts index 905343c883..a47b86dfac 100644 --- a/types/make-dir/index.d.ts +++ b/types/make-dir/index.d.ts @@ -12,7 +12,6 @@ export = makeDir; /** * Returns a `Promise` for the path to the created directory. * @param path Directory to create. - * @param options */ declare function makeDir(path: string, options?: makeDir.Options): Promise; @@ -20,7 +19,6 @@ declare namespace makeDir { /** * Returns the path to the created directory. * @param path Directory to create. - * @param options */ function sync(path: string, options?: Options): string; diff --git a/types/merge2/index.d.ts b/types/merge2/index.d.ts index c9c6ddb606..e5f836658e 100644 --- a/types/merge2/index.d.ts +++ b/types/merge2/index.d.ts @@ -52,7 +52,7 @@ declare namespace merge2 { * If you set end === false in options, this event give you a notice that * you should add more streams to merge, or end the mergedStream. * - * @param {string} event The 'queueDrain' event + * @param event The 'queueDrain' event * * @return This stream */ diff --git a/types/modesl/tslint.json b/types/modesl/tslint.json index 3db14f85ea..6a82dd0467 100644 --- a/types/modesl/tslint.json +++ b/types/modesl/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } +} diff --git a/types/morgan/index.d.ts b/types/morgan/index.d.ts index e557bd46d9..097758465a 100644 --- a/types/morgan/index.d.ts +++ b/types/morgan/index.d.ts @@ -49,8 +49,6 @@ declare namespace morgan { * client error codes, cyan for redirection codes, and uncolored for * all other codes. * :method :url :status :response-time ms - :res[content-length] - * @param format - * @param options */ (format: 'dev', options?: Options): express.RequestHandler; diff --git a/types/multer/index.d.ts b/types/multer/index.d.ts index 8682c57e3a..d6e73f9ddf 100644 --- a/types/multer/index.d.ts +++ b/types/multer/index.d.ts @@ -23,7 +23,8 @@ declare namespace multer { dest?: string; /** The storage engine to use for uploaded files. */ storage?: StorageEngine; - /** An object specifying the size limits of the following optional properties. This object is passed to busboy + /** + * An object specifying the size limits of the following optional properties. This object is passed to busboy * directly, and the details of properties can be found on https://github.com/mscdex/busboy#busboy-methods */ limits?: { diff --git a/types/multimatch/index.d.ts b/types/multimatch/index.d.ts index 3eeecc3791..67af567cfa 100644 --- a/types/multimatch/index.d.ts +++ b/types/multimatch/index.d.ts @@ -6,10 +6,8 @@ /** * Match utility function which supports multiple pattern globbing. * - * @param {string[]} paths list to match against. - * @param {string[]} patterns globbing patterns to use. e.g. `[*, "!cake"]`. - * @param {multimatch.MultimatchOptions} [options] - * @returns {string[]} + * @param paths list to match against. + * @param patterns globbing patterns to use. e.g. `[*, "!cake"]`. */ declare function multimatch(paths: string[], patterns: string | string[], options?: multimatch.MultimatchOptions): string[]; @@ -61,7 +59,8 @@ declare namespace multimatch { /** Suppress the behavior of treating a leading `!` character as negation. */ nonegate?: boolean; - /** Returns from negate expressions the same as if they were not negated. + /** + * Returns from negate expressions the same as if they were not negated. * (Ie, true on a hit, false on a miss.) */ flipNegate?: boolean; diff --git a/types/nedb-logger/index.d.ts b/types/nedb-logger/index.d.ts index 58f0fa718c..9ac1d823f3 100644 --- a/types/nedb-logger/index.d.ts +++ b/types/nedb-logger/index.d.ts @@ -12,7 +12,7 @@ declare class NeDBLoggerDataStore { /** * Insert a new document - * @param {Function} cb Optional callback, signature: err, insertedDoc + * @param cb Optional callback, signature: err, insertedDoc */ insert(newDoc: T, cb?: (err: Error, document: T) => void): void; } diff --git a/types/node-horseman/index.d.ts b/types/node-horseman/index.d.ts index 46ca810233..760bcd9527 100644 --- a/types/node-horseman/index.d.ts +++ b/types/node-horseman/index.d.ts @@ -103,7 +103,9 @@ declare class horseman { /** Fire a mouse event. */ mouseEvent(type?: string, x?: number, y?: number, button?: string): this; - /** Handles page events. * eventType can be one of: + /** + * Handles page events. + * eventType can be one of: * initialized - callback() * loadStarted - callback() * loadFinished - callback(status) diff --git a/types/node-pg-migrate/tslint.json b/types/node-pg-migrate/tslint.json index 1061428d6e..11ffe86764 100644 --- a/types/node-pg-migrate/tslint.json +++ b/types/node-pg-migrate/tslint.json @@ -1,6 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "no-object-literal-type-assertion": false + // TODOs + "no-object-literal-type-assertion": false, + "no-unnecessary-class": false } } diff --git a/types/node-waves/index.d.ts b/types/node-waves/index.d.ts index b4f3f946ef..fd2cb4937c 100644 --- a/types/node-waves/index.d.ts +++ b/types/node-waves/index.d.ts @@ -46,21 +46,21 @@ export function init(config?: WavesConfig): void; * Attach ripple effect by adding `.waves-effect` to HTML element. * Make sure you call `init` to activate the ripple. * - * @param {ElementTarget} elements elements to target. - * @param {(string | string[])} [classes] classes to add. + * @param elements elements to target. + * @param classes classes to add. */ export function attach(elements: ElementTarget, classes?: string | string[]): void; /** * Creates a ripple effect in HTML element programmatically. - * @param {ElementTarget} elements elements to target (must have `.waves-effect` already applied, ideally via `attach`). - * @param {RippleOptions} [options] specify how long to wait between starting and stopping the ripple, and it's position inside the element. + * @param elements elements to target (must have `.waves-effect` already applied, ideally via `attach`). + * @param options specify how long to wait between starting and stopping the ripple, and it's position inside the element. */ export function ripple(elements: ElementTarget, options?: RippleOptions): void; /** * Removes all ripples from inside an element immediately. * - * @param {ElementTarget} elements elements to remove ripples from. + * @param elements elements to remove ripples from. */ export function calm(elements: ElementTarget): void; diff --git a/types/node-wit/tslint.json b/types/node-wit/tslint.json index 3db14f85ea..d5ed3f0240 100644 --- a/types/node-wit/tslint.json +++ b/types/node-wit/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODOs + "no-unnecessary-class": false + } +} diff --git a/types/node-xmpp-core/index.d.ts b/types/node-xmpp-core/index.d.ts index 20937aae98..79d742cfd0 100644 --- a/types/node-xmpp-core/index.d.ts +++ b/types/node-xmpp-core/index.d.ts @@ -35,9 +35,8 @@ export class Stanza extends Element { * https://facebook.github.io/jsx/ * Returns a Stanza if name is presence, message or iq an ltx Element otherwise. * - * @param {string} name name of the element - * @param {any} attrs attribute key/value pairs - * @return {Element} Stanza or Element + * @param name name of the element + * @param attrs attribute key/value pairs */ export function createStanza(name: string, attrs?: any): Element; diff --git a/types/nodemailer/lib/addressparser.d.ts b/types/nodemailer/lib/addressparser.d.ts index 4a6f2962cf..dbf5cda468 100644 --- a/types/nodemailer/lib/addressparser.d.ts +++ b/types/nodemailer/lib/addressparser.d.ts @@ -16,8 +16,8 @@ declare namespace addressparser { * * [{name: 'Name', address: 'address@domain'}] * - * @param {String} str Address field - * @return {Array} An array of address objects + * @param str Address field + * @return An array of address objects */ declare function addressparser(address: string): addressparser.Address; diff --git a/types/openpgp/tslint.json b/types/openpgp/tslint.json index c28368c002..ee0546a40f 100644 --- a/types/openpgp/tslint.json +++ b/types/openpgp/tslint.json @@ -8,6 +8,7 @@ "jsdoc-format": false, "max-line-length": false, "no-consecutive-blank-lines": false, + "no-redundant-jsdoc": false, "no-var-keyword": false, "only-arrow-functions": false, "prefer-const": false, diff --git a/types/p-settle/index.d.ts b/types/p-settle/index.d.ts index 26acaccfb1..7298ea055e 100644 --- a/types/p-settle/index.d.ts +++ b/types/p-settle/index.d.ts @@ -22,8 +22,6 @@ declare namespace pSettle { * * `isFulfilled` * * `isRejected` * * `value` or `reason` (Depending on whether the promise fulfilled or rejected) - * - * @param input */ declare function pSettle(input: Iterable>): Promise>>; diff --git a/types/passport-oauth2/passport-oauth2-tests.ts b/types/passport-oauth2/passport-oauth2-tests.ts index 23f97c38ea..bfedf67dad 100644 --- a/types/passport-oauth2/passport-oauth2-tests.ts +++ b/types/passport-oauth2/passport-oauth2-tests.ts @@ -1,5 +1,4 @@ -// tslint:disable-next-line:no-duplicate-imports -import * as OAuth2Strategy from 'passport-oauth2'; +import OAuth2Strategy = require('passport-oauth2'); import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError } from 'passport-oauth2'; import { Strategy as PassportStrategy } from 'passport'; import { Request } from 'express'; diff --git a/types/pikaday-time/index.d.ts b/types/pikaday-time/index.d.ts index d1cd056b79..bc8b76a2ef 100644 --- a/types/pikaday-time/index.d.ts +++ b/types/pikaday-time/index.d.ts @@ -18,7 +18,7 @@ declare class Pikaday { * Extends the existing configuration options for Pikaday object with the options provided. * Can be used to change/extend the configurations on runtime. * @param options full/partial configuration options. - * @returns {} extended configurations. + * @returns extended configurations. */ config(options: Pikaday.PikadayOptions): Pikaday.PikadayOptions; diff --git a/types/pikaday/index.d.ts b/types/pikaday/index.d.ts index 956356f265..9dc370054f 100644 --- a/types/pikaday/index.d.ts +++ b/types/pikaday/index.d.ts @@ -20,7 +20,7 @@ declare class Pikaday { * Extends the existing configuration options for Pikaday object with the options provided. * Can be used to change/extend the configurations on runtime. * @param options full/partial configuration options. - * @returns {} extended configurations. + * @returns extended configurations. */ config(options: Pikaday.PikadayOptions): Pikaday.PikadayOptions; diff --git a/types/polylabel/index.d.ts b/types/polylabel/index.d.ts index b9a16ed265..f43724741a 100644 --- a/types/polylabel/index.d.ts +++ b/types/polylabel/index.d.ts @@ -6,10 +6,9 @@ /** * Polylabel returns the pole of inaccessibility coordinate in [x, y] format. * - * @param {Array} polygon - Given polygon coordinates in GeoJSON-like format - * @param {number} precision - Precision (1.0 by default) - * @param {boolean} debug - Debugging for Console - * @return {Array} + * @param polygon - Given polygon coordinates in GeoJSON-like format + * @param precision - Precision (1.0 by default) + * @param debug - Debugging for Console * @example * var p = polylabel(polygon, 1.0); */ diff --git a/types/pouchdb-find/index.d.ts b/types/pouchdb-find/index.d.ts index d45b8c40bc..7e974b8921 100644 --- a/types/pouchdb-find/index.d.ts +++ b/types/pouchdb-find/index.d.ts @@ -45,7 +45,8 @@ declare namespace PouchDB { /** Special condition to match the length of an array field in a document. Non-array fields cannot match this condition. */ $size?: number; - /** Divisor and Remainder are both positive or negative integers. + /** + * Divisor and Remainder are both positive or negative integers. * Non-integer values result in a 404 status. * Matches documents where (field % Divisor == Remainder) is true, and only when the document field is an integer. * [divisor, remainder] diff --git a/types/prosemirror-inputrules/tslint.json b/types/prosemirror-inputrules/tslint.json index f93cf8562a..f0f7a6f17a 100644 --- a/types/prosemirror-inputrules/tslint.json +++ b/types/prosemirror-inputrules/tslint.json @@ -1,3 +1,7 @@ { - "extends": "dtslint/dt.json" + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } } diff --git a/types/prosemirror-markdown/tslint.json b/types/prosemirror-markdown/tslint.json index 3db14f85ea..d5ed3f0240 100644 --- a/types/prosemirror-markdown/tslint.json +++ b/types/prosemirror-markdown/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODOs + "no-unnecessary-class": false + } +} diff --git a/types/qr-image/index.d.ts b/types/qr-image/index.d.ts index 593adce02f..a84f9b10ce 100644 --- a/types/qr-image/index.d.ts +++ b/types/qr-image/index.d.ts @@ -10,16 +10,9 @@ */ export type ec_level = 'L' | 'M' | 'Q' | 'H'; -/** - * image type. Possible values png (default), svg, pdf and eps. - */ +/** @default 'png' */ export type image_type = 'png' | 'svg' | 'pdf' | 'eps'; -/** - * image options object: - * - * @interface IOptions - */ export interface Options { ec_level?: ec_level; // error correction level. One of L, M, Q, H. Default M. type?: image_type; // image type. Possible values png(default), svg, pdf and eps. @@ -29,12 +22,12 @@ export interface Options { } export function image(text: string, level?: ec_level): NodeJS.ReadableStream; -export function image(text: string, optoins?: Options): NodeJS.ReadableStream; +export function image(text: string, options?: Options): NodeJS.ReadableStream; export function imageSync(text: string, level?: ec_level): Buffer; -export function imageSync(text: string, optoins?: Options): string | Buffer; +export function imageSync(text: string, options?: Options): string | Buffer; export function svgObject(text: string, level?: ec_level): any; -export function svgObject(text: string, optoins?: Options): any; +export function svgObject(text: string, options?: Options): any; export function matrix(text: string, level?: ec_level): any[][]; diff --git a/types/query-string/index.d.ts b/types/query-string/index.d.ts index f2145df75f..e7f51453eb 100644 --- a/types/query-string/index.d.ts +++ b/types/query-string/index.d.ts @@ -13,7 +13,6 @@ export interface ParseOptions { /** * Parse a query string into an object. * Leading ? or # are ignored, so you can pass location.search or location.hash directly. - * @param str */ export function parse(str: string, options?: ParseOptions): any; @@ -25,14 +24,10 @@ export interface StringifyOptions { /** * Stringify an object into a query string, sorting the keys. - * - * @param obj */ export function stringify(obj: object, options?: StringifyOptions): string; /** * Extract a query string from a URL that can be passed into .parse(). - * - * @param str */ export function extract(str: string): string; diff --git a/types/quill/tslint.json b/types/quill/tslint.json index b1439230db..b7d2f20244 100644 --- a/types/quill/tslint.json +++ b/types/quill/tslint.json @@ -1,7 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO - "no-any-union": false + // TODOs + "no-any-union": false, + "no-redundant-jsdoc": false } } diff --git a/types/relay-runtime/tslint.json b/types/relay-runtime/tslint.json index f93cf8562a..f0f7a6f17a 100644 --- a/types/relay-runtime/tslint.json +++ b/types/relay-runtime/tslint.json @@ -1,3 +1,7 @@ { - "extends": "dtslint/dt.json" + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } } diff --git a/types/remove-markdown/index.d.ts b/types/remove-markdown/index.d.ts index 6268109366..57e1bdea8c 100644 --- a/types/remove-markdown/index.d.ts +++ b/types/remove-markdown/index.d.ts @@ -8,7 +8,6 @@ export = RemoveMarkdown; /** * Strip Markdown formatting from text * @param markdown Markdown text - * @param options */ declare function RemoveMarkdown(markdown: string, options?: { stripListLeaders?: boolean diff --git a/types/restify-plugins/index.d.ts b/types/restify-plugins/index.d.ts index fd9688c937..05a289c529 100644 --- a/types/restify-plugins/index.d.ts +++ b/types/restify-plugins/index.d.ts @@ -309,7 +309,7 @@ export function dateParser(delta?: number): RequestHandler; export function gzipResponse(options?: any): RequestHandler; export interface ServeStatic { - appendRequestPath?: boolean | undefined; + appendRequestPath?: boolean; directory?: string; maxAge?: number; match?: any; diff --git a/types/restling/index.d.ts b/types/restling/index.d.ts index 02a083078a..2a06d6c3aa 100644 --- a/types/restling/index.d.ts +++ b/types/restling/index.d.ts @@ -9,93 +9,93 @@ import { ServerResponse } from "http"; /** * Create a DELETE request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function del(url: string, options?: RestlingOptions): Promise; /** * Create a GET request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function get(url: string, options?: RestlingOptions): Promise; /** * Create a HEAD request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function head(url: string, options?: RestlingOptions): Promise; /** * Send json data via GET method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function json(url: string, data?: any, options?: RestlingOptions, method?: string): Promise; /** * Create a PATCH request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function patch(url: string, options?: RestlingOptions): Promise; /** * Send json data via PATCH method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function patchJson(url: string, data?: any, options?: RestlingOptions): Promise; /** * Create a POST request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function post(url: string, options?: RestlingOptions): Promise; /** * Send json data via POST method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function postJson(url: string, data?: any, options?: RestlingOptions): Promise; /** * Create a PUT request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function put(url: string, options?: RestlingOptions): Promise; /** * Send json data via PUT method. - * @param {string} url A url address. - * @param {any} data JSON body - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param data JSON body + * @param options Options. + * @return Result. */ export function putJson(url: string, data?: any, options?: RestlingOptions): Promise; /** * Create a request. - * @param {string} url A url address. - * @param {RestlingOptions} options Options. - * @return {Promise} Result. + * @param url A url address. + * @param options Options. + * @return Result. */ export function request(url: string, options?: RestlingOptions): Promise; @@ -107,7 +107,6 @@ export function allAsync(requests: { [key: string]: { url: string, options?: Res /** * Interface for the result. - * @interface */ export interface RestlingResult { data?: any; @@ -116,7 +115,6 @@ export interface RestlingResult { /** * Interface for the header. - * @interface */ export interface RestlerOptionsHeader { [headerName: string]: string; @@ -124,109 +122,91 @@ export interface RestlerOptionsHeader { /** * Interface for restler options. - * @interface */ export interface RestlingOptions { /** * OAuth Bearer Token. - * @type {string} */ accessToken?: string; /** * HTTP Agent instance to use. If not defined globalAgent will be used. If false opts out of connection pooling with an Agent, defaults request to Connection: close. - * @type {any} */ agent?: any; /** * A http.Client instance if you want to reuse or implement some kind of connection pooling. - * @type {any} */ client?: any; /** * Data to be added to the body of the request. - * @type {any} */ data?: any; /** * Encoding of the response body - * @type {string} */ decoding?: string; /** * Encoding of the request body. - * @type {string} */ encoding?: string; /** * If set will recursively follow redirects. - * @type {boolean} */ followRedirects?: boolean; /** * A hash of HTTP headers to be sent. - * @type {RestlerOptionsHeader} */ headers?: RestlerOptionsHeader; /** * Request method - * @type {string} */ method?: string; /** * If set the data passed will be formatted as multipart/form-encoded. - * @type {boolean} */ multipart?: boolean; /** * A function that will be called on the returned data. Use any of predefined restler.parsers. - * @type {any} */ parser?: any; /** * Basic auth password. - * @type {string} */ password?: string; /** * Query string variables as a javascript object, will override the querystring in the URL. - * @type {any} */ query?: any; /** * If true, the server certificate is verified against the list of supplied CAs. * An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. - * @type {boolean} */ rejectUnauthorized?: boolean; /** * Emit the timeout event when the response does not return within the said value (in ms). - * @type {number} */ timeout?: number; /** * Basic auth username. - * @type {string} */ username?: string; /** * Options for xml2js. - * @type {any} */ xml2js?: any; } diff --git a/types/rfc2047/index.d.ts b/types/rfc2047/index.d.ts index 224ec8bbd0..a7b05e08fc 100644 --- a/types/rfc2047/index.d.ts +++ b/types/rfc2047/index.d.ts @@ -5,14 +5,14 @@ /** * Decode - * @param {string} encodedText Encoded Text - * @return {string} Decoded Text + * @param encodedText Encoded Text + * @return Decoded Text */ export function decode(encodedText: string): string; /** * Encode - * @param {string} decodedText Decoded Text - * @return {string} Encoded Text + * @param decodedText Decoded Text + * @return Encoded Text */ export function encode(decodedText: string): string; diff --git a/types/riot/index.d.ts b/types/riot/index.d.ts index 079132db72..2a7a22b596 100644 --- a/types/riot/index.d.ts +++ b/types/riot/index.d.ts @@ -66,8 +66,8 @@ export interface StyleManager { /** * Save a tag style to be later injected into DOM - * @param {string} css - css string - * @param {string} name - if it's passed the css will be mapped to a tagname + * @param css - css string + * @param name - if it's passed the css will be mapped to a tagname */ add(css: string, name?: string): void; @@ -109,7 +109,7 @@ export interface DOMUtil { /** * Check if a DOM node is an svg element * @param element - node to check - * @returns { boolean } True if element is an svg element + * @returns True if element is an svg element */ isSvg(element: Element): element is SVGElement; @@ -715,7 +715,7 @@ export function compile(callback: () => void): void; * Compiles the given tag but doesn't execute it, if `skipExecution` parameter is `true` * @param tag Tag definition * @param skipExecution If `true` tag is not executed after compilation - * @return {string} Compiled JavaScript as string + * @return Compiled JavaScript as string */ export function compile(tag: string, skipExecution?: boolean): string; diff --git a/types/safe-regex/index.d.ts b/types/safe-regex/index.d.ts index 582f8fa443..41aca4c6b3 100644 --- a/types/safe-regex/index.d.ts +++ b/types/safe-regex/index.d.ts @@ -4,4 +4,4 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = safe_regex; -declare function safe_regex(re: string | RegExp, opts?: { limit?: number | undefined }): boolean; +declare function safe_regex(re: string | RegExp, opts?: { limit?: number }): boolean; diff --git a/types/sap__xsenv/index.d.ts b/types/sap__xsenv/index.d.ts index 3858f77feb..6f1b895a33 100644 --- a/types/sap__xsenv/index.d.ts +++ b/types/sap__xsenv/index.d.ts @@ -21,7 +21,7 @@ export function cfServiceCredentials(filter: ServiceFilter): any; /** * Returns an array of Cloud Foundry services matching the given filter. * - * @param filter {(string|Object|function)} + * @param filter * - if string, returns the service with the same service instance name (name property) * - if Object, should have some of these properties [name, label, tag, plan] and returns all services * where all of the given properties match. Given tag matches if it is present in the tags array. @@ -35,12 +35,12 @@ export function filterCFServices(filter: ServiceFilter): any; * * If a service is not found in VCAP_SERVICES, returns default service configuration loaded from a JSON file. * - * @param query {object} describes requested Cloud Foundry services, each property value is a filter + * @param query describes requested Cloud Foundry services, each property value is a filter * as described in filterCFServices. - * @param servicesFile {string} path to JSON file to load default service configuration (default is default-services.json). + * @param servicesFile path to JSON file to load default service configuration (default is default-services.json). * If null, do not load default service configuration. * - * @returns {object} with the same properties as in query argument where the value of each + * @returns with the same properties as in query argument where the value of each * property is the respective service credentials object. * @throws Error, if for some of the requested services no or multiple instances are found; Error, if query parameter is not provided */ diff --git a/types/serialize-javascript/index.d.ts b/types/serialize-javascript/index.d.ts index deb4331961..b0331a3d03 100644 --- a/types/serialize-javascript/index.d.ts +++ b/types/serialize-javascript/index.d.ts @@ -9,7 +9,7 @@ declare namespace serializeJavascript { * This option is the same as the space argument that can be passed to JSON.stringify. * It can be used to add whitespace and indentation to the serialized output to make it more readable. */ - space?: string | number | undefined; + space?: string | number; /** * This option is a signal to serialize() that the object being serialized does not contain any function or regexps values. * This enables a hot-path that allows serialization to be over 3x faster. @@ -21,9 +21,9 @@ declare namespace serializeJavascript { /** * Serialize JavaScript to a superset of JSON that includes regular expressions and functions. - * @param {any} input data to serialize - * @param {serializeJavascript.SerializeJSOptions} options optional object - * @returns {string} serialized data + * @param input data to serialize + * @param options optional object + * @returns serialized data */ declare function serializeJavascript(input: any, options?: serializeJavascript.SerializeJSOptions): string; export = serializeJavascript; diff --git a/types/sha1/index.d.ts b/types/sha1/index.d.ts index 81b2202dc3..bb55d2f4fc 100644 --- a/types/sha1/index.d.ts +++ b/types/sha1/index.d.ts @@ -8,9 +8,9 @@ /** * js function for hashing messages with SHA1 * - * @param {(string | Buffer)} message - a string or buffer to hash - * @param {Sha1Options} options - an options object - * @returns {string} the resultant SHA1 hash of the given message + * @param message - a string or buffer to hash + * @param options - an options object + * @returns the resultant SHA1 hash of the given message */ declare function main(message: string | Buffer, options?: Sha1Options): string | Uint8Array; export = main; diff --git a/types/simple-oauth2/index.d.ts b/types/simple-oauth2/index.d.ts index 37add22766..499f39e56e 100644 --- a/types/simple-oauth2/index.d.ts +++ b/types/simple-oauth2/index.d.ts @@ -83,7 +83,7 @@ export interface OAuthClient { authorizationCode: { /** * Redirect the user to the autorization page - * @return {string} the absolute authorization url + * @return the absolute authorization url */ authorizeURL(params?: { /** A string that represents the registered application URI where the user is redirected after authentication */ diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index f8258efc95..9442289490 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -529,7 +529,7 @@ declare namespace Sinon { /** * Creates a new object with the given functions as the prototype and stubs all implemented functions. * - * @type TType Type being stubbed. + * @template TType Type being stubbed. * @param constructor Object or class to stub. * @returns A stubbed version of the constructor. * @remarks The given constructor function is not invoked. See also the stub API. @@ -543,7 +543,7 @@ declare namespace Sinon { /** * Stubbed type of an object with members replaced by stubs. * - * @type TType Type being stubbed. + * @template TType Type being stubbed. */ interface StubbableType { new(...args: any[]): TType; @@ -552,7 +552,7 @@ declare namespace Sinon { /** * An instance of a stubbed object type with members replaced by stubs. * - * @type TType Object type being stubbed. + * @template TType Object type being stubbed. */ type SinonStubbedInstance = { [P in keyof TType]: SinonStub; diff --git a/types/slocket/index.d.ts b/types/slocket/index.d.ts index a33ab9ffd8..c21fb10c23 100644 --- a/types/slocket/index.d.ts +++ b/types/slocket/index.d.ts @@ -19,9 +19,9 @@ interface Slocket { declare namespace slocket { interface Slocket extends EventEmitter { then( - onfulfilled?: ((value: Lock) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + onfulfilled?: ((value: Lock) => TResult1 | PromiseLike) | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): Promise; } interface Lock { diff --git a/types/snazzy-info-window/index.d.ts b/types/snazzy-info-window/index.d.ts index e4f644ece0..bf0f527b28 100644 --- a/types/snazzy-info-window/index.d.ts +++ b/types/snazzy-info-window/index.d.ts @@ -304,7 +304,6 @@ declare class SnazzyInfoWindow extends google.maps.OverlayView { * Set the position of the info window. * A valid Google Map instance must be associated to the info window. * This could be either through the marker or map option. - * @param latLng */ setPosition(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void; diff --git a/types/soundmanager2/index.d.ts b/types/soundmanager2/index.d.ts index d211e4c359..5f5e9a1ffb 100644 --- a/types/soundmanager2/index.d.ts +++ b/types/soundmanager2/index.d.ts @@ -60,7 +60,6 @@ declare namespace soundmanager { * soundmanager2_flash9.swf and debug versions etc.) Note that SM2 will * append the correct SWF file name, depending on flashVersion and * debugMode settings. - * @type {string} */ url?: string; @@ -110,8 +109,6 @@ declare namespace soundmanager { clearOnPosition(id: string, msecOffset: number, callback?: (() => void)): SMSound; /** * Creates a sound object, supporting an arbitrary number of optional arguments. Returns a SMSound object instance. At minimum, a url parameter is required. - * @param {SoundProperties} properties [description] - * @return {SMSound} [description] */ createSound(properties: SoundProperties): SMSound; destroySound(id: string): void; @@ -135,7 +132,7 @@ declare namespace soundmanager { setVolume(id: string, volume: number): SMSound; /** * Sets the volume of all sound objects. Accepted values: 0-100. Affects volume property. - * @param {number} volume [Volume of all sound objects. Accepted values: 0 - 100] + * @param volume Volume of all sound objects. Accepted values: 0 - 100 */ setVolume(volume: number): void; stop(id: string): SMSound; diff --git a/types/sshpk/tslint.json b/types/sshpk/tslint.json index 3db14f85ea..6a82dd0467 100644 --- a/types/sshpk/tslint.json +++ b/types/sshpk/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + // TODO + "no-unnecessary-class": false + } +} diff --git a/types/string-similarity/string-similarity-tests.ts b/types/string-similarity/string-similarity-tests.ts index 216c1dedf2..1e5003522c 100644 --- a/types/string-similarity/string-similarity-tests.ts +++ b/types/string-similarity/string-similarity-tests.ts @@ -9,16 +9,11 @@ const match: stringSimilarity.BestMatch = stringSimilarity.findBestMatch('Olive- ]); // ratings accessible -for (const rating of match.ratings){ - isString(rating.target); - isNumber(rating.rating); +for (const rating of match.ratings) { + rating.target; // $ExpectType string + rating.rating; // $ExpectType number } // bestMatch accessible match.bestMatch.rating; match.bestMatch.target; - -function isString(x: string): void { -} -function isNumber(x: number): void { -} diff --git a/types/strong-cluster-control/index.d.ts b/types/strong-cluster-control/index.d.ts index e0b3fb5c12..d0d577236c 100644 --- a/types/strong-cluster-control/index.d.ts +++ b/types/strong-cluster-control/index.d.ts @@ -53,7 +53,6 @@ declare namespace StrongClusterControl { /** * @description Stop the controller, after stopping workers (if the size is being controlled, see setSize()). - * @param callback */ stop(callback?: () => any): this; diff --git a/types/sumo-logger/index.d.ts b/types/sumo-logger/index.d.ts index 9ada2e9051..bc89e0eaa8 100644 --- a/types/sumo-logger/index.d.ts +++ b/types/sumo-logger/index.d.ts @@ -118,7 +118,8 @@ declare class SumoLogger { */ log(event: Partial & T): void; - /** Force any pending logs to be sent immediately. This is mainly for use in a + /** + * Force any pending logs to be sent immediately. This is mainly for use in a * logOut/`window.onBeforeUnload` flow to ensure that any remaining queued * messages are sent to Sumo Logic. */ diff --git a/types/swagger-sails-hook/index.d.ts b/types/swagger-sails-hook/index.d.ts index 203dc5d62f..6376d6d94b 100644 --- a/types/swagger-sails-hook/index.d.ts +++ b/types/swagger-sails-hook/index.d.ts @@ -14,7 +14,7 @@ export = SwaggerHook; /** * Create a new `swagger-sails-hook` sails hook and register it with `sails` - * @param {any} sails - reference to the running sails instance + * @param sails - reference to the running sails instance * @returns SailsHook - `swagger-sails-hook` object implementing the Sails' hook specification. */ declare function SwaggerHook(sails: any): SwaggerHook.SailsHook; @@ -30,7 +30,7 @@ declare namespace SwaggerHook { /** * Perform startup tasks. * All Sails configuration is guaranteed to be completed before a hook’s initialize function runs. - * @param {Function} done - called when `swagger-sails-hook`'s startup tasks have finished. + * @param done - called when `swagger-sails-hook`'s startup tasks have finished. */ initialize(done: () => any): void; diff --git a/types/tabris-plugin-firebase/index.d.ts b/types/tabris-plugin-firebase/index.d.ts index 3a9e7b350f..0ade0c9dcf 100644 --- a/types/tabris-plugin-firebase/index.d.ts +++ b/types/tabris-plugin-firebase/index.d.ts @@ -68,7 +68,6 @@ declare class NativeObject { /** * Gets the current value of the given *property*. - * @param property */ get(property: string): any; @@ -116,14 +115,11 @@ declare class NativeObject { /** * Sets the given property. - * @param property - * @param value */ set(property: string, value: any): this; /** * Sets all key-value pairs in the properties object as widget properties. - * @param properties */ set(properties: object): this; @@ -137,9 +133,8 @@ declare class NativeObject { /** * An application-wide unique identifier automatically assigned to all native objects on creation. - * @static */ - readonly cid: string; + static readonly cid: string; } interface PropertyChangedEvent { diff --git a/types/thrift/thrift-tests.ts b/types/thrift/thrift-tests.ts index da9e9eafa0..c829b8e41c 100644 --- a/types/thrift/thrift-tests.ts +++ b/types/thrift/thrift-tests.ts @@ -23,11 +23,9 @@ interface MockServiceHandlers { } class MockProcessor { - constructor() {} } class MockClient { - constructor() {} } const mockServiceHandlers: MockServiceHandlers = { diff --git a/types/tinymce/tslint.json b/types/tinymce/tslint.json index a42975357d..4df63472dd 100644 --- a/types/tinymce/tslint.json +++ b/types/tinymce/tslint.json @@ -3,6 +3,7 @@ "rules": { // TODOs "no-empty-interface": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } } diff --git a/types/tocktimer/index.d.ts b/types/tocktimer/index.d.ts index 20bd344c83..a48929f169 100644 --- a/types/tocktimer/index.d.ts +++ b/types/tocktimer/index.d.ts @@ -31,13 +31,12 @@ declare namespace t { class Tock { /** * Create a Tock instance - * @param opts */ constructor(opts?: TockOptions) /** * Start the timer - * @param [time] {Number} Optional. Can be either a countdown value or a starting value. + * @param time Can be either a countdown value or a starting value. * If a countdown timer then set time to count down from. * If a starting value then set time to the desired start time to count up from. */ @@ -65,14 +64,11 @@ declare namespace t { /** * Convert number of milliseconds to a MM:SS time string. Won't handle times greater than 1 hour - * @param ms */ msToTime: (ms: number) => string; /** * Convert number of milliseconds to timecode string - * @param ms - * @param showMs */ msToTimecode: (ms: number, showMs?: boolean) => string; @@ -80,7 +76,6 @@ declare namespace t { * Convert a time string to a number of milliseconds. Should be a duration as a string of form MM:SS, MM:SS:ms, MM:SS.ms, HH:MM:SS * Alternatively a time in the future can be provided using the form yyyy-mm-dd HH:MM:SS.ms. The difference between this time and present will be returned. * If the input cannot be recognized as one of the above then 0 is returned - * @param ms */ timeToMS: (time: string) => number; } diff --git a/types/undertaker-registry/index.d.ts b/types/undertaker-registry/index.d.ts index 02bff9fab3..34b56b4113 100644 --- a/types/undertaker-registry/index.d.ts +++ b/types/undertaker-registry/index.d.ts @@ -8,7 +8,7 @@ declare class UndertakerRegistry { * Returns the task with that name or undefined if no task is registered with that name. * Useful for custom task storage. * Custom registries can override this method when inheriting from this default registry. - * @param taskName {string} - Name of task. + * @param taskName - Name of task. */ get(taskName: string): TTaskFunction; @@ -16,7 +16,7 @@ declare class UndertakerRegistry { * No-op method that receives the undertaker instance. * Useful to set pre-defined tasks using the undertaker.task(taskName, fn) method. * Custom registries can override this method when inheriting from this default registry. - * @param taker {any} - Instance of undertaker. + * @param taker - Instance of undertaker. */ init(taker: any): void; @@ -25,8 +25,8 @@ declare class UndertakerRegistry { * If set modifies a task, it should return the new task so Undertaker can properly maintain metadata for the task. * Useful for adding custom behavior to every task as it is registered in the system. * Custom registries can override this method when inheriting from this default registry. - * @param taskName {string} - Name of task. - * @param fn {UndertakerRegistry.TaskFunction} - Task function. + * @param taskName - Name of task. + * @param fn - Task function. */ set(taskName: string, fn: TTaskFunction): TTaskFunction; diff --git a/types/universal-router/index.d.ts b/types/universal-router/index.d.ts index b17256ce77..47a7384872 100644 --- a/types/universal-router/index.d.ts +++ b/types/universal-router/index.d.ts @@ -60,9 +60,9 @@ export type Routes = Array>; * @template R Result that every action function resolves to. If the action * returns a Promise, R can be the type the Promise resolves to. * - * @param {Routes | Route} routes - Single route or array of routes. - * @param {string | String | Context & C} pathOrContext - path to resolve or + * @param routes - Single route or array of routes. + * @param pathOrContext - path to resolve or * context object that contains the path along with other data. - * @return {Promise} - Result of matched action function wrapped in a Promsie. + * @return - Result of matched action function wrapped in a Promsie. */ export function resolve(routes: Routes | Route, pathOrContext: string | String | Context & C): Promise; diff --git a/types/vast-client/index.d.ts b/types/vast-client/index.d.ts index 680e1e2dd8..4ab079a431 100644 --- a/types/vast-client/index.d.ts +++ b/types/vast-client/index.d.ts @@ -200,7 +200,7 @@ export interface VastRequestOptions { * A VAST XML document. When response is provided, no Ajax request is made and thus the url parameter is ignored. */ response?: string; - /**a + /** * A URL handler module, used to fetch the VAST document instead of the default ones. */ urlhandler?: any; diff --git a/types/viewerjs/index.d.ts b/types/viewerjs/index.d.ts index 28c26c911e..20a0806633 100644 --- a/types/viewerjs/index.d.ts +++ b/types/viewerjs/index.d.ts @@ -212,7 +212,6 @@ declare namespace Viewer { /** * Change the global default options. - * @param options */ function setDefaults(options: ViewerOption): void; @@ -222,7 +221,8 @@ declare namespace Viewer { function noConflict(): void; } -/** * JavaScript image viewer. +/** + * JavaScript image viewer. * @see {@link https://github.com/fengyuanchen/viewerjs} */ declare class Viewer { @@ -292,7 +292,6 @@ declare class Viewer { /** * Rotate the image to an absolute degree. - * @param degree */ rotateTo(degree: number): void; @@ -365,7 +364,8 @@ declare class Viewer { destroy(): void; } -/** JavaScript image viewer. +/** + * JavaScript image viewer. * @see {@link https://github.com/fengyuanchen/viewerjs} */ export = Viewer; diff --git a/types/vinyl-fs/index.d.ts b/types/vinyl-fs/index.d.ts index 4e0ac3317b..d3b13baeaa 100644 --- a/types/vinyl-fs/index.d.ts +++ b/types/vinyl-fs/index.d.ts @@ -108,12 +108,14 @@ export interface SrcOptions extends globStream.Options { } export interface DestOptions { - /** Specify the working directory the folder is relative to + /** + * Specify the working directory the folder is relative to * Default is process.cwd() */ cwd?: string; - /** Specify the mode the files should be created with + /** + * Specify the mode the files should be created with * Default is the mode of the input file (file.stat.mode) * or the process mode if the input file has no mode property */ @@ -125,12 +127,14 @@ export interface DestOptions { /** Specify if existing files with the same path should be overwritten or not. Default is true, to always overwrite existing files */ overwrite?: boolean; - /** Enables sourcemap support on files passed through the stream. Will write inline soucemaps if + /** + * Enables sourcemap support on files passed through the stream. Will write inline soucemaps if * specified as true. Specifying a string path will write external sourcemaps at the given path. */ sourcemaps?: true | string; - /** When creating a symlink, whether or not the created symlink should be relative. If false, + /** + * When creating a symlink, whether or not the created symlink should be relative. If false, * the symlink will be absolute. Note: This option will be ignored if a junction is being created. */ relativeSymlinks?: boolean; diff --git a/types/webassembly-js-api/tslint.json b/types/webassembly-js-api/tslint.json index 65c83fb1e3..d8590b6513 100644 --- a/types/webassembly-js-api/tslint.json +++ b/types/webassembly-js-api/tslint.json @@ -1,6 +1,8 @@ { "extends": "dtslint/dt.json", "rules": { - "dt-header": false + // TODOs + "dt-header": false, + "no-unnecessary-class": false } } diff --git a/types/webdriverio/tslint.json b/types/webdriverio/tslint.json index 1881fbd79d..5ab241cb96 100644 --- a/types/webdriverio/tslint.json +++ b/types/webdriverio/tslint.json @@ -6,6 +6,7 @@ "no-declare-current-package": false, "no-single-declare-module": false, "unified-signatures": false, + "no-unnecessary-class": false, "no-unnecessary-generics": false } } From 8f3fc5b8d7e2289662cda090bfbab287b26fabbf Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 23 Oct 2017 16:10:43 +0200 Subject: [PATCH 049/232] Updated type definitions to yFiles for HTML 2.0.1.3 (#20611) * Updated type definitions to yFiles for HTML 2.0.1.3 * Changed version number in header. --- types/yfiles/index.d.ts | 3119 ++++++++++++++++++++------------------- 1 file changed, 1572 insertions(+), 1547 deletions(-) diff --git a/types/yfiles/index.d.ts b/types/yfiles/index.d.ts index a3593bdc76..2d47b00067 100644 --- a/types/yfiles/index.d.ts +++ b/types/yfiles/index.d.ts @@ -1,11 +1,11 @@ -// Type definitions for yFiles for HTML 2.0.1.2 +// Type definitions for yFiles for HTML 2.0.13 // Project: http://www.yworks.com/products/yfiles-for-html // Definitions by: yWorks GmbH HTML Team // Definitions: https://github.com/yWorks/DefinitelyTyped /**************************************************************************** ** - ** This file is part of yFiles for HTML 2.0.1.2 + ** This file is part of yFiles for HTML 2.0.1.3 ** ** yWorks proprietary/confidential. Use is subject to license terms. ** @@ -25,8 +25,7 @@ declare namespace yfiles{ function BaseClass(...base:any[]):yfiles.lang.ClassConstructor; function BaseClass(...base:any[]):yfiles.lang.ClassConstructor; } -} -declare namespace yfiles{ +}declare namespace yfiles{ export namespace lang{ /** * The root of the class hierarchy of the yFiles for HTML class framework. @@ -158,15 +157,15 @@ declare namespace yfiles{ * var MyList = yfiles.lang.Class('MyList', { * $extends: my.AbstractList, * $with: [my.Iterable, my.Collection], - * + * * constructor: function() { // the constructor function * }, - * + * * add: function(obj) { ... }, * size: { // transformed into a property * 'get': function() { return ...; } * }, - * + * * $static: { * create: function() { ... } * } @@ -176,7 +175,7 @@ declare namespace yfiles{ * list.add("hello"); * list.size === 1; // true * - * + * *

    * The constructor property can be either a function (in case of a single constructor) or an object that is transformed * into named constructors. @@ -197,7 +196,7 @@ declare namespace yfiles{ * myrect = new Rect.FromPoint({x: 10, y: 10}, 50, 50); * myrect instanceof Rect; // true * - * + * *

    * Named constructors can call other constructors and can be written like any other constructor, i.e. this will be a new * instance of the class that is being constructed. @@ -211,7 +210,7 @@ declare namespace yfiles{ *

          * Rect.$super.toString.call(this);
          * 
    - * + * *

    * If you do not specify the parent class of a new class, then {@link yfiles.lang.Object} will be used as its base type. The parent * class of {@link yfiles.lang.Object} is the standard JavaScript Object.prototype. @@ -285,13 +284,13 @@ declare namespace yfiles{ * //yfiles.lang.Class.injectInterfaces(myHitTestable, [yfiles.drawing.IHitTestable.$class, yfiles.support.ILookup.$class]); * //As well as using a variable number of arguments, such as: * //yfiles.lang.Class.injectInterfaces(myHitTestable, yfiles.drawing.IHitTestable, yfiles.support.ILookup); - * + * * //This is true now: * yfiles.drawing.IHitTestable.isInstance(myHitTestable); * //And the object can be used where an interface instance is expected: * graphEditorInputMode.clickInputMode.validClickHitTestable = myHitTestable; * - * + * *

    * It is also possible to modify an object prototype, e.g. in TypeScript: Class definition: *

    @@ -302,7 +301,7 @@ declare namespace yfiles{ * } * } * - * + * *

    * Usage: *

    @@ -317,7 +316,7 @@ declare namespace yfiles{ * //And the object can be used where an interface instance is expected: * graphEditorInputMode.clickInputMode.validClickHitTestable = myHitTestable; * - * + * * @param obj The object to modify. * @param interfaces Array or variable number of {@link }s, {@link } objects of interfaces or fully qualified string * names of interfaces. @@ -439,7 +438,7 @@ declare namespace yfiles{ /** * This methods creates an instance of the struct in which all of its values are set to their default values without using * any of its constructors. - * @returns + * @returns * @static */ static createDefault():any; @@ -478,7 +477,7 @@ declare namespace yfiles{ * }); * if(state === RequestState.FAILED) { ... } * - * + * * @class */ export interface Enum extends yfiles.lang.Object{} @@ -691,7 +690,7 @@ declare namespace yfiles{ * var attr = yfiles.lang.Attribute.getCustomAttribute(MyClass.$class, MyAttribute.$class); * console.log(attr.message + ' ' + attr.recipient); // 'hello world' * - * + * *

    * Even though MyAttribute is invoked at the definition of MyClass, no attribute is created until the reflection API is * used (in the above example: using getCustomAttribute). @@ -908,7 +907,7 @@ declare namespace yfiles{ /** * Compares this object to the given object of the same type. * @param obj The object to compare this to. - * @returns + * @returns *