A base type (table) where each field has a type checker assigned
Two child types, which are shapes built from their own fields plus the fields of the base type
The two child types represent the success and error object of a given operation, the base type supplies fields which are mandatory for both. The super-type I'm actually using is a union of both child types:
I was running into an error, where .request.header had extra fields, which is not allowed. However, the error message only printed what it expected, not what it actually got. To solve this, I had to temporarily replace Tevent for Tfoo_success (I knew it was the Tfoo_success variant), at which point it correctly identified an extra field as the culprit.
Note: Extend is just a generic, non-mutating table merge. It doesn't contribute to this issue.
I have the following type setup:
The two child types represent the success and error object of a given operation, the base type supplies fields which are mandatory for both. The super-type I'm actually using is a union of both child types:
I was running into an error, where
.request.header
had extra fields, which is not allowed. However, the error message only printed what it expected, not what it actually got. To solve this, I had to temporarily replaceTevent
forTfoo_success
(I knew it was theTfoo_success
variant), at which point it correctly identified an extra field as the culprit.Note:
Extend
is just a generic, non-mutating table merge. It doesn't contribute to this issue.