Checks whether a value is error-shaped and has the given explicit name.
Any defined cause must also be error-shaped.
This uses lightweight shape checks rather than constructor identity, so it
works across package copies and after error serialization. A matching name
is assumed to identify the intended error type; additional fields are not
validated. Custom type guards should check any additional fields they need.
Checks whether a value is error-shaped and has the given explicit name. Any defined
causemust also be error-shaped.This uses lightweight shape checks rather than constructor identity, so it works across package copies and after error serialization. A matching name is assumed to identify the intended error type; additional fields are not validated. Custom type guards should check any additional fields they need.