When try to run react app (react18 and typescirpt 4)
There is a terminal error
TS2339: Property 'error' does not exist on type 'unknown'.
try {
} catch (error: any) {
// do something
}
try {
} catch (error: unknown) {
// do something
}
try {
} catch (error: CustError) {
// do something
}
VScode will instantly revert to on save
try {
} catch (error) {
// do something
}
Is it a way to get around with this?