Home > @skunkteam/types > IntersectionType
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>>
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(types, name) | Constructs a new instance of the IntersectionType class |
| 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 |
| 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. |