Skip to main content

Class: ExpectedConstraintError<T>

Extends

Type Parameters

Type ParameterDefault type
Tunknown

Constructors

new ExpectedConstraintError()

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

Parameters

ParameterType
constraintConstraintErrorNames
messagestring
givenT
expectedstring

Returns

ExpectedConstraintError<T>

Overrides

BaseConstraintError.constructor

Defined in

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

Properties

constraint

readonly constraint: ConstraintErrorNames

Inherited from

BaseConstraintError.constraint

Defined in

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


expected

readonly expected: string

Defined in

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


given

readonly given: T

Inherited from

BaseConstraintError.given

Defined in

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

Methods

[customInspectSymbol]()

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

Parameters

ParameterType
depthnumber
optionsInspectOptionsStylized

Returns

string

Inherited from

BaseConstraintError.[customInspectSymbol]

Defined in

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


[customInspectSymbolStackLess]()

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

Parameters

ParameterType
depthnumber
optionsInspectOptionsStylized

Returns

string

Overrides

BaseConstraintError.[customInspectSymbolStackLess]

Defined in

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


toJSON()

toJSON(): ExpectedConstraintErrorJsonified<T>

Returns

ExpectedConstraintErrorJsonified<T>

Overrides

BaseConstraintError.toJSON

Defined in

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