Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit 6935aeb

Browse files
authored
Merge pull request #20 from buildo/add_typings
Add typings
2 parents f2e3ace + 19d8f1a commit 6935aeb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Diff for: index.js

-1
This file was deleted.

Diff for: package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"name": "local-date",
33
"version": "2.0.2",
44
"description": "Replacement of Date for dealing with dates independent of time or timezone.",
5-
"main": "index.js",
5+
"main": "./lib/index.js",
6+
"types": "./lib/index.d.ts",
67
"scripts": {
78
"test": "jest",
8-
"build": "rm -rf lib && mkdir lib && babel src -d lib",
9+
"build": "rm -rf lib && mkdir lib && babel src -d lib && cp src/index.d.ts lib",
910
"lint": "eslint src test",
1011
"preversion": "npm run lint && npm run test",
1112
"prepublish": "npm run build",

Diff for: src/index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module 'local-date' {
2+
export class LocalDate extends Date {}
3+
export class LocalDateTime extends Date {}
4+
}

0 commit comments

Comments
 (0)