[month-days] Add types

This commit is contained in:
Dimitri Benin
2018-12-16 00:40:19 +01:00
parent 39b514a4bb
commit 9fc3226347
4 changed files with 39 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for month-days 2.1
// Project: https://github.com/sindresorhus/month-days#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = monthDays;
declare function monthDays(month?: number, year?: number): number;
+8
View File
@@ -0,0 +1,8 @@
import monthDays = require('month-days');
// $ExpectType number
monthDays();
// $ExpectType number
monthDays(1);
// $ExpectType number
monthDays(1, 2016);
+23
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }