Issue
When I build my react project I get an error like this.
export type ExtractRouteOptionalParam<T extends string, U = string | number | boolean> = T extends `${infer Param}?`
? { [k in Param]?: U }
: T extends `${infer Param}*`
? { [k in Param]?: U }
How to solve this?
Solution
I am adding an answer for future reference for others.
Yes like others mentioned typescript was the issue.
I upgraded it to the latest version (currently 4.8.3
). After upgrading, I had to fix a type issue on my redux saga
file and I had to upgrade react-scripts
to 4.0.1
to fix the Parsing error: Cannot read properties of undefined (reading 'map')
.
Answered By - Rohan Jayaraj
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.