Home > @skunkteam/types > SimpleType
Implementation for simple types such as primitive types.
Signature:
declare class SimpleType<ResultType, TypeConfig> extends BaseTypeImpl<ResultType, TypeConfig>
Extends: BaseTypeImpl<ResultType, TypeConfig>
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. |
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. |