Type guards. Each narrows unknown to the matching error class so callers can branch on error kind without manual instanceof checks.
unknown
instanceof
Type guards. Each narrows
unknownto the matching error class so callers can branch on error kind without manualinstanceofchecks.