beginners-typescript-tutorial
beginners-typescript-tutorial copied to clipboard
Encouraging `unknown` type introduction before narrowing
Hi!
In the spirit of providing alternate solutions
for exercice 13 (entitled catch-blocks),
does it make sense to encourage possible introduction of
unknowntype- guard clause for case when
evariable inheriting fromErrorclass so that it is handled as expected (with expectation provided by test assertion), - guard clause for case when
evariable does not inherit fromErrorclass?