mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[lodash] Fix stubTrue for TS v3.1+ (#40110)
* [lodash] Fix stubTrue for TS v3.1+
Adds files that were left out of 2ce5aac that are used for TS v3.1+.
* Fix errors
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
7936f4d588
commit
c140acb6c8
Vendored
+25
@@ -1158,4 +1158,29 @@ declare module "../index" {
|
||||
*/
|
||||
uniqueId(): StringChain;
|
||||
}
|
||||
|
||||
// stubTrue
|
||||
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* This method returns true.
|
||||
*
|
||||
* @return Returns true.
|
||||
*/
|
||||
stubTrue(): true;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.stubTrue
|
||||
*/
|
||||
stubTrue(): true;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<TValue> {
|
||||
/**
|
||||
* @see _.stubTrue
|
||||
*/
|
||||
stubTrue(): LoDashExplicitWrapper<true>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6991,14 +6991,6 @@ fp.now(); // $ExpectType number
|
||||
fp.stubString(); // $ExpectType string
|
||||
}
|
||||
|
||||
// _.stubTrue
|
||||
{
|
||||
_.stubTrue(); // $ExpectType true
|
||||
_(anything).stubTrue(); // $ExpectType true
|
||||
_.chain(anything).stubTrue(); // $ExpectType PrimitiveChain<true>
|
||||
fp.stubTrue(); // $ExpectType true
|
||||
}
|
||||
|
||||
// _.times
|
||||
{
|
||||
const iteratee = (num: number): AbcObject => ({ a: 1, b: "", c: true });
|
||||
@@ -7093,3 +7085,11 @@ _.templateSettings; // $ExpectType TemplateSettings
|
||||
fp.partialRight(func1)([42]); // $ExpectType Function0<number>
|
||||
fp.partialRight(func2)([42, fp.partialRight.placeholder]); // $ExpectType Function1<string, number>
|
||||
}
|
||||
|
||||
// _.stubTrue
|
||||
{
|
||||
_.stubTrue(); // $ExpectType true
|
||||
_("").stubTrue(); // $ExpectType true
|
||||
_.chain("").stubTrue(); // $ExpectType LoDashExplicitWrapper<true>
|
||||
fp.stubTrue(); // $ExpectType true
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { stubTrue } from "./index";
|
||||
export = stubTrue;
|
||||
@@ -261,6 +261,7 @@
|
||||
"spread.d.ts",
|
||||
"startCase.d.ts",
|
||||
"startsWith.d.ts",
|
||||
"stubTrue.d.ts",
|
||||
"subtract.d.ts",
|
||||
"sum.d.ts",
|
||||
"sumBy.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user