From 07b2a6c3689a154b84f0b248ff231433d4db9912 Mon Sep 17 00:00:00 2001 From: Vasil Dimitrov Date: Sun, 11 Oct 2020 16:15:23 +0200 Subject: [PATCH] fix(mobile): wrong onComplete type fixes#56 --- packages/mobile/types/CountdownCircleTimer.d.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/mobile/types/CountdownCircleTimer.d.ts b/packages/mobile/types/CountdownCircleTimer.d.ts index ee7e758..93e4b0f 100644 --- a/packages/mobile/types/CountdownCircleTimer.d.ts +++ b/packages/mobile/types/CountdownCircleTimer.d.ts @@ -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 @@ -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 */