Add type definitions for vali-date

This commit is contained in:
Sam Verschueren
2017-11-30 20:20:31 +01:00
parent 9dee7ddc7d
commit f5ec075672
4 changed files with 41 additions and 0 deletions

8
types/vali-date/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for vali-date 1.0
// Project: https://github.com/SamVerschueren/vali-date
// Definitions by: Sam Verschueren <https://github.com/SamVerschueren>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function valiDate(input: string): boolean;
declare namespace valiDate { }
export = valiDate;

View File

@@ -0,0 +1,25 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"vali-date-tests.ts"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}

View File

@@ -0,0 +1,5 @@
import * as valiDate from 'vali-date';
valiDate('foo');
valiDate('bar');
valiDate('2017-05-10');