Function: validateStrict()
February 7, 2026 ยท View on GitHub
CTRF / validateStrict
Function: validateStrict()
validateStrict(
report):asserts report is CTRFReport
Defined in: validate.ts:105
Parameters
report
unknown
The object to validate
Returns
asserts report is CTRFReport
Throws
ValidationError if the report is invalid
Example
try {
validateStrict(report);
// TypeScript now knows report is CTRFReport
} catch (e) {
if (e instanceof ValidationError) {
console.log(e.errors);
}
}