From 9fc3226347da9418376467d3a7cf6d957bb712cf Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sat, 15 Dec 2018 21:59:10 +0100 Subject: [PATCH] [month-days] Add types --- types/month-days/index.d.ts | 7 +++++++ types/month-days/month-days-tests.ts | 8 ++++++++ types/month-days/tsconfig.json | 23 +++++++++++++++++++++++ types/month-days/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/month-days/index.d.ts create mode 100644 types/month-days/month-days-tests.ts create mode 100644 types/month-days/tsconfig.json create mode 100644 types/month-days/tslint.json diff --git a/types/month-days/index.d.ts b/types/month-days/index.d.ts new file mode 100644 index 0000000000..1a4249abac --- /dev/null +++ b/types/month-days/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for month-days 2.1 +// Project: https://github.com/sindresorhus/month-days#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +export = monthDays; + +declare function monthDays(month?: number, year?: number): number; diff --git a/types/month-days/month-days-tests.ts b/types/month-days/month-days-tests.ts new file mode 100644 index 0000000000..1b33a183fa --- /dev/null +++ b/types/month-days/month-days-tests.ts @@ -0,0 +1,8 @@ +import monthDays = require('month-days'); + +// $ExpectType number +monthDays(); +// $ExpectType number +monthDays(1); +// $ExpectType number +monthDays(1, 2016); diff --git a/types/month-days/tsconfig.json b/types/month-days/tsconfig.json new file mode 100644 index 0000000000..a125d8cae5 --- /dev/null +++ b/types/month-days/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "month-days-tests.ts" + ] +} diff --git a/types/month-days/tslint.json b/types/month-days/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/month-days/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }