-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Description:
Installing this module with specific ts targets/libs will cause compile errors.
Replication steps:
- Create a new react app with typescript.
- Apply TSConfig similar to below.
- Make any necessary changes to ensure the app is building and serving/compiling properly.
- Install react-progress-bar-timer.
- Serve/debug the application.
- Observe a compile error.
Recommended solution:
Consider removing type from the dereferenced import in ProgressTimer.d.ts, resulting in : import { ProgressTimerProps, ProgressTimerHandle } from './ProgressTimer.types';
TSConfig
"target": "ES5",
"strict": true,
"module": "esnext",
"moduleResolution": "node",
"lib": [
"ES2020",
"DOM"
],
The Error :
...../node_modules/react-progress-bar-timer/dist/components/ProgressTimer.d.ts
TypeScript error in ....../node_modules/react-progress-bar-timer/dist/components/ProgressTimer.d.ts(2,15):
',' expected. TS1005
1 | /// <reference types="react" />
> 2 | import { type ProgressTimerProps, type ProgressTimerHandle } from './ProgressTimer.types';
| ^
3 | declare const ProgressTimer: import("react").ForwardRefExoticComponent<ProgressTimerProps & import("react").RefAttributes<ProgressTimerHandle>>;
4 | export default ProgressTimer;
5 |
Metadata
Metadata
Assignees
Labels
No labels