diff --git a/types/lodash.stubtrue/index.d.ts b/types/lodash.stubtrue/index.d.ts new file mode 100644 index 0000000000..808446d323 --- /dev/null +++ b/types/lodash.stubtrue/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for lodash.stubTrue 4.13 +// Project: http://lodash.com/ +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// 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; diff --git a/types/lodash.stubtrue/tsconfig.json b/types/lodash.stubtrue/tsconfig.json new file mode 100644 index 0000000000..abf333c6bf --- /dev/null +++ b/types/lodash.stubtrue/tsconfig.json @@ -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" + ] +} \ No newline at end of file diff --git a/types/lodash.stubtrue/tslint.json b/types/lodash.stubtrue/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/lodash.stubtrue/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/lodash/common/util.d.ts b/types/lodash/common/util.d.ts index 80b06778fd..d8e51fd3ec 100644 --- a/types/lodash/common/util.d.ts +++ b/types/lodash/common/util.d.ts @@ -1460,4 +1460,29 @@ declare module "../index" { */ uniqueId(): LoDashExplicitWrapper; } + + // stubTrue + + interface LoDashStatic { + /** + * This method returns true. + * + * @return Returns true. + */ + stubTrue(): true; + } + + interface LoDashImplicitWrapper { + /** + * @see _.stubTrue + */ + stubTrue(): true; + } + + interface LoDashExplicitWrapper { + /** + * @see _.stubTrue + */ + stubTrue(): LoDashExplicitWrapper; + } } diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index f589cef369..3e8b6d2e75 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -7077,3 +7077,11 @@ _.templateSettings; // $ExpectType TemplateSettings fp.partialRight(func1)([42]); // $ExpectType Function0 fp.partialRight(func2)([42, fp.partialRight.placeholder]); // $ExpectType Function1 } + +// _.stubTrue +{ + _.stubTrue(); // $ExpectType true + _("").stubTrue(); // $ExpectType true + _.chain("").stubTrue(); // $ExpectType LoDashExplicitWrapper + fp.stubTrue(); // $ExpectType true +} diff --git a/types/lodash/stubTrue.d.ts b/types/lodash/stubTrue.d.ts new file mode 100644 index 0000000000..f2d4cf0997 --- /dev/null +++ b/types/lodash/stubTrue.d.ts @@ -0,0 +1,2 @@ +import { stubTrue } from "./index"; +export = stubTrue; diff --git a/types/lodash/tsconfig.json b/types/lodash/tsconfig.json index 8dc2fd6b5b..42e2a9a89a 100644 --- a/types/lodash/tsconfig.json +++ b/types/lodash/tsconfig.json @@ -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",