Question : typescript err type
Answered by :
const reportError = ({message}) => { // send the error to our logging service...
}
try { throw new Error('Oh no!')
} catch (error) { // we'll proceed, but let's report it reportError({message: error.message})
}
Source : https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript | Last Update : Sun, 05 Jun 22