@automapper/core
Enumerations
- MapFnClassId
- MappingCallbacksClassId
- MappingClassId
- MappingPropertiesClassId
- MappingPropertyClassId
- MappingTransformationClassId
- MetadataClassId
- MetadataObjectMapClassId
- NestedMappingPairClassId
- TransformationType
Classes
Interfaces
- ConditionPredicate
- Converter
- CreateMapperOptions
- DeferFunction
- ErrorHandler
- MapOptions
- Mapper
- MappingStrategy
- MappingStrategyInitializerOptions
- NamingConvention
- Resolver
- TransformerMetadataFactory
Type aliases
AnyConstructor
Ƭ AnyConstructor: (...args
: any
[]) => any
Type declaration
• (...args
)
Parameters
Name | Type |
---|---|
...args | any [] |
Defined in
ApplyMetadata
Ƭ ApplyMetadata: (strategy
: MappingStrategy
<MetadataIdentifier
>) => ApplyMetadataFn
Type declaration
▸ (strategy
): ApplyMetadataFn
Parameters
Name | Type |
---|---|
strategy | MappingStrategy <MetadataIdentifier > |
Returns
Defined in
ApplyMetadataFn
Ƭ ApplyMetadataFn: <TModel>(model
: MetadataIdentifier
<TModel
>, as
: MetadataObjectMapClassId
) => TModel
Type declaration
▸ <TModel
>(model
, as
): TModel
Type parameters
Name | Type |
---|---|
TModel | extends Dictionary <TModel > |
Parameters
Name | Type |
---|---|
model | MetadataIdentifier <TModel > |
as | MetadataObjectMapClassId |
Returns
TModel
Defined in
ArrayKeyedMap
Ƭ ArrayKeyedMap: PathMap
| DataMap
Defined in
ConditionReturn
Ƭ ConditionReturn<TSource
, TDestination
, TSelectorReturn
>: [Condition
, (source
: TSource
, sourceMemberPath
: string
[]) => TSelectorReturn
]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
Constructor
Ƭ Constructor<T
>: (...args
: any
[]) => T
& TransformerMetadataFactory
<T
>
Type parameters
Name | Type |
---|---|
T | any |
Defined in
ConvertUsingReturn
Ƭ ConvertUsingReturn<TSource
, TDestination
, TSelectorReturn
>: [ConvertUsing
, Selector
<TSource
, TSelectorReturn
>]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
DataMap
Ƭ DataMap: Map
<symbol
, number
>
Defined in
DestinationConstructor
Ƭ DestinationConstructor<TSource
, TDestination
>: (sourceObject
: TSource
, destinationIdentifier
: MetadataIdentifier
<TDestination
>) => TDestination
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > = any |
TDestination | extends Dictionary <TDestination > = any |
Type declaration
▸ (sourceObject
, destinationIdentifier
): TDestination
Parameters
Name | Type |
---|---|
sourceObject | TSource |
destinationIdentifier | MetadataIdentifier <TDestination > |
Returns
TDestination
Defined in
Dictionary
Ƭ Dictionary<T
>: { [key in keyof T]?: unknown }
Type parameters
Name |
---|
T |
Defined in
FromValueReturn
Ƭ FromValueReturn<TSource
, TDestination
, TSelectorReturn
>: [FromValue
, () => TSelectorReturn
]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
IgnoreReturn
Ƭ IgnoreReturn<TSource
, TDestination
>: [Ignore
]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
Defined in
MapCallback
Ƭ MapCallback<TSource
, TDestination
, TExtraArgs
>: (source
: TSource
, destination
: TDestination
, extraArguments?
: TExtraArgs
) => void
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TExtraArgs | extends Record <string , any > = Record <string , any > |
Type declaration
▸ (source
, destination
, extraArguments?
): void
Parameters
Name | Type |
---|---|
source | TSource |
destination | TDestination |
extraArguments? | TExtraArgs |
Returns
void
Defined in
MapDeferReturn
Ƭ MapDeferReturn<TSource
, TDestination
, TSelectorReturn
>: [MapDefer
, DeferFunction
<TSource
, TDestination
, TSelectorReturn
>]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
MapFromReturn
Ƭ MapFromReturn<TSource
, TDestination
, TSelectorReturn
>: [MapFrom
, Selector
<TSource
, TSelectorReturn
>]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
MapInitializeReturn
Ƭ MapInitializeReturn<TSource
, TDestination
, TSelectorReturn
>: [MapInitialize
, Selector
<TSource
, TSelectorReturn
>, boolean?]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
MapWithArgumentsReturn
Ƭ MapWithArgumentsReturn<TSource
, TDestination
, TSelectorReturn
>: [MapWithArguments
, (source
: TSource
, extraArguments
: Record
<string
, any
>) => TSelectorReturn
]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
MapWithReturn
Ƭ MapWithReturn<TSource
, TDestination
, TSelectorReturn
>: [MapWith
, (sourceObj
: TSource
, mapper
: Mapper
) => TSelectorReturn
| undefined
| null
]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > = any |
TDestination | extends Dictionary <TDestination > = any |
Defined in
MappingConfiguration
Ƭ MappingConfiguration<TSource
, TDestination
>: (mapping
: Mapping
<TSource
, TDestination
>) => void
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > = any |
TDestination | extends Dictionary <TDestination > = any |
Type declaration
▸ (mapping
): void
Parameters
Name | Type |
---|---|
mapping | Mapping <TSource , TDestination > |
Returns
void
Defined in
MappingProfile
Ƭ MappingProfile: (mapper
: Mapper
) => void
Type declaration
▸ (mapper
): void
Parameters
Name | Type |
---|---|
mapper | Mapper |
Returns
void
Defined in
MappingProperty
Ƭ MappingProperty<TSource
, TDestination
, TSelectorReturn
>: [target: string[], transformation: MappingTransformation<TSource, TDestination, TSelectorReturn>]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
MappingStrategyInitializer
Ƭ MappingStrategyInitializer<TIdentifier
>: (mapper
: Mapper
) => MappingStrategy
<TIdentifier
>
Type parameters
Name | Type |
---|---|
TIdentifier | extends MetadataIdentifier |
Type declaration
▸ (mapper
): MappingStrategy
<TIdentifier
>
Parameters
Name | Type |
---|---|
mapper | Mapper |
Returns
MappingStrategy
<TIdentifier
>
Defined in
MappingTransformation
Ƭ MappingTransformation<TSource
, TDestination
, TSelectorReturn
>: [memberMapFn: MemberMapReturn<TSource, TDestination, TSelectorReturn>, preCond?: PreConditionReturn<TSource, TDestination, TSelectorReturn>]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > = any |
TDestination | extends Dictionary <TDestination > = any |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
MemberMapReturn
Ƭ MemberMapReturn<TSource
, TDestination
, TSelectorReturn
>: MemberMapReturnNoDefer
<TSource
, TDestination
, TSelectorReturn
> | MapDeferReturn
<TSource
, TDestination
, TSelectorReturn
>
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
Metadata
Ƭ Metadata: [propertyKeys: string[], metaFn: Function, isArray: boolean, isGetterOnly?: boolean]
Defined in
MetadataIdentifier
Ƭ MetadataIdentifier<T
>: Exclude
<ModelIdentifier
<T
>, string
>
Type parameters
Name | Type |
---|---|
T | any |
Defined in
MetadataList
Ƭ MetadataList: [property: string, metadata: Object][]
Defined in
ModelIdentifier
Ƭ ModelIdentifier<T
>: string
| symbol
| Constructor
<T
>
Type parameters
Name | Type |
---|---|
T | any |
Defined in
NamingConventionInput
Ƭ NamingConventionInput: NamingConvention
| { destination
: NamingConvention
; source
: NamingConvention
}
Defined in
NestedMappingPair
Ƭ NestedMappingPair: [MetadataIdentifier
| Primitive
| Date
, MetadataIdentifier
| Primitive
| Date
]
Defined in
NullSubstitutionReturn
Ƭ NullSubstitutionReturn<TSource
, TDestination
, TSelectorReturn
>: [NullSubstitution
, (source
: TSource
, sourceMemberPath
: string
[]) => TSelectorReturn
]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
PathMap
Ƭ PathMap: Map
<string
, PathMap
| DataMap
>
Defined in
PreConditionReturn
Ƭ PreConditionReturn<TSource
, TDestination
, TSelectorReturn
>: [preConditionPredicate: ConditionPredicate<TSource>, defaultValue?: TSelectorReturn]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
Primitive
Ƭ Primitive: String
| Number
| Boolean
Defined in
PrimitiveConstructor
Ƭ PrimitiveConstructor: StringConstructor
| NumberConstructor
| BooleanConstructor
Defined in
PrimitiveConstructorExtended
Ƭ PrimitiveConstructorExtended: PrimitiveConstructor
| DateConstructor
| AnyConstructor
Defined in
PrimitiveConstructorReturnType
Ƭ PrimitiveConstructorReturnType<TType
>: TType
extends DateConstructor
| Exclude
<TType
, PrimitiveConstructor
> ? InstanceType
<TType
> : ReturnType
<Extract
<TType
, PrimitiveConstructor
>>
Type parameters
Name | Type |
---|---|
TType | extends PrimitiveConstructorExtended |
Defined in
PrimitiveExtended
Ƭ PrimitiveExtended: Primitive
| Date
Defined in
Selector
Ƭ Selector<TObject
, TReturnType
>: (obj
: TObject
) => TReturnType
Type parameters
Name | Type |
---|---|
TObject | extends Dictionary <TObject > = any |
TReturnType | unknown |
Type declaration
▸ (obj
): TReturnType
Parameters
Name | Type |
---|---|
obj | TObject |
Returns
TReturnType
Defined in
SelectorReturn
Ƭ SelectorReturn<TObject
>: ReturnType
<Selector
<TObject
>>
Type parameters
Name | Type |
---|---|
TObject | extends Dictionary <TObject > |
Defined in
UndefinedSubstitutionReturn
Ƭ UndefinedSubstitutionReturn<TSource
, TDestination
, TSelectorReturn
>: [UndefinedSubstitution
, (source
: TSource
, sourceMemberPath
: string
[]) => TSelectorReturn
]
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | SelectorReturn <TDestination > |
Defined in
ValueSelector
Ƭ ValueSelector<TSource
, TDestination
, TValueReturn
>: (source
: TSource
) => TValueReturn
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > = any |
TDestination | extends Dictionary <TDestination > = any |
TValueReturn | SelectorReturn <TDestination > |
Type declaration
▸ (source
): TValueReturn
Parameters
Name | Type |
---|---|
source | TSource |
Returns
TValueReturn
Defined in
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
Name | Type |
---|---|
mapper | Mapper |
profile | MappingProfile |
...mappingConfigurations | MappingConfiguration <any , any >[] |
Returns
void
Defined in
afterMap
▸ afterMap<TSource
, TDestination
>(cb
): MappingConfiguration
<TSource
, TDestination
>
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
Parameters
Name | Type |
---|---|
cb | MapCallback <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
Parameters
Name | Type |
---|---|
cb | MapCallback <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
predicate | ConditionPredicate <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
Parameters
Name | Type |
---|---|
destinationConstructor | DestinationConstructor <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
TConvertSourceReturn | unknown |
Parameters
Name | Type |
---|---|
converter | Converter <TConvertSourceReturn , TSelectorReturn > |
selector | Selector <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
Parameters
Name | Type |
---|---|
mapper | Mapper |
source | ModelIdentifier <TSource > |
...mappingConfigFns | (undefined | MappingConfiguration <TSource , TSource >)[] |
Returns
Mapping
<TSource
, TSource
>
Defined in
▸ createMap<TSource
, TDestination
>(mapper
, source
, destination
, ...mappingConfigFns
): Mapping
<TSource
, TDestination
>
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
Parameters
Name | Type |
---|---|
mapper | Mapper |
source | ModelIdentifier <TSource > |
destination | ModelIdentifier <TDestination > |
...mappingConfigFns | (undefined | MappingConfiguration <TSource , TDestination >)[] |
Returns
Mapping
<TSource
, TDestination
>
Defined in
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
Name | Type |
---|---|
options | CreateMapperOptions |
Returns
Defined in
extend
▸ extend<TSource
, TDestination
, TExtendSource
, TExtendDestination
>(mapping
): MappingConfiguration
<TSource
, TDestination
>
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TExtendSource | extends Dictionary <TExtendSource > |
TExtendDestination | extends Dictionary <TExtendDestination > |
Parameters
Name | Type |
---|---|
mapping | Mapping <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TExtendSource | extends Dictionary <TExtendSource > |
TExtendDestination | extends Dictionary <TExtendDestination > |
Parameters
Name | Type |
---|---|
source | ModelIdentifier <TExtendSource > |
destination | ModelIdentifier <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TMemberType | unknown |
Parameters
Name | Type |
---|---|
selector | Selector <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelfSource | extends Dictionary <TSelfSource > |
Parameters
Name | Type |
---|---|
sourceOrMapping | ModelIdentifier <TSelfSource > | Mapping <TSelfSource , TDestination > |
selector | Selector <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
rawValue | TSelectorReturn |
Returns
FromValueReturn
<TSource
, TDestination
, TSelectorReturn
>
Defined in
lib/member-map-functions/from-value.ts:4
getRecursiveValue
▸ getRecursiveValue(recursiveMap
, parent
, member
): number
| undefined
Parameters
Name | Type |
---|---|
recursiveMap | Map <MetadataIdentifier <any >, ArrayKeyedMap > |
parent | MetadataIdentifier <any > |
member | string [] |
Returns
number
| undefined
Defined in
ignore
▸ ignore<TSource
, TDestination
>(): IgnoreReturn
<TSource
, TDestination
>
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends 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
Name | Type |
---|---|
value | unknown |
Returns
boolean
Defined in
lib/utils/is-date-constructor.ts:6
isEmpty
▸ isEmpty(value
): boolean
Parameters
Name | Type |
---|---|
value | unknown |
Returns
boolean
Defined in
isPrimitiveConstructor
▸ isPrimitiveConstructor(value
): boolean
Check if value is a String/Number/Boolean/Array constructor
Parameters
Name | Type |
---|---|
value | unknown |
Returns
boolean
Defined in
lib/utils/is-primitive-constructor.ts:6
mapDefer
▸ mapDefer<TSource
, TDestination
, TSelectorReturn
>(defer
): MapDeferReturn
<TSource
, TDestination
, TSelectorReturn
>
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > = any |
TDestination | extends Dictionary <TDestination > = any |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
defer | DeferFunction <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
from | ValueSelector <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
TWithDestination | extends ModelIdentifier <any > = ModelIdentifier <any > |
TWithSource | extends ModelIdentifier <any > = ModelIdentifier <any > |
TWithSourceValue | extends ValueSelector <any , any , unknown > = TWithSource extends Constructor <InferredWithSource > ? ValueSelector <TSource , InferredWithSource , unknown > : ValueSelector <TSource , any , unknown > |
Parameters
Name | Type |
---|---|
withDestination | TWithDestination |
withSource | TWithSource |
withSourceValue | TWithSourceValue |
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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
Parameters
Name | Type |
---|---|
namingConventionsInput | NamingConventionInput |
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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
substitution | TSelectorReturn |
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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
predicate | ConditionPredicate <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
Name | Type |
---|---|
T | extends Record <string , unknown > |
Parameters
Name | Type |
---|---|
object | T |
path | string [] |
value | unknown |
Returns
T
& { [p: string]
: unknown
; } | T
Defined in
setMutate
▸ setMutate<T
>(object
, path
, value
): void
Type parameters
Name | Type |
---|---|
T | extends Record <string , unknown > |
Parameters
Name | Type |
---|---|
object | T |
path | string [] |
value | unknown |
Returns
void
Defined in
setRecursiveValue
▸ setRecursiveValue(recursiveMap
, parent
, member
, value
): void
Parameters
Name | Type |
---|---|
recursiveMap | Map <MetadataIdentifier <any >, ArrayKeyedMap > |
parent | MetadataIdentifier <any > |
member | string [] |
value | number |
Returns
void
Defined in
typeConverter
▸ typeConverter<TSource
, TDestination
, TSourceConstructor
, TDestinationConstructor
>(source
, destination
, converterOrValueSelector
): MappingConfiguration
<TSource
, TDestination
>
Type parameters
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSourceConstructor | extends PrimitiveConstructorExtended | [PrimitiveConstructorExtended ] |
TDestinationConstructor | extends PrimitiveConstructorExtended | [PrimitiveConstructorExtended ] |
Parameters
Name | Type |
---|---|
source | TSourceConstructor |
destination | TDestinationConstructor |
converterOrValueSelector | ConverterOrValueSelector <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
Name | Type |
---|---|
TSource | extends Dictionary <TSource > |
TDestination | extends Dictionary <TDestination > |
TSelectorReturn | unknown |
Parameters
Name | Type |
---|---|
substitution | TSelectorReturn |
Returns
UndefinedSubstitutionReturn
<TSource
, TDestination
, TSelectorReturn
>