mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-29 11:12:23 +08:00
Merge pull request #6631 from chrootsu/lodash-assign
lodash: signatures of the method _.assign have been changed
This commit is contained in:
+316
-25
@@ -4285,32 +4285,166 @@ module TestRandom {
|
||||
}
|
||||
}
|
||||
|
||||
/*********
|
||||
* Object *
|
||||
**********/
|
||||
interface NameAge {
|
||||
name: string;
|
||||
age: number;
|
||||
/**********
|
||||
* Object *
|
||||
**********/
|
||||
|
||||
// _.assign
|
||||
module TestAssign {
|
||||
interface Obj {a: string};
|
||||
interface S1 {a: number};
|
||||
interface S2 {b: number};
|
||||
interface S3 {c: number};
|
||||
interface S4 {d: number};
|
||||
interface S5 {e: number};
|
||||
|
||||
let obj: Obj;
|
||||
let s1: S1;
|
||||
let s2: S2;
|
||||
let s3: S3;
|
||||
let s4: S4;
|
||||
let s5: S5;
|
||||
|
||||
let customizer: (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any;
|
||||
|
||||
{
|
||||
let result: Obj;
|
||||
|
||||
result = _.assign<Obj>(obj);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number};
|
||||
|
||||
result = _.assign<Obj, S1, {a: number}>(obj, s1);
|
||||
result = _.assign<Obj, S1, {a: number}>(obj, s1, customizer);
|
||||
result = _.assign<Obj, S1, {a: number}>(obj, s1, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number};
|
||||
|
||||
result = _.assign<Obj, S1, S2, {a: number, b: number}>(obj, s1, s2);
|
||||
result = _.assign<Obj, S1, S2, {a: number, b: number}>(obj, s1, s2, customizer);
|
||||
result = _.assign<Obj, S1, S2, {a: number, b: number}>(obj, s1, s2, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number, c: number};
|
||||
|
||||
result = _.assign<Obj, S1, S2, S3, {a: number, b: number, c: number}>(obj, s1, s2, s3);
|
||||
result = _.assign<Obj, S1, S2, S3, {a: number, b: number, c: number}>(obj, s1, s2, s3, customizer);
|
||||
result = _.assign<Obj, S1, S2, S3, {a: number, b: number, c: number}>(obj, s1, s2, s3, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number, c: number, d: number};
|
||||
|
||||
result = _.assign<Obj, S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(obj, s1, s2, s3, s4);
|
||||
result = _.assign<Obj, S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(obj, s1, s2, s3, s4, customizer);
|
||||
result = _.assign<Obj, S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(obj, s1, s2, s3, s4, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number, c: number, d: number, e: number};
|
||||
|
||||
result = _.assign<Obj, {a: number, b: number, c: number, d: number, e: number}>(obj, s1, s2, s3, s4, s5);
|
||||
result = _.assign<Obj, {a: number, b: number, c: number, d: number, e: number}>(obj, s1, s2, s3, s4, s5, customizer);
|
||||
result = _.assign<Obj, {a: number, b: number, c: number, d: number, e: number}>(obj, s1, s2, s3, s4, s5, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<Obj>;
|
||||
|
||||
result = _(obj).assign();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number}>;
|
||||
|
||||
result = _(obj).assign<S1, {a: number}>(s1);
|
||||
result = _(obj).assign<S1, {a: number}>(s1, customizer);
|
||||
result = _(obj).assign<S1, {a: number}>(s1, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number, b: number}>;
|
||||
|
||||
result = _(obj).assign<S1, S2, {a: number, b: number}>(s1, s2);
|
||||
result = _(obj).assign<S1, S2, {a: number, b: number}>(s1, s2, customizer);
|
||||
result = _(obj).assign<S1, S2, {a: number, b: number}>(s1, s2, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number, b: number, c: number}>;
|
||||
|
||||
result = _(obj).assign<S1, S2, S3, {a: number, b: number, c: number}>(s1, s2, s3);
|
||||
result = _(obj).assign<S1, S2, S3, {a: number, b: number, c: number}>(s1, s2, s3, customizer);
|
||||
result = _(obj).assign<S1, S2, S3, {a: number, b: number, c: number}>(s1, s2, s3, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number, b: number, c: number, d: number}>;
|
||||
|
||||
result = _(obj).assign<S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(s1, s2, s3, s4);
|
||||
result = _(obj).assign<S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(s1, s2, s3, s4, customizer);
|
||||
result = _(obj).assign<S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(s1, s2, s3, s4, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
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<{a: number, b: number, c: number, d: number, e: number}>(s1, s2, s3, s4, s5, customizer);
|
||||
result = _(obj).assign<{a: number, b: number, c: number, d: number, e: number}>(s1, s2, s3, s4, s5, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<Obj>;
|
||||
|
||||
result = _(obj).chain().assign();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number}>;
|
||||
|
||||
result = _(obj).chain().assign<S1, {a: number}>(s1);
|
||||
result = _(obj).chain().assign<S1, {a: number}>(s1, customizer);
|
||||
result = _(obj).chain().assign<S1, {a: number}>(s1, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number, b: number}>;
|
||||
|
||||
result = _(obj).chain().assign<S1, S2, {a: number, b: number}>(s1, s2);
|
||||
result = _(obj).chain().assign<S1, S2, {a: number, b: number}>(s1, s2, customizer);
|
||||
result = _(obj).chain().assign<S1, S2, {a: number, b: number}>(s1, s2, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number, b: number, c: number}>;
|
||||
|
||||
result = _(obj).chain().assign<S1, S2, S3, {a: number, b: number, c: number}>(s1, s2, s3);
|
||||
result = _(obj).chain().assign<S1, S2, S3, {a: number, b: number, c: number}>(s1, s2, s3, customizer);
|
||||
result = _(obj).chain().assign<S1, S2, S3, {a: number, b: number, c: number}>(s1, s2, s3, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number, b: number, c: number, d: number}>;
|
||||
|
||||
result = _(obj).chain().assign<S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(s1, s2, s3, s4);
|
||||
result = _(obj).chain().assign<S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(s1, s2, s3, s4, customizer);
|
||||
result = _(obj).chain().assign<S1, S2, S3, S4, {a: number, b: number, c: number, d: number}>(s1, s2, s3, s4, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
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<{a: number, b: number, c: number, d: number, e: number}>(s1, s2, s3, s4, s5, customizer);
|
||||
result = _(obj).chain().assign<{a: number, b: number, c: number, d: number, e: number}>(s1, s2, s3, s4, s5, customizer, any);
|
||||
}
|
||||
}
|
||||
result = <NameAge>_.assign({ 'name': 'moe' }, { 'age': 40 });
|
||||
result = <NameAge>_.assign({ 'name': 'moe' }, { 'age': 40 }, function (a, b) {
|
||||
return typeof a == 'undefined' ? b : a;
|
||||
});
|
||||
|
||||
result = <_.LoDashImplicitObjectWrapper<NameAge>>_({ 'name': 'moe' }).assign({ 'age': 40 });
|
||||
result = <_.LoDashImplicitObjectWrapper<NameAge>>_({ 'name': 'moe' }).assign({ 'age': 40 }, function (a, b) {
|
||||
return typeof a == 'undefined' ? b : a;
|
||||
});
|
||||
|
||||
result = <NameAge>_.extend({ 'name': 'moe' }, { 'age': 40 });
|
||||
result = <NameAge>_.extend({ 'name': 'moe' }, { 'age': 40 }, function (a, b) {
|
||||
return typeof a == 'undefined' ? b : a;
|
||||
});
|
||||
|
||||
result = <_.LoDashImplicitObjectWrapper<NameAge>>_({ 'name': 'moe' }).extend({ 'age': 40 });
|
||||
result = <_.LoDashImplicitObjectWrapper<NameAge>>_({ 'name': 'moe' }).extend({ 'age': 40 }, function (a, b) {
|
||||
return typeof a == 'undefined' ? b : a;
|
||||
});
|
||||
|
||||
// _.create
|
||||
interface TestCreateProto {
|
||||
@@ -4351,6 +4485,163 @@ var TestDefaultsDeepSource = {'user': {'name': 'fred', 'age': 36}};
|
||||
result = <DefaultsDeepResult>_.defaultsDeep(TestDefaultsDeepObject, TestDefaultsDeepSource);
|
||||
result = <DefaultsDeepResult>_(TestDefaultsDeepObject).defaultsDeep<DefaultsDeepResult>(TestDefaultsDeepSource).value();
|
||||
|
||||
// _.extend
|
||||
module TestExtend {
|
||||
type Obj = {a: string};
|
||||
type S1 = {a: number};
|
||||
type S2 = {b: number};
|
||||
type S3 = {c: number};
|
||||
type S4 = {d: number};
|
||||
type S5 = {e: number};
|
||||
|
||||
let obj: Obj;
|
||||
let s1: S1;
|
||||
let s2: S2;
|
||||
let s3: S3;
|
||||
let s4: S4;
|
||||
let s5: S5;
|
||||
|
||||
let customizer: (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any;
|
||||
|
||||
{
|
||||
let result: Obj;
|
||||
|
||||
result = _.extend<Obj>(obj);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number};
|
||||
|
||||
result = _.extend<Obj, S1, Obj & S1>(obj, s1);
|
||||
result = _.extend<Obj, S1, Obj & S1>(obj, s1, customizer);
|
||||
result = _.extend<Obj, S1, Obj & S1>(obj, s1, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number};
|
||||
|
||||
result = _.extend<Obj, S1, S2, Obj & S1 & S2>(obj, s1, s2);
|
||||
result = _.extend<Obj, S1, S2, Obj & S1 & S2>(obj, s1, s2, customizer);
|
||||
result = _.extend<Obj, S1, S2, Obj & S1 & S2>(obj, s1, s2, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number, c: number};
|
||||
|
||||
result = _.extend<Obj, S1, S2, S3, Obj & S1 & S2 & S3>(obj, s1, s2, s3);
|
||||
result = _.extend<Obj, S1, S2, S3, Obj & S1 & S2 & S3>(obj, s1, s2, s3, customizer);
|
||||
result = _.extend<Obj, S1, S2, S3, Obj & S1 & S2 & S3>(obj, s1, s2, s3, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number, c: number, d: number};
|
||||
|
||||
result = _.extend<Obj, S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(obj, s1, s2, s3, s4);
|
||||
result = _.extend<Obj, S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(obj, s1, s2, s3, s4, customizer);
|
||||
result = _.extend<Obj, S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(obj, s1, s2, s3, s4, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: {a: number, b: number, c: number, d: number, e: number};
|
||||
|
||||
result = _.extend<Obj, Obj & S1 & S2 & S3 & S4 & S5>(obj, s1, s2, s3, s4, s5);
|
||||
result = _.extend<Obj, Obj & S1 & S2 & S3 & S4 & S5>(obj, s1, s2, s3, s4, s5, customizer);
|
||||
result = _.extend<Obj, Obj & S1 & S2 & S3 & S4 & S5>(obj, s1, s2, s3, s4, s5, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<Obj>;
|
||||
|
||||
result = _(obj).extend();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number}>;
|
||||
|
||||
result = _(obj).extend<S1, Obj & S1>(s1);
|
||||
result = _(obj).extend<S1, Obj & S1>(s1, customizer);
|
||||
result = _(obj).extend<S1, Obj & S1>(s1, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number, b: number}>;
|
||||
|
||||
result = _(obj).extend<S1, S2, Obj & S1 & S2>(s1, s2);
|
||||
result = _(obj).extend<S1, S2, Obj & S1 & S2>(s1, s2, customizer);
|
||||
result = _(obj).extend<S1, S2, Obj & S1 & S2>(s1, s2, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number, b: number, c: number}>;
|
||||
|
||||
result = _(obj).extend<S1, S2, S3, Obj & S1 & S2 & S3>(s1, s2, s3);
|
||||
result = _(obj).extend<S1, S2, S3, Obj & S1 & S2 & S3>(s1, s2, s3, customizer);
|
||||
result = _(obj).extend<S1, S2, S3, Obj & S1 & S2 & S3>(s1, s2, s3, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number, b: number, c: number, d: number}>;
|
||||
|
||||
result = _(obj).extend<S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(s1, s2, s3, s4);
|
||||
result = _(obj).extend<S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(s1, s2, s3, s4, customizer);
|
||||
result = _(obj).extend<S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(s1, s2, s3, s4, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<{a: number, b: number, c: number, d: number, e: number}>;
|
||||
|
||||
result = _(obj).extend<Obj & S1 & S2 & S3 & S4 & S5>(s1, s2, s3, s4, s5);
|
||||
result = _(obj).extend<Obj & S1 & S2 & S3 & S4 & S5>(s1, s2, s3, s4, s5, customizer);
|
||||
result = _(obj).extend<Obj & S1 & S2 & S3 & S4 & S5>(s1, s2, s3, s4, s5, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<Obj>;
|
||||
|
||||
result = _(obj).chain().extend();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number}>;
|
||||
|
||||
result = _(obj).chain().extend<S1, Obj & S1>(s1);
|
||||
result = _(obj).chain().extend<S1, Obj & S1>(s1, customizer);
|
||||
result = _(obj).chain().extend<S1, Obj & S1>(s1, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number, b: number}>;
|
||||
|
||||
result = _(obj).chain().extend<S1, S2, Obj & S1 & S2>(s1, s2);
|
||||
result = _(obj).chain().extend<S1, S2, Obj & S1 & S2>(s1, s2, customizer);
|
||||
result = _(obj).chain().extend<S1, S2, Obj & S1 & S2>(s1, s2, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number, b: number, c: number}>;
|
||||
|
||||
result = _(obj).chain().extend<S1, S2, S3, Obj & S1 & S2 & S3>(s1, s2, s3);
|
||||
result = _(obj).chain().extend<S1, S2, S3, Obj & S1 & S2 & S3>(s1, s2, s3, customizer);
|
||||
result = _(obj).chain().extend<S1, S2, S3, Obj & S1 & S2 & S3>(s1, s2, s3, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number, b: number, c: number, d: number}>;
|
||||
|
||||
result = _(obj).chain().extend<S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(s1, s2, s3, s4);
|
||||
result = _(obj).chain().extend<S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(s1, s2, s3, s4, customizer);
|
||||
result = _(obj).chain().extend<S1, S2, S3, S4, Obj & S1 & S2 & S3 & S4>(s1, s2, s3, s4, customizer, any);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<{a: number, b: number, c: number, d: number, e: number}>;
|
||||
|
||||
result = _(obj).chain().extend<Obj & S1 & S2 & S3 & S4 & S5>(s1, s2, s3, s4, s5);
|
||||
result = _(obj).chain().extend<Obj & S1 & S2 & S3 & S4 & S5>(s1, s2, s3, s4, s5, customizer);
|
||||
result = _(obj).chain().extend<Obj & S1 & S2 & S3 & S4 & S5>(s1, s2, s3, s4, s5, customizer, any);
|
||||
}
|
||||
}
|
||||
|
||||
// _.findKey
|
||||
module TestFindKey {
|
||||
let result: string;
|
||||
|
||||
Vendored
+333
-166
@@ -8922,195 +8922,191 @@ declare module _ {
|
||||
**********/
|
||||
|
||||
//_.assign
|
||||
interface AssignCustomizer {
|
||||
(objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any;
|
||||
}
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Assigns own enumerable properties of source object(s) to the destination object. Subsequent
|
||||
* sources will overwrite property assignments of previous sources. If a callback is provided
|
||||
* it will be executed to produce the assigned values. The callback is bound to thisArg and
|
||||
* invoked with two arguments; (objectValue, sourceValue).
|
||||
* @param object The destination object.
|
||||
* @param s1-8 The source object(s)
|
||||
* @param callback The function to customize merging properties.
|
||||
* @param thisArg The this binding of callback.
|
||||
* @return The destination object.
|
||||
**/
|
||||
assign<P, T, S1, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
* Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources
|
||||
* overwrite property assignments of previous sources. If customizer is provided it’s invoked to produce the
|
||||
* assigned values. The customizer is bound to thisArg and invoked with five arguments:
|
||||
* (objectValue, sourceValue, key, object, source).
|
||||
*
|
||||
* Note: This method mutates object and is based on Object.assign.
|
||||
*
|
||||
* @alias _.extend
|
||||
*
|
||||
* @param object The destination object.
|
||||
* @param source The source objects.
|
||||
* @param customizer The function to customize assigned values.
|
||||
* @param thisArg The this binding of callback.
|
||||
* @return The destination object.
|
||||
*/
|
||||
assign<TObject extends {}, TSource extends {}, TResult extends {}>(
|
||||
object: TObject,
|
||||
source: TSource,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<P, T, S1, S2, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
* @see assign
|
||||
*/
|
||||
assign<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
|
||||
object: TObject,
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<P, T, S1, S2, S3, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
* @see assign
|
||||
*/
|
||||
assign<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
|
||||
object: TObject,
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<P, T, S1, S2, S3, S4, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
s4: S4,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
* @see assign
|
||||
*/
|
||||
assign<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {},
|
||||
TResult extends {}>
|
||||
(
|
||||
object: TObject,
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<P, T, S1, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
* @see _.assign
|
||||
*/
|
||||
assign<TObject extends {}>(object: TObject): TObject;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<P, T, S1, S2, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<P, T, S1, S2, S3, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<P, T, S1, S2, S3, S4, Value, Result>(
|
||||
object: T,
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
s4: S4,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): Result;
|
||||
* @see _.assign
|
||||
*/
|
||||
assign<TObject extends {}, TResult extends {}>(
|
||||
object: TObject, ...otherArgs: any[]
|
||||
): TResult;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<S1, Value, TResult>(
|
||||
s1: S1,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
* @see _.assign
|
||||
*/
|
||||
assign<TSource extends {}, TResult extends {}>(
|
||||
source: TSource,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<S1, S2, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<S1, S2, S3, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<S1, S2, S3, S4, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
s4: S4,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
assign<S1, S2, S3, S4, S5, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
s4: S4,
|
||||
s5: S5,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
* @see assign
|
||||
*/
|
||||
assign<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<S1, Value, TResult>(
|
||||
s1: S1,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
* @see assign
|
||||
*/
|
||||
assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<S1, S2, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<S1, S2, S3, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<S1, S2, S3, S4, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
s4: S4,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
/**
|
||||
* @see _.assign
|
||||
**/
|
||||
extend<S1, S2, S3, S4, S5, Value, TResult>(
|
||||
s1: S1,
|
||||
s2: S2,
|
||||
s3: S3,
|
||||
s4: S4,
|
||||
s5: S5,
|
||||
callback?: (objectValue: Value, sourceValue: Value) => Value,
|
||||
thisArg?: any): TResult;
|
||||
* @see assign
|
||||
*/
|
||||
assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
assign(): LoDashImplicitObjectWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
assign<TResult extends {}>(...otherArgs: any[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
assign<TSource extends {}, TResult extends {}>(
|
||||
source: TSource,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
assign<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
assign(): LoDashExplicitObjectWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
assign<TResult extends {}>(...otherArgs: any[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.create
|
||||
@@ -9174,6 +9170,177 @@ declare module _ {
|
||||
defaultsDeep<TResult>(...sources: any[]): LoDashImplicitObjectWrapper<TResult>
|
||||
}
|
||||
|
||||
//_.extend
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TObject extends {}, TSource extends {}, TResult extends {}>(
|
||||
object: TObject,
|
||||
source: TSource,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
|
||||
object: TObject,
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
|
||||
object: TObject,
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {},
|
||||
TResult extends {}>
|
||||
(
|
||||
object: TObject,
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend<TObject extends {}>(object: TObject): TObject;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend<TObject extends {}, TResult extends {}>(
|
||||
object: TObject, ...otherArgs: any[]
|
||||
): TResult;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend<TSource extends {}, TResult extends {}>(
|
||||
source: TSource,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend(): LoDashImplicitObjectWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend<TResult extends {}>(...otherArgs: any[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend<TSource extends {}, TResult extends {}>(
|
||||
source: TSource,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see assign
|
||||
*/
|
||||
extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
|
||||
source1: TSource1,
|
||||
source2: TSource2,
|
||||
source3: TSource3,
|
||||
source4: TSource4,
|
||||
customizer?: AssignCustomizer,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend(): LoDashExplicitObjectWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.assign
|
||||
*/
|
||||
extend<TResult extends {}>(...otherArgs: any[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.findKey
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user