Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 3.05 KB

types.literaltype.md

File metadata and controls

38 lines (26 loc) · 3.05 KB

Home > @skunkteam/types > LiteralType

LiteralType class

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>

Constructors

Constructor Modifiers Description
(constructor)(value) Constructs a new instance of the LiteralType class

Properties

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

Methods

Method Modifiers Description
accept(visitor) Accept a visitor (visitor pattern).
typeValidator(input) protected The actual validation-logic.