Ensure that the msg data model is valid, calling onError on errors.
If onError is not defined, a MessageDataModelError will be thrown on error.
Detects the following errors:
'key-mismatch': Variant Key Mismatch
The number of keys on a variant does not equal the number of selectors.
'missing-fallback': Missing Fallback Variant
The message does not include a variant with only catch-all keys.
'missing-selector-annotation': Missing Selector Annotation
A selector does not contains a variable that directly or indirectly
reference a declaration with a function.
'duplicate-declaration': Duplicate Declaration
A variable appears in two declarations.
'duplicate-variant': Duplicate Variant
The same list of keys is used for more than one variant.
Ensure that the
msg
data model is valid, callingonError
on errors. IfonError
is not defined, a MessageDataModelError will be thrown on error.Detects the following errors:
'key-mismatch'
: Variant Key MismatchThe number of keys on a variant does not equal the number of selectors.
'missing-fallback'
: Missing Fallback VariantThe message does not include a variant with only catch-all keys.
'missing-selector-annotation'
: Missing Selector AnnotationA selector does not contains a variable that directly or indirectly reference a declaration with a function.
'duplicate-declaration'
: Duplicate DeclarationA variable appears in two declarations.
'duplicate-variant'
: Duplicate VariantThe same list of keys is used for more than one variant.