Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript err type

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 by kentcdodds.com #
 
PREVIOUS NEXT
Tagged: #typescript #err #type
ADD COMMENT
Topic
Name
4+5 =