(feature) Removed aliase _.select

This commit is contained in:
DomiR
2016-01-23 14:39:10 +01:00
parent 618f01a953
commit 5dd9ae353c
2 changed files with 2 additions and 259 deletions
-98
View File
@@ -4778,104 +4778,6 @@ result = <number[]>_.sampleSize([1, 2, 3, 4], 2);
result = <_.LoDashImplicitArrayWrapper<number>>_([1, 2, 3, 4]).sampleSize(2);
result = <number[]>_([1, 2, 3, 4]).sampleSize(2).value();
// _.select
module TestSelect {
let array: TResult[];
let list: _.List<TResult>;
let dictionary: _.Dictionary<TResult>;
let stringIterator: (char: string, index: number, string: string) => any;
let listIterator: (value: TResult, index: number, collection: _.List<TResult>) => any;
let dictionaryIterator: (value: TResult, key: string, collection: _.Dictionary<TResult>) => any;
{
let result: string[];
result = _.select('', stringIterator);
result = _.select('', stringIterator, any);
}
{
let result: TResult[];
result = _.select<TResult>(array, listIterator);
result = _.select<TResult>(array, listIterator, any);
result = _.select<TResult>(array, '');
result = _.select<TResult>(array, '', any);
result = _.select<{a: number}, TResult>(array, {a: 42});
result = _.select<TResult>(list, listIterator);
result = _.select<TResult>(list, listIterator, any);
result = _.select<TResult>(list, '');
result = _.select<TResult>(list, '', any);
result = _.select<{a: number}, TResult>(list, {a: 42});
result = _.select<TResult>(dictionary, dictionaryIterator);
result = _.select<TResult>(dictionary, dictionaryIterator, any);
result = _.select<TResult>(dictionary, '');
result = _.select<TResult>(dictionary, '', any);
result = _.select<{a: number}, TResult>(dictionary, {a: 42});
}
{
let result: _.LoDashImplicitArrayWrapper<string>;
result = _('').select(stringIterator);
result = _('').select(stringIterator, any);
}
{
let result: _.LoDashImplicitArrayWrapper<TResult>;
result = _(array).select(listIterator);
result = _(array).select(listIterator, any);
result = _(array).select('');
result = _(array).select('', any);
result = _(array).select<{a: number}>({a: 42});
result = _(list).select<TResult>(listIterator);
result = _(list).select<TResult>(listIterator, any);
result = _(list).select<TResult>('');
result = _(list).select<TResult>('', any);
result = _(list).select<{a: number}, TResult>({a: 42});
result = _(dictionary).select<TResult>(dictionaryIterator);
result = _(dictionary).select<TResult>(dictionaryIterator, any);
result = _(dictionary).select<TResult>('');
result = _(dictionary).select<TResult>('', any);
result = _(dictionary).select<{a: number}, TResult>({a: 42});
}
{
let result: _.LoDashExplicitArrayWrapper<string>;
result = _('').chain().select(stringIterator);
result = _('').chain().select(stringIterator, any);
}
{
let result: _.LoDashExplicitArrayWrapper<TResult>;
result = _(array).chain().select(listIterator);
result = _(array).chain().select(listIterator, any);
result = _(array).chain().select('');
result = _(array).chain().select('', any);
result = _(array).chain().select<{a: number}>({a: 42});
result = _(list).chain().select<TResult>(listIterator);
result = _(list).chain().select<TResult>(listIterator, any);
result = _(list).chain().select<TResult>('');
result = _(list).chain().select<TResult>('', any);
result = _(list).chain().select<{a: number}, TResult>({a: 42});
result = _(dictionary).chain().select<TResult>(dictionaryIterator);
result = _(dictionary).chain().select<TResult>(dictionaryIterator, any);
result = _(dictionary).chain().select<TResult>('');
result = _(dictionary).chain().select<TResult>('', any);
result = _(dictionary).chain().select<{a: number}, TResult>({a: 42});
}
}
// _.shuffle
module TestShuffle {
let array: TResult[];
+2 -161
View File
@@ -171,8 +171,8 @@ Removed 17 aliases
- [ ] Removed aliase _.inject
- [ ] Removed aliase _.methods
- [ ] Removed aliase _.object
- [ ] Removed aliase _.#run
- [ ] Removed aliase _.select
- [ ] Removed aliase _.run
- [x] Removed aliase _.select
- [x] Removed aliase _.unique
Other changes
@@ -7927,165 +7927,6 @@ declare module _ {
sampleSize(): LoDashImplicitWrapper<T>;
}
//_.select
interface LoDashStatic {
/**
* @see _.filter
*/
select<T>(
collection: List<T>,
predicate?: ListIterator<T, boolean>,
thisArg?: any
): T[];
/**
* @see _.filter
*/
select<T>(
collection: Dictionary<T>,
predicate?: DictionaryIterator<T, boolean>,
thisArg?: any
): T[];
/**
* @see _.filter
*/
select(
collection: string,
predicate?: StringIterator<boolean>,
thisArg?: any
): string[];
/**
* @see _.filter
*/
select<T>(
collection: List<T>|Dictionary<T>,
predicate: string,
thisArg?: any
): T[];
/**
* @see _.filter
*/
select<W extends {}, T>(
collection: List<T>|Dictionary<T>,
predicate: W
): T[];
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.filter
*/
select(
predicate?: StringIterator<boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<string>;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.filter
*/
select(
predicate: ListIterator<T, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select(
predicate: string,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select<W>(predicate: W): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.filter
*/
select<T>(
predicate: ListIterator<T, boolean>|DictionaryIterator<T, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select<T>(
predicate: string,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select<W, T>(predicate: W): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.filter
*/
select(
predicate?: StringIterator<boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<string>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.filter
*/
select(
predicate: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select(
predicate: string,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select<W>(predicate: W): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.filter
*/
select<T>(
predicate: ListIterator<T, boolean>|DictionaryIterator<T, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select<T>(
predicate: string,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.filter
*/
select<W, T>(predicate: W): LoDashExplicitArrayWrapper<T>;
}
//_.shuffle
interface LoDashStatic {
/**