import _ = require("../index"); declare module "../index" { // chain interface LoDashStatic { /** * Creates a lodash object that wraps value with explicit method chaining enabled. * * @param value The value to wrap. * @return Returns the new lodash wrapper instance. */ chain(value: TrapAny): CollectionChain & FunctionChain & ObjectChain & PrimitiveChain & StringChain; /** * @see _.chain */ chain(value: T): PrimitiveChain; /** * @see _.chain */ chain(value: T): StringChain; /** * @see _.chain */ chain(value: string | null | undefined): StringNullableChain; /** * @see _.chain */ chain any>(value: T): FunctionChain; /** * @see _.chain */ chain(value: List | null | undefined): CollectionChain; /** * @see _.chain */ chain(value: T | null | undefined): ObjectChain; /** * @see _.chain */ chain(value: T): PrimitiveChain; } interface Collection { /** * @see _.chain */ chain(): CollectionChain; } interface String { /** * @see _.chain */ chain(): StringChain; } interface Object { /** * @see _.chain */ chain(): ObjectChain; } interface Primitive { /** * @see _.chain */ chain(): PrimitiveChain; } interface Function any> { /** * @see _.chain */ chain(): FunctionChain; } interface LoDashExplicitWrapper { /** * @see _.chain */ chain(): this; } // prototype.commit interface LoDashImplicitWrapper { /** * @see _.commit */ commit(): this; } interface LoDashExplicitWrapper { /** * @see _.commit */ commit(): this; } // prototype.plant interface LoDashImplicitWrapper { /** * @see _.plant */ plant(value: unknown): this; } interface LoDashExplicitWrapper { /** * @see _.plant */ plant(value: unknown): this; } // prototype.reverse interface LoDashImplicitWrapper { /** * @see _.reverse */ reverse(): this; } interface LoDashExplicitWrapper { /** * @see _.reverse */ reverse(): this; } // prototype.toJSON interface LoDashImplicitWrapper { /** * @see _.toJSON */ toJSON(): TValue; } interface LoDashExplicitWrapper { /** * @see _.toJSON */ toJSON(): TValue; } // prototype.toString interface LoDashWrapper { /** * @see _.toString */ toString(): string; } // prototype.value interface LoDashImplicitWrapper { /** * @see _.value */ value(): TValue; } interface LoDashExplicitWrapper { /** * @see _.value */ value(): TValue; } // prototype.valueOf interface LoDashImplicitWrapper { /** * @see _.valueOf */ valueOf(): TValue; } interface LoDashExplicitWrapper { /** * @see _.valueOf */ valueOf(): TValue; } // tap interface LoDashStatic { /** * This method invokes interceptor and returns value. The interceptor is invoked with one * argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations * on intermediate results within the chain. * * @param value The value to provide to interceptor. * @param interceptor The function to invoke. * @return Returns value. */ tap(value: T, interceptor: (value: T) => void): T; } interface LoDashImplicitWrapper { /** * @see _.tap */ tap(interceptor: (value: TValue) => void): this; } interface LoDashExplicitWrapper { /** * @see _.tap */ tap(interceptor: (value: TValue) => void): this; } // thru interface LoDashStatic { /** * This method is like _.tap except that it returns the result of interceptor. * * @param value The value to provide to interceptor. * @param interceptor The function to invoke. * @return Returns the result of interceptor. */ thru(value: T, interceptor: (value: T) => TResult): TResult; } interface LoDashImplicitWrapper { /** * @see _.thru */ thru(interceptor: (value: TValue) => TResult): ImpChain; } interface LoDashExplicitWrapper { /** * @see _.thru */ thru(interceptor: (value: TValue) => TResult): ExpChain; } }