mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-03-31 02:34:28 +00:00
[lodash] Add stubTrue to lodash (#38920)
* [lodash] Add lodash/stubTrue * Add stubTrue.d.ts to tsconfig.json * Add lodash.stubtrue
This commit is contained in:
committed by
Armando Aguirre
parent
a83bc68922
commit
2ce5aacbd0
10
types/lodash.stubtrue/index.d.ts
vendored
Normal file
10
types/lodash.stubtrue/index.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Type definitions for lodash.stubTrue 4.13
|
||||
// Project: http://lodash.com/
|
||||
// Definitions by: Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>, Stepan Mikhaylyuk <https://github.com/stepancar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
// Generated from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/lodash/scripts/generate-modules.ts
|
||||
|
||||
import { stubTrue } from "lodash";
|
||||
export = stubTrue;
|
||||
22
types/lodash.stubtrue/tsconfig.json
Normal file
22
types/lodash.stubtrue/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts"
|
||||
]
|
||||
}
|
||||
1
types/lodash.stubtrue/tslint.json
Normal file
1
types/lodash.stubtrue/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
25
types/lodash/common/util.d.ts
vendored
25
types/lodash/common/util.d.ts
vendored
@@ -1460,4 +1460,29 @@ declare module "../index" {
|
||||
*/
|
||||
uniqueId(): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
// 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>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7077,3 +7077,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
|
||||
}
|
||||
|
||||
2
types/lodash/stubTrue.d.ts
vendored
Normal file
2
types/lodash/stubTrue.d.ts
vendored
Normal file
@@ -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