Skip to content

Commit 6f9dfc7

Browse files
committed
fix: Fix type for time returns; should have a totalSeconds property because Time.getTimeFromSeconds() returns it.
Updated docs to reflect update.
1 parent 46aad20 commit 6f9dfc7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { useTimer } from 'react-timer-hook';
2424

2525
function MyTimer({ expiryTimestamp }) {
2626
const {
27+
totalSeconds,
2728
seconds,
2829
minutes,
2930
hours,
@@ -105,6 +106,7 @@ import { useStopwatch } from 'react-timer-hook';
105106

106107
function MyStopwatch() {
107108
const {
109+
totalSeconds,
108110
seconds,
109111
minutes,
110112
hours,

src/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ interface TimerSettings {
55
}
66

77
interface TimerResult {
8+
totalSeconds: number;
89
seconds: number;
910
minutes: number;
1011
hours: number;
@@ -24,6 +25,7 @@ interface StopwatchSettings {
2425
}
2526

2627
interface StopwatchResult {
28+
totalSeconds: number;
2729
seconds: number;
2830
minutes: number;
2931
hours: number;

0 commit comments

Comments
 (0)