Skip to main content

Class: ExpectedConstraintError<T>

Defined in: projects/shapeshift/src/lib/errors/ExpectedConstraintError.ts:6

Extends

Type Parameters

Type ParameterDefault type
Tunknown

Constructors

new ExpectedConstraintError()

new ExpectedConstraintError<T>(constraint: ConstraintErrorNames, message: string, given: T, expected: string): ExpectedConstraintError<T>

Defined in: projects/shapeshift/src/lib/errors/ExpectedConstraintError.ts:9

Parameters

ParameterType
constraintConstraintErrorNames
messagestring
givenT
expectedstring

Returns

ExpectedConstraintError<T>

Overrides

BaseConstraintError.constructor

Properties

constraint

readonly constraint: ConstraintErrorNames

Defined in: projects/shapeshift/src/lib/errors/BaseConstraintError.ts:25

Inherited from

BaseConstraintError.constraint


expected

readonly expected: string

Defined in: projects/shapeshift/src/lib/errors/ExpectedConstraintError.ts:7


given

readonly given: T

Defined in: projects/shapeshift/src/lib/errors/BaseConstraintError.ts:26

Inherited from

BaseConstraintError.given

Methods

[customInspectSymbol]()

protected [customInspectSymbol](depth: number, options: InspectOptionsStylized): string

Defined in: projects/shapeshift/src/lib/errors/BaseError.ts:15

Parameters

ParameterType
depthnumber
optionsInspectOptionsStylized

Returns

string

Inherited from

BaseConstraintError.[customInspectSymbol]


[customInspectSymbolStackLess]()

protected [customInspectSymbolStackLess](depth: number, options: InspectOptionsStylized): string

Defined in: projects/shapeshift/src/lib/errors/ExpectedConstraintError.ts:24

Parameters

ParameterType
depthnumber
optionsInspectOptionsStylized

Returns

string

Overrides

BaseConstraintError.[customInspectSymbolStackLess]


toJSON()

toJSON(): ExpectedConstraintErrorJsonified<T>

Defined in: projects/shapeshift/src/lib/errors/ExpectedConstraintError.ts:14

Returns

ExpectedConstraintErrorJsonified<T>

Overrides

BaseConstraintError.toJSON