Skip to content

CheckResult

type CheckResult =
| Localized
| {
message: Localized;
severity?: Severity;
}
| null
| undefined
| void;

What a check returns: nothing when the value is fine, otherwise a message. The message can be given in several languages ({ en: ‘Too high’, de: ‘Zu hoch’ }); the editor shows the one that fits its language best. Or use ctx.language to write it in the editor’s language.