static define()
Defines the `TypeError` instance
TypeError.define()
public static define<
Id extends string,
Type extends string | undefined = undefined
>(
problem: string,
fix: string,
id?: Id,
type?: Type,
template = TypeError.template
): TypeError<Id, Type> {
return new this(problem, fix, id, type, template);
}Generic type variables
Idextendsstring
Typeextendsstring|undefined=undefined
Parameters
problem:string
fix:string
id?:Id
type?:Type
template =TypeError.template
Return type
TypeError<Id,Type>
Returns
Example usage
Last updated