Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 6.16 KB

types.intersectiontype.md

File metadata and controls

45 lines (32 loc) · 6.16 KB

Home > @skunkteam/types > IntersectionType

IntersectionType class

The implementation behind types created with intersection() and BaseObjectLikeTypeImpl.and().

Signature:

declare class IntersectionType<Types extends OneOrMore<BaseObjectLikeTypeImpl<unknown>>> extends BaseObjectLikeTypeImpl<IntersectionOfTypeTuple<Types>, undefined> implements TypedPropertyInformation<PropertiesOfTypeTuple<Types>>

Extends: BaseObjectLikeTypeImpl<IntersectionOfTypeTuple<Types>, undefined>

Implements: TypedPropertyInformation<PropertiesOfTypeTuple<Types>>

Constructors

Constructor Modifiers Description
(constructor)(types, name) Constructs a new instance of the IntersectionType class

Properties

Property Modifiers Type Description
basicType readonly 'object' The kind of values this type validates.
combinedName readonly string
isDefaultName readonly boolean
name readonly string The name of the Type.
possibleDiscriminators readonly readonly PossibleDiscriminator[]
props readonly PropertiesOfTypeTuple<Types>
propsInfo readonly PropertiesInfo<PropertiesOfTypeTuple<Types>>
typeConfig readonly undefined Extra information that is made available by this Type for runtime analysis.
types readonly Types

Methods

Method Modifiers Description
accept(visitor) Accept a visitor (visitor pattern).
maybeStringify(value) Create a JSON string of the given value, using the type information of the current type. Matches the specs of JSON.stringify.
typeValidator(input, options) protected The actual validation-logic.