Skip to main content

ts-transforms / operations/lib/validations/base / default

Class: abstract default<T>

Extends

Extended by

Type parameters

Type parameter
T

Constructors

new default()

new default<T>(config): default<T>

Parameters

ParameterType
configany

Returns

default<T>

Overrides

default.constructor

Source

operations/lib/validations/base.ts:9

Properties

config

readonly config: OperationConfig

Inherited from

default.config

Source

operations/lib/base.ts:9


destination

protected destination: string | string[]

Inherited from

default.destination

Source

operations/lib/base.ts:10


hasTarget

protected hasTarget: boolean

Inherited from

default.hasTarget

Source

operations/lib/base.ts:11


source

protected source: string | string[]

Inherited from

default.source

Source

operations/lib/base.ts:7


target

protected target: string | string[]

Inherited from

default.target

Source

operations/lib/base.ts:8


cardinality

static cardinality: InputOutputCardinality = 'one-to-one'

Inherited from

default.cardinality

Source

operations/lib/base.ts:13

Methods

normalize()?

optional normalize(data, _doc): any

Parameters

ParameterType
dataany
_docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

any

Source

operations/lib/validations/base.ts:16


removeField()

removeField(doc, field): void

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>
fieldstring

Returns

void

Inherited from

default.removeField

Source

operations/lib/base.ts:50


removeSource()

removeSource(doc): void

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

void

Inherited from

default.removeSource

Source

operations/lib/base.ts:46


run()

run(doc): null | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

null | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Source

operations/lib/validations/base.ts:18


set()

set(doc, data): void

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>
dataany

Returns

void

Inherited from

default.set

Source

operations/lib/base.ts:38


setField()

setField(doc, field, data): void

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>
fieldstring
dataany

Returns

void

Inherited from

default.setField

Source

operations/lib/base.ts:42


validate()

abstract validate(data): boolean

Parameters

ParameterType
dataundefined | null | T

Returns

boolean

Source

operations/lib/validations/base.ts:14


validateConfig()

protected validateConfig(config): void

Parameters

ParameterType
configOperationConfig

Returns

void

Inherited from

default.validateConfig

Source

operations/lib/base.ts:22