Skip to content

Commit

Permalink
Merge pull request #2 from kernwig/ts-types
Browse files Browse the repository at this point in the history
Include Typescript declarations
  • Loading branch information
kernwig authored May 6, 2020
2 parents b4ede1e + fb29a99 commit def2160
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea

*.d.ts
*.js
node_modules
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Or in place of: `setTimer(() => runMyFunction(), 24*60*60*1000)`

you get the clearer (and faster): `setTimer(() => runMyFunction(), MillisecondsInDay)`.

## Compatibility

Compatible with Javascript ES2015/ES6 and newer, as well as Typescript.

## FAQ

*Q:* Why should I introduce another dependency for a few constants that I can define myself?
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
"name": "temporal-constants",
"version": "1.0.0",
"description": "Constants to compute with time units without magic numbers.",
"main": "temporal-constants.js",
"main": "temporal-constants",
"types": "temporal-constants",
"keywords": [
"time",
"constant",
"temporal"
],
"author": "Adam Fanello",
"license": "MIT"
"license": "MIT",
"scripts": {
"build": "tsc -t ES6 -d --strict temporal-constants.ts"
},
"devDependencies": {
"typescript": "^3.8.3"
}
}
File renamed without changes.

0 comments on commit def2160

Please sign in to comment.