Skip to content

Commit 6e03ec5

Browse files
committed
update types
1 parent d4aa580 commit 6e03ec5

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-timer-hook",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "React timer hook is a custom react hook built to handle timers(countdown), stopwatch and time logic/state in your react component.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ interface TimerSettings {
22
autoStart?: boolean;
33
expiryTimestamp: Date;
44
onExpire?: () => void;
5-
enableMilliseconds?: boolean;
5+
interval?: number;
66
}
77

88
interface TimerResult {
@@ -25,7 +25,7 @@ export function useTimer(settings: TimerSettings): TimerResult
2525
interface StopwatchSettings {
2626
autoStart?: boolean;
2727
offsetTimestamp?: Date;
28-
enableMilliseconds?: boolean;
28+
interval?: number;
2929
}
3030

3131
interface StopwatchResult {
@@ -46,6 +46,7 @@ export function useStopwatch(settings?: StopwatchSettings): StopwatchResult
4646

4747
interface TimeSettings {
4848
format?: '12-hour';
49+
interval?: number;
4950
}
5051

5152
interface TimeResult {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,7 @@ cosmiconfig@^7.0.0:
20222022

20232023
cross-spawn@^7.0.2, cross-spawn@^7.0.3:
20242024
version "7.0.6"
2025-
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
2025+
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz"
20262026
integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
20272027
dependencies:
20282028
path-key "^3.1.0"
@@ -2587,7 +2587,7 @@ execa@^5.0.0:
25872587

25882588
express@^4.17.3:
25892589
version "4.21.2"
2590-
resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32"
2590+
resolved "https://registry.npmjs.org/express/-/express-4.21.2.tgz"
25912591
integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==
25922592
dependencies:
25932593
accepts "~1.3.8"
@@ -3035,7 +3035,7 @@ http-parser-js@>=0.5.1:
30353035

30363036
http-proxy-middleware@^2.0.3:
30373037
version "2.0.7"
3038-
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz#915f236d92ae98ef48278a95dedf17e991936ec6"
3038+
resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz"
30393039
integrity sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==
30403040
dependencies:
30413041
"@types/http-proxy" "^1.17.8"
@@ -3898,7 +3898,7 @@ path-parse@^1.0.7:
38983898

38993899
39003900
version "0.1.12"
3901-
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7"
3901+
resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz"
39023902
integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==
39033903

39043904
path-type@^4.0.0:

0 commit comments

Comments
 (0)