An EnvelopePatternError narrowed to one code: code is C and details is the payload of C. With the default type argument it is the union over every code, so narrowing on error.code narrows error.details.
code
C
details
error.code
error.details
An EnvelopePatternError narrowed to one code:
codeisCanddetailsis the payload ofC. With the default type argument it is the union over every code, so narrowing onerror.codenarrowserror.details.