Skip to main content

@automapper/core

Enumerations

Classes

Interfaces

Type aliases

AnyConstructor

Ƭ AnyConstructor: (...args: any[]) => any

Type declaration

• (...args)

Parameters
NameType
...argsany[]

Defined in

lib/types.ts:15


ApplyMetadata

Ƭ ApplyMetadata: (strategy: MappingStrategy<MetadataIdentifier>) => ApplyMetadataFn

Type declaration

▸ (strategy): ApplyMetadataFn

Parameters
NameType
strategyMappingStrategy<MetadataIdentifier>
Returns

ApplyMetadataFn

Defined in

lib/types.ts:571


ApplyMetadataFn

Ƭ ApplyMetadataFn: <TModel>(model: MetadataIdentifier<TModel>, as: MetadataObjectMapClassId) => TModel

Type declaration

▸ <TModel>(model, as): TModel

Type parameters
NameType
TModelextends Dictionary<TModel>
Parameters
NameType
modelMetadataIdentifier<TModel>
asMetadataObjectMapClassId
Returns

TModel

Defined in

lib/types.ts:566


ArrayKeyedMap

Ƭ ArrayKeyedMap: PathMap | DataMap

Defined in

lib/types.ts:559


ConditionReturn

Ƭ ConditionReturn<TSource, TDestination, TSelectorReturn>: [Condition, (source: TSource, sourceMemberPath: string[]) => TSelectorReturn]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:382


Constructor

Ƭ Constructor<T>: (...args: any[]) => T & TransformerMetadataFactory<T>

Type parameters

NameType
Tany

Defined in

lib/types.ts:16


ConvertUsingReturn

Ƭ ConvertUsingReturn<TSource, TDestination, TSelectorReturn>: [ConvertUsing, Selector<TSource, TSelectorReturn>]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:397


DataMap

Ƭ DataMap: Map<symbol, number>

Defined in

lib/types.ts:555


DestinationConstructor

Ƭ DestinationConstructor<TSource, TDestination>: (sourceObject: TSource, destinationIdentifier: MetadataIdentifier<TDestination>) => TDestination

Type parameters

NameType
TSourceextends Dictionary<TSource> = any
TDestinationextends Dictionary<TDestination> = any

Type declaration

▸ (sourceObject, destinationIdentifier): TDestination

Parameters
NameType
sourceObjectTSource
destinationIdentifierMetadataIdentifier<TDestination>
Returns

TDestination

Defined in

lib/types.ts:575


Dictionary

Ƭ Dictionary<T>: { [key in keyof T]?: unknown }

Type parameters

Name
T

Defined in

lib/types.ts:13


FromValueReturn

Ƭ FromValueReturn<TSource, TDestination, TSelectorReturn>: [FromValue, () => TSelectorReturn]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:391


IgnoreReturn

Ƭ IgnoreReturn<TSource, TDestination>: [Ignore]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>

Defined in

lib/types.ts:421


MapCallback

Ƭ MapCallback<TSource, TDestination, TExtraArgs>: (source: TSource, destination: TDestination, extraArguments?: TExtraArgs) => void

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TExtraArgsextends Record<string, any> = Record<string, any>

Type declaration

▸ (source, destination, extraArguments?): void

Parameters
NameType
sourceTSource
destinationTDestination
extraArguments?TExtraArgs
Returns

void

Defined in

lib/types.ts:96


MapDeferReturn

Ƭ MapDeferReturn<TSource, TDestination, TSelectorReturn>: [MapDefer, DeferFunction<TSource, TDestination, TSelectorReturn>]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:354


MapFromReturn

Ƭ MapFromReturn<TSource, TDestination, TSelectorReturn>: [MapFrom, Selector<TSource, TSelectorReturn>]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:363


MapInitializeReturn

Ƭ MapInitializeReturn<TSource, TDestination, TSelectorReturn>: [MapInitialize, Selector<TSource, TSelectorReturn>, boolean?]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:435


MapWithArgumentsReturn

Ƭ MapWithArgumentsReturn<TSource, TDestination, TSelectorReturn>: [MapWithArguments, (source: TSource, extraArguments: Record<string, any>) => TSelectorReturn]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:426


MapWithReturn

Ƭ MapWithReturn<TSource, TDestination, TSelectorReturn>: [MapWith, (sourceObj: TSource, mapper: Mapper) => TSelectorReturn | undefined | null]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:369


Mapping

Ƭ Mapping<TSource, TDestination>: [identifiers: [source: MetadataIdentifier<TSource>, destination: MetadataIdentifier<TDestination>], identifierMetadata: [source: TSource, destination: TDestination], properties: [path: string[], mappingProperty: MappingProperty<TSource, TDestination, SelectorReturn<TDestination>>, nestedMappingPair?: [destination: MetadataIdentifier | Primitive | Date, source: MetadataIdentifier | Primitive | Date]][], mapper: Mapper, destinationConstructor: DestinationConstructor<TSource, TDestination>, typeConverters?: Map<MetadataIdentifier | PrimitiveConstructor | DateConstructor, [Map<MetadataIdentifier | PrimitiveConstructor | DateConstructor, [Selector?, Selector?]>?, Map<MetadataIdentifier | PrimitiveConstructor | DateConstructor, [Selector?, Selector?]>?]>, callbacks?: [beforeMap?: MapCallback<TSource, TDestination>, afterMap?: MapCallback<TSource, TDestination>], namingConventions?: [source: NamingConvention, destination: NamingConvention]]

Type parameters

NameType
TSourceextends Dictionary<TSource> = any
TDestinationextends Dictionary<TDestination> = any

Defined in

lib/types.ts:507


MappingConfiguration

Ƭ MappingConfiguration<TSource, TDestination>: (mapping: Mapping<TSource, TDestination>) => void

Type parameters

NameType
TSourceextends Dictionary<TSource> = any
TDestinationextends Dictionary<TDestination> = any

Type declaration

▸ (mapping): void

Parameters
NameType
mappingMapping<TSource, TDestination>
Returns

void

Defined in

lib/types.ts:561


MappingProfile

Ƭ MappingProfile: (mapper: Mapper) => void

Type declaration

▸ (mapper): void

Parameters
NameType
mapperMapper
Returns

void

Defined in

lib/types.ts:583


MappingProperty

Ƭ MappingProperty<TSource, TDestination, TSelectorReturn>: [target: string[], transformation: MappingTransformation<TSource, TDestination, TSelectorReturn>]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:463


MappingStrategyInitializer

Ƭ MappingStrategyInitializer<TIdentifier>: (mapper: Mapper) => MappingStrategy<TIdentifier>

Type parameters

NameType
TIdentifierextends MetadataIdentifier

Type declaration

▸ (mapper): MappingStrategy<TIdentifier>

Parameters
NameType
mapperMapper
Returns

MappingStrategy<TIdentifier>

Defined in

lib/types.ts:621


MappingTransformation

Ƭ MappingTransformation<TSource, TDestination, TSelectorReturn>: [memberMapFn: MemberMapReturn<TSource, TDestination, TSelectorReturn>, preCond?: PreConditionReturn<TSource, TDestination, TSelectorReturn>]

Type parameters

NameType
TSourceextends Dictionary<TSource> = any
TDestinationextends Dictionary<TDestination> = any
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:450


MemberMapReturn

Ƭ MemberMapReturn<TSource, TDestination, TSelectorReturn>: MemberMapReturnNoDefer<TSource, TDestination, TSelectorReturn> | MapDeferReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:327


MemberMapReturnNoDefer

Ƭ MemberMapReturnNoDefer<TSource, TDestination, TSelectorReturn>: MapInitializeReturn<TSource, TDestination, TSelectorReturn> | MapWithReturn<TSource, TDestination, TSelectorReturn> | MapFromReturn<TSource, TDestination, TSelectorReturn> | ConditionReturn<TSource, TDestination, TSelectorReturn> | FromValueReturn<TSource, TDestination, TSelectorReturn> | ConvertUsingReturn<TSource, TDestination> | NullSubstitutionReturn<TSource, TDestination, TSelectorReturn> | UndefinedSubstitutionReturn<TSource, TDestination, TSelectorReturn> | IgnoreReturn<TSource, TDestination> | MapWithArgumentsReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:311


Metadata

Ƭ Metadata: [propertyKeys: string[], metaFn: Function, isArray: boolean, isGetterOnly?: boolean]

Defined in

lib/types.ts:136


MetadataIdentifier

Ƭ MetadataIdentifier<T>: Exclude<ModelIdentifier<T>, string>

Type parameters

NameType
Tany

Defined in

lib/types.ts:122


MetadataList

Ƭ MetadataList: [property: string, metadata: Object][]

Defined in

lib/types.ts:585


ModelIdentifier

Ƭ ModelIdentifier<T>: string | symbol | Constructor<T>

Type parameters

NameType
Tany

Defined in

lib/types.ts:120


NamingConventionInput

Ƭ NamingConventionInput: NamingConvention | { destination: NamingConvention ; source: NamingConvention }

Defined in

lib/types.ts:59


NestedMappingPair

Ƭ NestedMappingPair: [MetadataIdentifier | Primitive | Date, MetadataIdentifier | Primitive | Date]

Defined in

lib/types.ts:491


NullSubstitutionReturn

Ƭ NullSubstitutionReturn<TSource, TDestination, TSelectorReturn>: [NullSubstitution, (source: TSource, sourceMemberPath: string[]) => TSelectorReturn]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:403


PathMap

Ƭ PathMap: Map<string, PathMap | DataMap>

Defined in

lib/types.ts:557


PreConditionReturn

Ƭ PreConditionReturn<TSource, TDestination, TSelectorReturn>: [preConditionPredicate: ConditionPredicate<TSource>, defaultValue?: TSelectorReturn]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:335


Primitive

Ƭ Primitive: String | Number | Boolean

Defined in

lib/types.ts:19


PrimitiveConstructor

Ƭ PrimitiveConstructor: StringConstructor | NumberConstructor | BooleanConstructor

Defined in

lib/types.ts:22


PrimitiveConstructorExtended

Ƭ PrimitiveConstructorExtended: PrimitiveConstructor | DateConstructor | AnyConstructor

Defined in

lib/types.ts:27


PrimitiveConstructorReturnType

Ƭ PrimitiveConstructorReturnType<TType>: TType extends DateConstructor | Exclude<TType, PrimitiveConstructor> ? InstanceType<TType> : ReturnType<Extract<TType, PrimitiveConstructor>>

Type parameters

NameType
TTypeextends PrimitiveConstructorExtended

Defined in

lib/types.ts:32


PrimitiveExtended

Ƭ PrimitiveExtended: Primitive | Date

Defined in

lib/types.ts:20


Selector

Ƭ Selector<TObject, TReturnType>: (obj: TObject) => TReturnType

Type parameters

NameType
TObjectextends Dictionary<TObject> = any
TReturnTypeunknown

Type declaration

▸ (obj): TReturnType

Parameters
NameType
objTObject
Returns

TReturnType

Defined in

lib/types.ts:66


SelectorReturn

Ƭ SelectorReturn<TObject>: ReturnType<Selector<TObject>>

Type parameters

NameType
TObjectextends Dictionary<TObject>

Defined in

lib/types.ts:71


UndefinedSubstitutionReturn

Ƭ UndefinedSubstitutionReturn<TSource, TDestination, TSelectorReturn>: [UndefinedSubstitution, (source: TSource, sourceMemberPath: string[]) => TSelectorReturn]

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnSelectorReturn<TDestination>

Defined in

lib/types.ts:412


ValueSelector

Ƭ ValueSelector<TSource, TDestination, TValueReturn>: (source: TSource) => TValueReturn

Type parameters

NameType
TSourceextends Dictionary<TSource> = any
TDestinationextends Dictionary<TDestination> = any
TValueReturnSelectorReturn<TDestination>

Type declaration

▸ (source): TValueReturn

Parameters
NameType
sourceTSource
Returns

TValueReturn

Defined in

lib/types.ts:75

Variables

defaultStrategyInitializerOptions

Const defaultStrategyInitializerOptions: Required<Omit<MappingStrategyInitializerOptions, "destinationConstructor">>

Defined in

lib/default-strategy-initializer-options.ts:4

Functions

addProfile

addProfile(mapper, profile, ...mappingConfigurations): void

Parameters

NameType
mapperMapper
profileMappingProfile
...mappingConfigurationsMappingConfiguration<any, any>[]

Returns

void

Defined in

lib/mappings/add-profile.ts:4


afterMap

afterMap<TSource, TDestination>(cb): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>

Parameters

NameType
cbMapCallback<TSource, TDestination, Record<string, any>>

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/after-map.ts:4


beforeMap

beforeMap<TSource, TDestination>(cb): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>

Parameters

NameType
cbMapCallback<TSource, TDestination, Record<string, any>>

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/before-map.ts:4


condition

condition<TSource, TDestination, TSelectorReturn>(predicate, defaultValue?): ConditionReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown

Parameters

NameType
predicateConditionPredicate<TSource>
defaultValue?TSelectorReturn

Returns

ConditionReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/condition.ts:10


constructUsing

constructUsing<TSource, TDestination>(destinationConstructor): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>

Parameters

NameType
destinationConstructorDestinationConstructor<TSource, TDestination>

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/construct-using.ts:9


convertUsing

convertUsing<TSource, TDestination, TSelectorReturn, TConvertSourceReturn>(converter, selector): ConvertUsingReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown
TConvertSourceReturnunknown

Parameters

NameType
converterConverter<TConvertSourceReturn, TSelectorReturn>
selectorSelector<TSource, TConvertSourceReturn>

Returns

ConvertUsingReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/convert-using.ts:10


createMap

createMap<TSource>(mapper, source, ...mappingConfigFns): Mapping<TSource, TSource>

Type parameters

NameType
TSourceextends Dictionary<TSource>

Parameters

NameType
mapperMapper
sourceModelIdentifier<TSource>
...mappingConfigFns(undefined | MappingConfiguration<TSource, TSource>)[]

Returns

Mapping<TSource, TSource>

Defined in

lib/mappings/create-map.ts:18

createMap<TSource, TDestination>(mapper, source, destination, ...mappingConfigFns): Mapping<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>

Parameters

NameType
mapperMapper
sourceModelIdentifier<TSource>
destinationModelIdentifier<TDestination>
...mappingConfigFns(undefined | MappingConfiguration<TSource, TDestination>)[]

Returns

Mapping<TSource, TDestination>

Defined in

lib/mappings/create-map.ts:23


createMapper

createMapper(options): Mapper

Creates and returns a Mapper {} as a Proxy. The following methods are available to use with a Mapper:

- Mapper#map(Array)(Async), Mapper#mutate(Array)(Async)
- createMap()
- addProfile()
- getMapping()
- getMappings()

Parameters

NameType
optionsCreateMapperOptions

Returns

Mapper

Defined in

lib/core.ts:49


extend

extend<TSource, TDestination, TExtendSource, TExtendDestination>(mapping): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TExtendSourceextends Dictionary<TExtendSource>
TExtendDestinationextends Dictionary<TExtendDestination>

Parameters

NameType
mappingMapping<TExtendSource, TExtendDestination>

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/extend.ts:12

extend<TSource, TDestination, TExtendSource, TExtendDestination>(source, destination): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TExtendSourceextends Dictionary<TExtendSource>
TExtendDestinationextends Dictionary<TExtendDestination>

Parameters

NameType
sourceModelIdentifier<TExtendSource>
destinationModelIdentifier<TExtendDestination>

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/extend.ts:20


forMember

forMember<TSource, TDestination, TMemberType>(selector, ...fns): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TMemberTypeunknown

Parameters

NameType
selectorSelector<TDestination, TMemberType>
...fns[preCondOrMapMemberFn: PreConditionReturn<TSource, TDestination, TMemberType> | MemberMapReturn<TSource, TDestination, TMemberType>, mapMemberFn?: MemberMapReturn<TSource, TDestination, TMemberType>]

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/for-member.ts:16


forSelf

forSelf<TSource, TDestination, TSelfSource>(sourceOrMapping, selector): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelfSourceextends Dictionary<TSelfSource>

Parameters

NameType
sourceOrMappingModelIdentifier<TSelfSource> | Mapping<TSelfSource, TDestination>
selectorSelector<TSource, TSelfSource>

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/for-self.ts:23


fromValue

fromValue<TSource, TDestination, TSelectorReturn>(rawValue): FromValueReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown

Parameters

NameType
rawValueTSelectorReturn

Returns

FromValueReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/from-value.ts:4


getRecursiveValue

getRecursiveValue(recursiveMap, parent, member): number | undefined

Parameters

NameType
recursiveMapMap<MetadataIdentifier<any>, ArrayKeyedMap>
parentMetadataIdentifier<any>
memberstring[]

Returns

number | undefined

Defined in

lib/utils/recursion.ts:10


ignore

ignore<TSource, TDestination>(): IgnoreReturn<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>

Returns

IgnoreReturn<TSource, TDestination>

Defined in

lib/member-map-functions/ignore.ts:4


isDateConstructor

isDateConstructor(value): boolean

Check if value is a Date constructor

Parameters

NameType
valueunknown

Returns

boolean

Defined in

lib/utils/is-date-constructor.ts:6


isEmpty

isEmpty(value): boolean

Parameters

NameType
valueunknown

Returns

boolean

Defined in

lib/utils/is-empty.ts:1


isPrimitiveConstructor

isPrimitiveConstructor(value): boolean

Check if value is a String/Number/Boolean/Array constructor

Parameters

NameType
valueunknown

Returns

boolean

Defined in

lib/utils/is-primitive-constructor.ts:6


mapDefer

mapDefer<TSource, TDestination, TSelectorReturn>(defer): MapDeferReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource> = any
TDestinationextends Dictionary<TDestination> = any
TSelectorReturnunknown

Parameters

NameType
deferDeferFunction<TSource, TDestination, TSelectorReturn>

Returns

MapDeferReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/map-defer.ts:4


mapFrom

mapFrom<TSource, TDestination, TSelectorReturn>(from): MapFromReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown

Parameters

NameType
fromValueSelector<TSource, TDestination, TSelectorReturn> | Resolver<TSource, TDestination, TSelectorReturn>

Returns

MapFromReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/map-from.ts:11


mapWith

mapWith<TSource, TDestination, TSelectorReturn, TWithDestination, TWithSource, TWithSourceValue>(withDestination, withSource, withSourceValue): MapWithReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown
TWithDestinationextends ModelIdentifier<any> = ModelIdentifier<any>
TWithSourceextends ModelIdentifier<any> = ModelIdentifier<any>
TWithSourceValueextends ValueSelector<any, any, unknown> = TWithSource extends Constructor<InferredWithSource> ? ValueSelector<TSource, InferredWithSource, unknown> : ValueSelector<TSource, any, unknown>

Parameters

NameType
withDestinationTWithDestination
withSourceTWithSource
withSourceValueTWithSourceValue

Returns

MapWithReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/map-with.ts:11


mapWithArguments

mapWithArguments<TSource, TDestination, TSelectorReturn>(withArgumentsResolver): MapWithArgumentsReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown

Parameters

NameType
withArgumentsResolver(source: TSource, extraArguments: Record<string, unknown>) => TSelectorReturn | Resolver<TSource, Record<string, unknown>, TSelectorReturn>

Returns

MapWithArgumentsReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/map-with-arguments.ts:10


namingConventions

namingConventions<TSource, TDestination>(namingConventionsInput): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>

Parameters

NameType
namingConventionsInputNamingConventionInput

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/naming-conventions.ts:10


nullSubstitution

nullSubstitution<TSource, TDestination, TSelectorReturn>(substitution): NullSubstitutionReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown

Parameters

NameType
substitutionTSelectorReturn

Returns

NullSubstitutionReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/null-substitution.ts:9


preCondition

preCondition<TSource, TDestination, TSelectorReturn>(predicate, defaultValue?): PreConditionReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown

Parameters

NameType
predicateConditionPredicate<TSource>
defaultValue?TSelectorReturn

Returns

PreConditionReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/pre-condition.ts:8


set

set<T>(object, path, value): T & { [p: string]: unknown; } | T

Type parameters

NameType
Textends Record<string, unknown>

Parameters

NameType
objectT
pathstring[]
valueunknown

Returns

T & { [p: string]: unknown; } | T

Defined in

lib/utils/set.ts:1


setMutate

setMutate<T>(object, path, value): void

Type parameters

NameType
Textends Record<string, unknown>

Parameters

NameType
objectT
pathstring[]
valueunknown

Returns

void

Defined in

lib/utils/set.ts:28


setRecursiveValue

setRecursiveValue(recursiveMap, parent, member, value): void

Parameters

NameType
recursiveMapMap<MetadataIdentifier<any>, ArrayKeyedMap>
parentMetadataIdentifier<any>
memberstring[]
valuenumber

Returns

void

Defined in

lib/utils/recursion.ts:19


typeConverter

typeConverter<TSource, TDestination, TSourceConstructor, TDestinationConstructor>(source, destination, converterOrValueSelector): MappingConfiguration<TSource, TDestination>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSourceConstructorextends PrimitiveConstructorExtended | [PrimitiveConstructorExtended]
TDestinationConstructorextends PrimitiveConstructorExtended | [PrimitiveConstructorExtended]

Parameters

NameType
sourceTSourceConstructor
destinationTDestinationConstructor
converterOrValueSelectorConverterOrValueSelector<TSourceConstructor, TDestinationConstructor>

Returns

MappingConfiguration<TSource, TDestination>

Defined in

lib/mapping-configurations/type-converters.ts:41


undefinedSubstitution

undefinedSubstitution<TSource, TDestination, TSelectorReturn>(substitution): UndefinedSubstitutionReturn<TSource, TDestination, TSelectorReturn>

Type parameters

NameType
TSourceextends Dictionary<TSource>
TDestinationextends Dictionary<TDestination>
TSelectorReturnunknown

Parameters

NameType
substitutionTSelectorReturn

Returns

UndefinedSubstitutionReturn<TSource, TDestination, TSelectorReturn>

Defined in

lib/member-map-functions/undefined-substitution.ts:9