Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 2.52 KB

types.simpletype.md

File metadata and controls

32 lines (22 loc) · 2.52 KB

Home > @skunkteam/types > SimpleType

SimpleType class

Implementation for simple types such as primitive types.

Signature:

declare class SimpleType<ResultType, TypeConfig> extends BaseTypeImpl<ResultType, TypeConfig>

Extends: BaseTypeImpl<ResultType, TypeConfig>

Properties

Property Modifiers Type Description
basicType readonly BasicType | 'mixed' The kind of values this type validates.
name readonly string The name of the Type.
typeConfig readonly TypeConfig Extra information that is made available by this Type for runtime analysis.

Methods

Method Modifiers Description
accept(visitor) Accept a visitor (visitor pattern).
create(name, basicType, simpleValidator, options) static Create a simple (limited) type implementation with type config.
create(name, basicType, simpleValidator, options) static Create a simple (limited) type implementation.
typeValidator(input, options) protected The actual validation-logic.