Skip to content
RED SAG Skills
hardStudy question · answer published in TypeScript interview questions, so no pointsjavascripttypescriptstrict-mode

Type of the catch variable

With "strict": true (TypeScript 4.4+), why does this fail to compile?

try {
  await pay()
} catch (err) {
  console.log(err.message)
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions