Generic type variables
The `ValidationError` object generic type variables
ValidationError<Id>
ValidationError<Id>class ValidationError<
Id extends string // <--- Declare generic type variable Id.
> extends Error {
...
constructor(
problem: string,
fix: string,
id?: Id, // <--- Capture generic type variable Id.
template = ValidationError.template
) { ... }
...
}Last updated