Skip to content

Commit

Permalink
fix(mobile): wrong onComplete type fixes#56
Browse files Browse the repository at this point in the history
  • Loading branch information
vydimitrov committed Oct 11, 2020
1 parent 0619d28 commit 07b2a6c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/mobile/types/CountdownCircleTimer.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import * as React from 'react'
import { Config } from 'use-elapsed-time'

export type OnComplete = Config['onComplete']

export interface TimeProps {
remainingTime?: number
Expand Down Expand Up @@ -46,9 +43,9 @@ export interface CountdownCircleTimerProps {
* On animation complete event handler. It can be used to restart the animation by returning an array
* where the first element "shouldRepeat" indicates if the loop should start over
* and second element "delay" specifies the delay before looping again in milliseconds.
*
* The callback receives as an argument the total elapsed time in seconds
*/
onComplete?: OnComplete
onComplete?: (totalElapsedTime: number) => void | [boolean, number] // [shouldRepeat: boolean, delay: number]
/** Aria label for the whole component. Default: "Countdown timer" */
ariaLabel?: string
/** Render prop function to customize the text message that will be read by the screen reader during the countdown */
Expand Down

0 comments on commit 07b2a6c

Please sign in to comment.