set()
Sets the `TypeError` object under the given `id`
TypeErrors.prototype.set()
public set<ErrorId extends Id>(
problem: string,
fix: string,
id: ErrorId,
type?: string,
template = TypeErrors.template
): this {
this.isAllowedId(id) &&
this.errors.set(id, new TypeError(problem, fix, id, type, template));
return this;
}Generic type variables
ErrorIdextendsId
Parameters
problem:string
fix:string
id:ErrorId
type?:string
template =TypeErrors.template
Return type
this
Example usage
Last updated