mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
Add types for week module (#15148)
This commit is contained in:
committed by
Mohamed Hegazy
parent
b8207d7f73
commit
aced389ca0
8
week/index.d.ts
vendored
Normal file
8
week/index.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// Type definitions for week 0.2
|
||||
// Project: https://github.com/datetime/week
|
||||
// Definitions by: Sindre Moen <https://github.com/sindrenm>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function week(date?: Date): string;
|
||||
|
||||
export = week;
|
||||
22
week/tsconfig.json
Normal file
22
week/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"week-tests.ts"
|
||||
]
|
||||
}
|
||||
3
week/tslint.json
Normal file
3
week/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../tslint.json"
|
||||
}
|
||||
6
week/week-tests.ts
Normal file
6
week/week-tests.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import week = require('week');
|
||||
|
||||
let weekNumber: string;
|
||||
|
||||
weekNumber = week(new Date());
|
||||
weekNumber = week();
|
||||
Reference in New Issue
Block a user