Closed nlindroos closed 4 years ago
To make TypeScript compilation work, this can be temporarily bypassed with e.g. the following patch, using patch-package:
// patches/react-native-countdown-circle-timer+2.3.9.patch
diff --git a/node_modules/react-native-countdown-circle-timer/types/CountdownCircleTimer.d.ts b/node_modules/react-native-countdown-circle-timer/types/CountdownCircleTimer.d.ts
index ee7e758..e37afec 100644
--- a/node_modules/react-native-countdown-circle-timer/types/CountdownCircleTimer.d.ts
+++ b/node_modules/react-native-countdown-circle-timer/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
@@ -48,7 +45,7 @@ export interface CountdownCircleTimerProps {
* and second element "delay" specifies the delay before looping again in milliseconds.
*
*/
- onComplete?: OnComplete
+ onComplete?: any
/** 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 */
Hey @nlindroos, thanks for reporting this issue. It is now fixed in 2.3.10 👍
Thank you @vydimitrov for the quick response and fix!
Hi!
react-native-countdown-circle-timer/types/CountdownCircleTimer.d.ts contains the line
This presumably refers to the use-elapsed-time package. This package is not included as a dependency in react-native-countdown-circle-timer/package.json, which causes TypeScript to emit the error
Cannot find module 'use-elapsed-time' or its corresponding type declarations. ts(2307)
.