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