mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
Merge pull request #6618 from chrootsu/lodash-initial
lodash: signatures of the method _.initial have been changed
This commit is contained in:
+24
-8
@@ -681,14 +681,30 @@ module TestIndexOf {
|
||||
}
|
||||
|
||||
//_.initial
|
||||
{
|
||||
let testInitalArray: TResult[];
|
||||
let testInitalList: _.List<TResult>;
|
||||
let result: TResult[];
|
||||
result = _.initial<TResult>(testInitalArray);
|
||||
result = _.initial<TResult>(testInitalList);
|
||||
result = _(testInitalArray).initial().value();
|
||||
result = _(testInitalList).initial<TResult>().value();
|
||||
module TestInitial {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.initial<TResult>(array);
|
||||
result = _.initial<TResult>(list);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).initial();
|
||||
result = _(list).initial<TResult>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().initial();
|
||||
result = _(list).chain().initial<TResult>();
|
||||
}
|
||||
}
|
||||
|
||||
// _.intersection
|
||||
|
||||
Vendored
+16
-2
@@ -1230,7 +1230,7 @@ declare module _ {
|
||||
* @param array The array to query.
|
||||
* @return Returns the slice of array.
|
||||
*/
|
||||
initial<T>(array: T[]|List<T>): T[];
|
||||
initial<T>(array: List<T>): T[];
|
||||
}
|
||||
|
||||
interface LoDashImplicitArrayWrapper<T> {
|
||||
@@ -1244,7 +1244,21 @@ declare module _ {
|
||||
/**
|
||||
* @see _.initial
|
||||
*/
|
||||
initial<TResult>(): LoDashImplicitArrayWrapper<TResult>;
|
||||
initial<T>(): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.initial
|
||||
*/
|
||||
initial(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.initial
|
||||
*/
|
||||
initial<T>(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.intersection
|
||||
|
||||
Reference in New Issue
Block a user