mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-30 11:14:27 +08:00
lodash: signatures of the method _.mapKeys have been changed
This commit is contained in:
+68
-31
@@ -6138,43 +6138,80 @@ module TestMapKeys {
|
||||
let listIterator: (value: TResult, index: number, collection: _.List<TResult>) => string;
|
||||
let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary<TResult>) => string;
|
||||
|
||||
let result: _.Dictionary<TResult>;
|
||||
{
|
||||
let result: _.Dictionary<TResult>;
|
||||
|
||||
result = _.mapKeys<TResult, string>(array);
|
||||
result = _.mapKeys<TResult, string>(array, listIterator);
|
||||
result = _.mapKeys<TResult, string>(array, listIterator, any);
|
||||
result = _.mapKeys<TResult>(array, '');
|
||||
result = _.mapKeys<TResult, {}>(array, {});
|
||||
result = _.mapKeys<TResult, string>(array);
|
||||
result = _.mapKeys<TResult, string>(array, listIterator);
|
||||
result = _.mapKeys<TResult, string>(array, listIterator, any);
|
||||
result = _.mapKeys<TResult>(array, '');
|
||||
result = _.mapKeys<TResult>(array, '', any);
|
||||
result = _.mapKeys<TResult, {}>(array, {});
|
||||
|
||||
result = _.mapKeys<TResult, string>(list);
|
||||
result = _.mapKeys<TResult, string>(list, listIterator);
|
||||
result = _.mapKeys<TResult, string>(list, listIterator, any);
|
||||
result = _.mapKeys<TResult>(list, '');
|
||||
result = _.mapKeys<TResult, {}>(list, {});
|
||||
result = _.mapKeys<TResult, string>(list);
|
||||
result = _.mapKeys<TResult, string>(list, listIterator);
|
||||
result = _.mapKeys<TResult, string>(list, listIterator, any);
|
||||
result = _.mapKeys<TResult>(list, '');
|
||||
result = _.mapKeys<TResult>(list, '', any);
|
||||
result = _.mapKeys<TResult, {}>(list, {});
|
||||
|
||||
result = _.mapKeys<TResult, string>(dictionary);
|
||||
result = _.mapKeys<TResult, string>(dictionary, dictionaryIterator);
|
||||
result = _.mapKeys<TResult, string>(dictionary, dictionaryIterator, any);
|
||||
result = _.mapKeys<TResult>(dictionary, '');
|
||||
result = _.mapKeys<TResult, {}>(dictionary, {});
|
||||
result = _.mapKeys<TResult, string>(dictionary);
|
||||
result = _.mapKeys<TResult, string>(dictionary, dictionaryIterator);
|
||||
result = _.mapKeys<TResult, string>(dictionary, dictionaryIterator, any);
|
||||
result = _.mapKeys<TResult>(dictionary, '');
|
||||
result = _.mapKeys<TResult>(dictionary, '', any);
|
||||
result = _.mapKeys<TResult, {}>(dictionary, {});
|
||||
}
|
||||
|
||||
result = _(array).mapKeys<string>().value();
|
||||
result = _(array).mapKeys<string>(listIterator).value();
|
||||
result = _(array).mapKeys<string>(listIterator, any).value();
|
||||
result = _(array).mapKeys('').value();
|
||||
result = _(array).mapKeys<{}>({}).value();
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<_.Dictionary<TResult>>;
|
||||
|
||||
result = _(list).mapKeys<TResult, string>().value();
|
||||
result = _(list).mapKeys<TResult, string>(listIterator).value();
|
||||
result = _(list).mapKeys<TResult, string>(listIterator, any).value();
|
||||
result = _(list).mapKeys<TResult>('').value();
|
||||
result = _(list).mapKeys<TResult, {}>({}).value();
|
||||
result = _(array).mapKeys<string>();
|
||||
result = _(array).mapKeys<string>(listIterator);
|
||||
result = _(array).mapKeys<string>(listIterator, any);
|
||||
result = _(array).mapKeys('');
|
||||
result = _(array).mapKeys('', any);
|
||||
result = _(array).mapKeys<{}>({});
|
||||
|
||||
result = _(dictionary).mapKeys<TResult, string>().value();
|
||||
result = _(dictionary).mapKeys<TResult, string>(dictionaryIterator).value();
|
||||
result = _(dictionary).mapKeys<TResult, string>(dictionaryIterator, any).value();
|
||||
result = _(dictionary).mapKeys<TResult>('').value();
|
||||
result = _(dictionary).mapKeys<TResult, {}>({}).value();
|
||||
result = _(list).mapKeys<TResult, string>();
|
||||
result = _(list).mapKeys<TResult, string>(listIterator);
|
||||
result = _(list).mapKeys<TResult, string>(listIterator, any);
|
||||
result = _(list).mapKeys<TResult>('');
|
||||
result = _(list).mapKeys<TResult>('', any);
|
||||
result = _(list).mapKeys<TResult, {}>({});
|
||||
|
||||
result = _(dictionary).mapKeys<TResult, string>();
|
||||
result = _(dictionary).mapKeys<TResult, string>(dictionaryIterator);
|
||||
result = _(dictionary).mapKeys<TResult, string>(dictionaryIterator, any);
|
||||
result = _(dictionary).mapKeys<TResult>('');
|
||||
result = _(dictionary).mapKeys<TResult>('', any);
|
||||
result = _(dictionary).mapKeys<TResult, {}>({});
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<_.Dictionary<TResult>>;
|
||||
|
||||
result = _(array).chain().mapKeys<string>();
|
||||
result = _(array).chain().mapKeys<string>(listIterator);
|
||||
result = _(array).chain().mapKeys<string>(listIterator, any);
|
||||
result = _(array).chain().mapKeys('');
|
||||
result = _(array).chain().mapKeys('', any);
|
||||
result = _(array).chain().mapKeys<{}>({});
|
||||
|
||||
result = _(list).chain().mapKeys<TResult, string>();
|
||||
result = _(list).chain().mapKeys<TResult, string>(listIterator);
|
||||
result = _(list).chain().mapKeys<TResult, string>(listIterator, any);
|
||||
result = _(list).chain().mapKeys<TResult>('');
|
||||
result = _(list).chain().mapKeys<TResult>('', any);
|
||||
result = _(list).chain().mapKeys<TResult, {}>({});
|
||||
|
||||
result = _(dictionary).chain().mapKeys<TResult, string>();
|
||||
result = _(dictionary).chain().mapKeys<TResult, string>(dictionaryIterator);
|
||||
result = _(dictionary).chain().mapKeys<TResult, string>(dictionaryIterator, any);
|
||||
result = _(dictionary).chain().mapKeys<TResult>('');
|
||||
result = _(dictionary).chain().mapKeys<TResult>('', any);
|
||||
result = _(dictionary).chain().mapKeys<TResult, {}>({});
|
||||
}
|
||||
}
|
||||
|
||||
// _.merge
|
||||
|
||||
Vendored
+56
-3
@@ -10723,7 +10723,8 @@ declare module _ {
|
||||
*/
|
||||
mapKeys<T>(
|
||||
object: List<T>|Dictionary<T>,
|
||||
iteratee?: string
|
||||
iteratee?: string,
|
||||
thisArg?: any
|
||||
): Dictionary<T>;
|
||||
}
|
||||
|
||||
@@ -10747,7 +10748,8 @@ declare module _ {
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys(
|
||||
iteratee?: string
|
||||
iteratee?: string,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<Dictionary<T>>;
|
||||
}
|
||||
|
||||
@@ -10771,10 +10773,61 @@ declare module _ {
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys<TResult>(
|
||||
iteratee?: string
|
||||
iteratee?: string,
|
||||
thisArg?: any
|
||||
): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys<TKey>(
|
||||
iteratee?: ListIterator<T, TKey>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<Dictionary<T>>;
|
||||
|
||||
/**
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys<TObject extends {}>(
|
||||
iteratee?: TObject
|
||||
): LoDashExplicitObjectWrapper<Dictionary<T>>;
|
||||
|
||||
/**
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys(
|
||||
iteratee?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<Dictionary<T>>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys<TResult, TKey>(
|
||||
iteratee?: ListIterator<TResult, TKey>|DictionaryIterator<TResult, TKey>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<Dictionary<TResult>>;
|
||||
|
||||
/**
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys<TResult, TObject extends {}>(
|
||||
iteratee?: TObject
|
||||
): LoDashExplicitObjectWrapper<Dictionary<TResult>>;
|
||||
|
||||
/**
|
||||
* @see _.mapKeys
|
||||
*/
|
||||
mapKeys<TResult>(
|
||||
iteratee?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitObjectWrapper<Dictionary<TResult>>;
|
||||
}
|
||||
|
||||
//_.mapValues
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user