mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-08 11:39:11 +08:00
lodash: signatures of the method _.compact have been changed
This commit is contained in:
1 parent
0dd29bf825
commit
ba6682baf0
2 files changed
+35
-6
No files matched your search
+21
-6
@@ -186,13 +186,28 @@ module TestChunk {
|
||||
module TestCompact {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.compact<TResult>();
|
||||
result = _.compact<TResult>(array);
|
||||
result = _.compact<TResult>(list);
|
||||
result = _<TResult>(array).compact().value();
|
||||
result = _(list).compact<TResult>().value();
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.compact<TResult>();
|
||||
result = _.compact<TResult>(array);
|
||||
result = _.compact<TResult>(list);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _<TResult>(array).compact();
|
||||
result = _(list).compact<TResult>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _<TResult>(array).chain().compact();
|
||||
result = _(list).chain().compact<TResult>();
|
||||
}
|
||||
}
|
||||
|
||||
// _.difference
|
||||
|
||||
Vendored
+14
@@ -320,6 +320,20 @@ declare module _ {
|
||||
compact<TResult>(): LoDashImplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.compact
|
||||
*/
|
||||
compact(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.compact
|
||||
*/
|
||||
compact<TResult>(): LoDashExplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.difference
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user