Home > @skunkteam/types > LiteralType
The implementation behind types created with literal() and nullType, undefinedType and voidType.
Signature:
declare class LiteralType<ResultType extends LiteralValue> extends BaseTypeImpl<ResultType>
Extends: BaseTypeImpl<ResultType>
Constructor | Modifiers | Description |
---|---|---|
(constructor)(value) | Constructs a new instance of the LiteralType class |
Property | Modifiers | Type | Description |
---|---|---|---|
basicType | readonly |
BasicType | The kind of values this type validates. |
enumerableLiteralDomain | readonly |
ResultType[] | The set of valid literals if enumerable. |
name | readonly |
string | The name of the Type. |
typeConfig | readonly |
undefined | Extra information that is made available by this Type for runtime analysis. |
value | readonly |
ResultType |
Method | Modifiers | Description |
---|---|---|
accept(visitor) | Accept a visitor (visitor pattern). | |
typeValidator(input) | protected |
The actual validation-logic. |