The `ValidationError` object generic type variables
Last updated 1 year ago
Was this helpful?
ValidationError<
Id
>
extends
A generic type variable constrained by the , by default of the value captured from the provided indicates the type of a new instance.
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 ) { ... } ... }
string
ValidationError
id