This API is still experimental, so it may change or be removed in future versions. You should not rely on it for production applications.
('a is Variant).({ 'b: (Object Any) => 'c }) => 'c
where 'b = 'a[`@@folktale:adt:tag]
matchWith(pattern) {
assertObject(`${typeId}'s ${name}#matchWith`, pattern);
if (name in pattern) {
return pattern[name](this);
} else if (ANY in pattern) {
return pattern[ANY]();
} else {
throw new Error(getMatchWithErrorMessage(pattern, name));
}
}