# AutoMapper TypeScript > Convention-based object mapping for TypeScript, with strategies for classes, POJOs, ORMs, and NestJS. # AutoMapper TypeScript Source: https://automapperts.netlify.app/ AutoMapper TypeScript is an object-to-object mapper. It handles matching properties, nested models, and flattening so your mapping code stays focused on real transformations. Choose a mapping strategy, install the packages, and create your first mapper. Build a class-based mapping from source model to DTO. Customize members, callbacks, constructors, conventions, and converters. Read generated signatures for every public package export. :::info AutoMapper 9 requires Node.js 20 or later and ships as ESM. If you are upgrading, start with [Migrating to AutoMapper 9](/getting-started/migrate-v9). ::: ## Packages | Package | Purpose | | --- | --- | | `@automapper/core` | Mapper, mapping configuration, conventions, and member functions | | `@automapper/classes` | Decorator metadata for classes | | `@automapper/pojos` | Explicit metadata for interfaces and plain objects | | `@automapper/mikro` | Classes strategy adapted for MikroORM 6 | | `@automapper/sequelize` | Classes strategy adapted for Sequelize 6 | | `@automapper/nestjs` | NestJS 10 and 11 integration | --- # API Source: https://automapperts.netlify.app/api The API reference is generated from the current TypeScript source before each documentation build. Mapper creation, mapping configuration, member functions, conventions, and errors. Decorator metadata and the classes mapping strategy. Metadata helpers and the POJO mapping strategy. The MikroORM-aware classes strategy. The Sequelize-aware classes strategy. Module setup, dependency injection, profiles, interceptors, and pipes. :::note The examples and guides explain how these APIs fit together. Use this section when you need exact signatures and exported types. ::: --- # @automapper/classes Source: https://automapperts.netlify.app/api/classes **@automapper/classes** *** ## Interfaces - [AutoMapOptions](interfaces/AutoMapOptions) ## Variables - [AUTOMAP\_PROPERTIES\_METADATA\_KEY](variables/AUTOMAP_PROPERTIES_METADATA_KEY) - [AUTOMAP\_STANDALONE\_METADATA\_KEY](variables/AUTOMAP_STANDALONE_METADATA_KEY) - [AUTOMAPPER\_METADATA\_FACTORY\_KEY](variables/AUTOMAPPER_METADATA_FACTORY_KEY) ## Functions - [AutoMap](functions/AutoMap) - [classes](functions/classes) - [getMetadataList](functions/getMetadataList) --- # Function: AutoMap() Source: https://automapperts.netlify.app/api/classes/functions/AutoMap [**@automapper/classes**](../index) *** ## Call Signature > **AutoMap**(): `PropertyDecorator` Defined in: [automap.ts:21](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/automap.ts#L21) ### Returns `PropertyDecorator` ## Call Signature > **AutoMap**(`typeFn`): `PropertyDecorator` Defined in: [automap.ts:22](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/automap.ts#L22) ### Parameters #### typeFn () => `ClassIdentifier` \| \[`ClassIdentifier`\] ### Returns `PropertyDecorator` ## Call Signature > **AutoMap**(`options`): `PropertyDecorator` Defined in: [automap.ts:25](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/automap.ts#L25) ### Parameters #### options [`AutoMapOptions`](../interfaces/AutoMapOptions) ### Returns `PropertyDecorator` --- # Function: classes() Source: https://automapperts.netlify.app/api/classes/functions/classes [**@automapper/classes**](../index) *** > **classes**(`options?`): `MappingStrategyInitializer`\<`MetadataIdentifier`\> Defined in: [classes.ts:14](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/classes.ts#L14) ## Parameters ### options? `MappingStrategyInitializerOptions` = `{}` ## Returns `MappingStrategyInitializer`\<`MetadataIdentifier`\> --- # Function: getMetadataList() Source: https://automapperts.netlify.app/api/classes/functions/getMetadataList [**@automapper/classes**](../index) *** > **getMetadataList**(`model`): \[\[`string`, \{ `depth`: `number`; `isArray`: `boolean`; `isGetterOnly?`: `boolean`; `type`: () => `MetadataIdentifier`; \}\][], `MetadataIdentifier`[]\] Defined in: [get-metadata-list.ts:20](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/get-metadata-list.ts#L20) ## Parameters ### model `MetadataIdentifier` ## Returns \[\[`string`, \{ `depth`: `number`; `isArray`: `boolean`; `isGetterOnly?`: `boolean`; `type`: () => `MetadataIdentifier`; \}\][], `MetadataIdentifier`[]\] --- # Interface: AutoMapOptions Source: https://automapperts.netlify.app/api/classes/interfaces/AutoMapOptions [**@automapper/classes**](../index) *** Defined in: [automap.ts:6](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/automap.ts#L6) ## Properties ### depth? > `optional` **depth?**: `number` Defined in: [automap.ts:14](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/automap.ts#L14) Depth for nested models. Default to 1 *** ### isGetterOnly? > `optional` **isGetterOnly?**: `boolean` Defined in: [automap.ts:18](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/automap.ts#L18) Is this property getter-only? *** ### type? > `optional` **type?**: () => `ClassIdentifier` \| \[`ClassIdentifier`\] Defined in: [automap.ts:10](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/automap.ts#L10) Type Function #### Returns `ClassIdentifier` \| \[`ClassIdentifier`\] --- # Variable: AUTOMAP\_PROPERTIES\_METADATA\_KEY Source: https://automapperts.netlify.app/api/classes/variables/AUTOMAP_PROPERTIES_METADATA_KEY [**@automapper/classes**](../index) *** > `const` **AUTOMAP\_PROPERTIES\_METADATA\_KEY**: `"automap:properties"` = `'automap:properties'` Defined in: [keys.ts:3](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/keys.ts#L3) --- # Variable: AUTOMAP\_STANDALONE\_METADATA\_KEY Source: https://automapperts.netlify.app/api/classes/variables/AUTOMAP_STANDALONE_METADATA_KEY [**@automapper/classes**](../index) *** > `const` **AUTOMAP\_STANDALONE\_METADATA\_KEY**: `"automap:standalone"` = `'automap:standalone'` Defined in: [keys.ts:4](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/keys.ts#L4) --- # Variable: AUTOMAPPER\_METADATA\_FACTORY\_KEY Source: https://automapperts.netlify.app/api/classes/variables/AUTOMAPPER_METADATA_FACTORY_KEY [**@automapper/classes**](../index) *** > `const` **AUTOMAPPER\_METADATA\_FACTORY\_KEY**: `"__AUTOMAPPER_METADATA_FACTORY__"` = `'__AUTOMAPPER_METADATA_FACTORY__'` Defined in: [keys.ts:1](https://github.com/nartc/mapper/blob/main/packages/classes/src/lib/keys.ts#L1) --- # @automapper/core Source: https://automapperts.netlify.app/api/core **@automapper/core** *** ## Enumerations - [MapFnClassId](enumerations/MapFnClassId) - [MappingCallbacksClassId](enumerations/MappingCallbacksClassId) - [MappingClassId](enumerations/MappingClassId) - [MappingPropertiesClassId](enumerations/MappingPropertiesClassId) - [MappingPropertyClassId](enumerations/MappingPropertyClassId) - [MappingTransformationClassId](enumerations/MappingTransformationClassId) - [MetadataClassId](enumerations/MetadataClassId) - [MetadataObjectMapClassId](enumerations/MetadataObjectMapClassId) - [NestedMappingPairClassId](enumerations/NestedMappingPairClassId) - [TransformationType](enumerations/TransformationType) ## Classes - [AutoMapperError](classes/AutoMapperError) - [AutoMapperLogger](classes/AutoMapperLogger) - [CamelCaseNamingConvention](classes/CamelCaseNamingConvention) - [MapMemberError](classes/MapMemberError) - [MappingNotFoundError](classes/MappingNotFoundError) - [PascalCaseNamingConvention](classes/PascalCaseNamingConvention) - [SnakeCaseNamingConvention](classes/SnakeCaseNamingConvention) ## Interfaces - [AutoMapperLoggerLike](interfaces/AutoMapperLoggerLike) - [CompiledMapping](interfaces/CompiledMapping) - [CompiledMappingDescriptors](interfaces/CompiledMappingDescriptors) - [CompiledMappingProperty](interfaces/CompiledMappingProperty) - [ConditionPredicate](interfaces/ConditionPredicate) - [Converter](interfaces/Converter) - [CreateMapperOptions](interfaces/CreateMapperOptions) - [DeferFunction](interfaces/DeferFunction) - [ErrorHandler](interfaces/ErrorHandler) - [MapOptions](interfaces/MapOptions) - [Mapper](interfaces/Mapper) - [MappingStrategy](interfaces/MappingStrategy) - [MappingStrategyInitializerOptions](interfaces/MappingStrategyInitializerOptions) - [NamingConvention](interfaces/NamingConvention) - [Resolver](interfaces/Resolver) - [TransformerMetadataFactory](interfaces/TransformerMetadataFactory) ## Type Aliases - [AbstractConstructor](type-aliases/AbstractConstructor) - [AnyConstructor](type-aliases/AnyConstructor) - [ApplyMetadata](type-aliases/ApplyMetadata) - [ApplyMetadataFn](type-aliases/ApplyMetadataFn) - [ArrayKeyedMap](type-aliases/ArrayKeyedMap) - [AutoMapperLogFn](type-aliases/AutoMapperLogFn) - [ClassIdentifier](type-aliases/ClassIdentifier) - [CompiledMapStep](type-aliases/CompiledMapStep) - [ConditionReturn](type-aliases/ConditionReturn) - [Constructor](type-aliases/Constructor) - [ConvertUsingReturn](type-aliases/ConvertUsingReturn) - [DataMap](type-aliases/DataMap) - [DestinationConstructor](type-aliases/DestinationConstructor) - [Dictionary](type-aliases/Dictionary) - [FromValueReturn](type-aliases/FromValueReturn) - [IgnoreReturn](type-aliases/IgnoreReturn) - [MapCallback](type-aliases/MapCallback) - [MapDeferReturn](type-aliases/MapDeferReturn) - [MapFromReturn](type-aliases/MapFromReturn) - [MapInitializeReturn](type-aliases/MapInitializeReturn) - [Mapping](type-aliases/Mapping) - [MappingConfiguration](type-aliases/MappingConfiguration) - [MappingProfile](type-aliases/MappingProfile) - [MappingProperty](type-aliases/MappingProperty) - [MappingStrategyInitializer](type-aliases/MappingStrategyInitializer) - [MappingTransformation](type-aliases/MappingTransformation) - [MapWithArgumentsReturn](type-aliases/MapWithArgumentsReturn) - [MapWithReturn](type-aliases/MapWithReturn) - [MaybePromise](type-aliases/MaybePromise) - [MemberMapReturn](type-aliases/MemberMapReturn) - [MemberMapReturnNoDefer](type-aliases/MemberMapReturnNoDefer) - [Metadata](type-aliases/Metadata) - [MetadataIdentifier](type-aliases/MetadataIdentifier) - [MetadataList](type-aliases/MetadataList) - [ModelIdentifier](type-aliases/ModelIdentifier) - [NamingConventionInput](type-aliases/NamingConventionInput) - [NestedMappingPair](type-aliases/NestedMappingPair) - [NullSubstitutionReturn](type-aliases/NullSubstitutionReturn) - [PathMap](type-aliases/PathMap) - [PreConditionReturn](type-aliases/PreConditionReturn) - [Primitive](type-aliases/Primitive) - [PrimitiveConstructor](type-aliases/PrimitiveConstructor) - [PrimitiveConstructorExtended](type-aliases/PrimitiveConstructorExtended) - [PrimitiveConstructorReturnType](type-aliases/PrimitiveConstructorReturnType) - [PrimitiveExtended](type-aliases/PrimitiveExtended) - [Selector](type-aliases/Selector) - [SelectorReturn](type-aliases/SelectorReturn) - [UndefinedSubstitutionReturn](type-aliases/UndefinedSubstitutionReturn) - [ValueSelector](type-aliases/ValueSelector) ## Variables - [defaultStrategyInitializerOptions](variables/defaultStrategyInitializerOptions) ## Functions - [addProfile](functions/addProfile) - [afterMap](functions/afterMap) - [afterMapArray](functions/afterMapArray) - [autoMap](functions/autoMap) - [beforeMap](functions/beforeMap) - [beforeMapArray](functions/beforeMapArray) - [condition](functions/condition) - [constructUsing](functions/constructUsing) - [convertUsing](functions/convertUsing) - [createMap](functions/createMap) - [createMapper](functions/createMapper) - [extend](functions/extend) - [forMember](functions/forMember) - [forSelf](functions/forSelf) - [fromValue](functions/fromValue) - [getRecursiveValue](functions/getRecursiveValue) - [ignore](functions/ignore) - [isDateConstructor](functions/isDateConstructor) - [isEmpty](functions/isEmpty) - [isMappableIdentifier](functions/isMappableIdentifier) - [isPrimitiveConstructor](functions/isPrimitiveConstructor) - [mapDefer](functions/mapDefer) - [mapFrom](functions/mapFrom) - [mapWith](functions/mapWith) - [mapWithArguments](functions/mapWithArguments) - [namingConventions](functions/namingConventions) - [nullSubstitution](functions/nullSubstitution) - [preCondition](functions/preCondition) - [set](functions/set) - [setMutate](functions/setMutate) - [setRecursiveValue](functions/setRecursiveValue) - [typeConverter](functions/typeConverter) - [undefinedSubstitution](functions/undefinedSubstitution) --- # Class: AutoMapperError Source: https://automapperts.netlify.app/api/core/classes/AutoMapperError [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/errors.ts:5](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L5) Base class for all errors thrown by AutoMapper. Lets consumers catch mapper errors selectively: `catch (e) { if (e instanceof AutoMapperError) ... }`. ## Extends - `Error` ## Extended by - [`MappingNotFoundError`](MappingNotFoundError) - [`MapMemberError`](MapMemberError) ## Constructors ### Constructor > **new AutoMapperError**(`message`): `AutoMapperError` Defined in: [packages/core/src/lib/errors.ts:6](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L6) #### Parameters ##### message `string` #### Returns `AutoMapperError` #### Overrides `Error.constructor` ## Properties ### cause? > `optional` **cause?**: `unknown` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from `Error.cause` *** ### message > **message**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from `Error.message` *** ### name > **name**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from `Error.name` *** ### stack? > `optional` **stack?**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from `Error.stack` *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from `Error.stackTraceLimit` ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from `Error.captureStackTrace` *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:56 #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from `Error.prepareStackTrace` --- # Class: AutoMapperLogger Source: https://automapperts.netlify.app/api/core/classes/AutoMapperLogger [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/utils/logger.ts:33](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L33) ## Constructors ### Constructor > **new AutoMapperLogger**(): `AutoMapperLogger` #### Returns `AutoMapperLogger` ## Accessors ### trace #### Get Signature > **get** `static` **trace**(): [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) \| `undefined` Defined in: [packages/core/src/lib/utils/logger.ts:139](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L139) ##### Returns [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) \| `undefined` ## Methods ### configure() > `static` **configure**(`customLogger?`): () => `void` Defined in: [packages/core/src/lib/utils/logger.ts:98](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L98) #### Parameters ##### customLogger? [`AutoMapperLoggerLike`](../interfaces/AutoMapperLoggerLike) = `{}` #### Returns () => `void` *** ### debug() > `static` **debug**(`message`, ...`optionalParams`): `void` Defined in: [packages/core/src/lib/utils/logger.ts:127](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L127) #### Parameters ##### message `unknown` ##### optionalParams ...`unknown`[] #### Returns `void` *** ### error() > `static` **error**(`message`, ...`optionalParams`): `void` Defined in: [packages/core/src/lib/utils/logger.ts:119](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L119) #### Parameters ##### message `unknown` ##### optionalParams ...`unknown`[] #### Returns `void` *** ### fatal() > `static` **fatal**(`message`, ...`optionalParams`): `void` Defined in: [packages/core/src/lib/utils/logger.ts:135](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L135) #### Parameters ##### message `unknown` ##### optionalParams ...`unknown`[] #### Returns `void` *** ### info() > `static` **info**(`message`, ...`optionalParams`): `void` Defined in: [packages/core/src/lib/utils/logger.ts:123](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L123) #### Parameters ##### message `unknown` ##### optionalParams ...`unknown`[] #### Returns `void` *** ### log() > `static` **log**(`message`, ...`optionalParams`): `void` Defined in: [packages/core/src/lib/utils/logger.ts:111](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L111) #### Parameters ##### message `unknown` ##### optionalParams ...`unknown`[] #### Returns `void` *** ### reset() > `static` **reset**(): `void` Defined in: [packages/core/src/lib/utils/logger.ts:107](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L107) #### Returns `void` *** ### verbose() > `static` **verbose**(`message`, ...`optionalParams`): `void` Defined in: [packages/core/src/lib/utils/logger.ts:131](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L131) #### Parameters ##### message `unknown` ##### optionalParams ...`unknown`[] #### Returns `void` *** ### warn() > `static` **warn**(`message`, ...`optionalParams`): `void` Defined in: [packages/core/src/lib/utils/logger.ts:115](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L115) #### Parameters ##### message `unknown` ##### optionalParams ...`unknown`[] #### Returns `void` --- # Class: CamelCaseNamingConvention Source: https://automapperts.netlify.app/api/core/classes/CamelCaseNamingConvention [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts:8](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts#L8) CamelCaseNamingConvention ## Example ```ts thisIsCamelCase ``` ## Implements - [`NamingConvention`](../interfaces/NamingConvention) ## Constructors ### Constructor > **new CamelCaseNamingConvention**(): `CamelCaseNamingConvention` #### Returns `CamelCaseNamingConvention` ## Properties ### separatorCharacter > **separatorCharacter**: `string` = `''` Defined in: [packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts:9](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts#L9) #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`separatorCharacter`](../interfaces/NamingConvention#separatorcharacter) *** ### splittingExpression > **splittingExpression**: `RegExp` Defined in: [packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts#L10) #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`splittingExpression`](../interfaces/NamingConvention#splittingexpression) ## Methods ### transformPropertyName() > **transformPropertyName**(`sourceNameParts`): `string` Defined in: [packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts:12](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/camel-case-naming-convention.ts#L12) #### Parameters ##### sourceNameParts `string`[] #### Returns `string` #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`transformPropertyName`](../interfaces/NamingConvention#transformpropertyname) --- # Class: MapMemberError Source: https://automapperts.netlify.app/api/core/classes/MapMemberError [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/errors.ts:27](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L27) Thrown when mapping a single member fails; wraps the original error. ## Extends - [`AutoMapperError`](AutoMapperError) ## Constructors ### Constructor > **new MapMemberError**(`memberPath`, `destinationName`, `originalError`): `MapMemberError` Defined in: [packages/core/src/lib/errors.ts:28](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L28) #### Parameters ##### memberPath `string` ##### destinationName `string` ##### originalError `unknown` #### Returns `MapMemberError` #### Overrides [`AutoMapperError`](AutoMapperError).[`constructor`](AutoMapperError#constructor) ## Properties ### cause? > `optional` **cause?**: `unknown` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from [`AutoMapperError`](AutoMapperError).[`cause`](AutoMapperError#cause) *** ### destinationName > `readonly` **destinationName**: `string` Defined in: [packages/core/src/lib/errors.ts:30](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L30) *** ### memberPath > `readonly` **memberPath**: `string` Defined in: [packages/core/src/lib/errors.ts:29](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L29) *** ### message > **message**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from [`AutoMapperError`](AutoMapperError).[`message`](AutoMapperError#message) *** ### name > **name**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from [`AutoMapperError`](AutoMapperError).[`name`](AutoMapperError#name) *** ### originalError > `readonly` **originalError**: `unknown` Defined in: [packages/core/src/lib/errors.ts:31](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L31) *** ### stack? > `optional` **stack?**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [`AutoMapperError`](AutoMapperError).[`stack`](AutoMapperError#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [`AutoMapperError`](AutoMapperError).[`stackTraceLimit`](AutoMapperError#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from [`AutoMapperError`](AutoMapperError).[`captureStackTrace`](AutoMapperError#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:56 #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`AutoMapperError`](AutoMapperError).[`prepareStackTrace`](AutoMapperError#preparestacktrace) --- # Class: MappingNotFoundError Source: https://automapperts.netlify.app/api/core/classes/MappingNotFoundError [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/errors.ts:16](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L16) Thrown when `map()` cannot find a mapping for the given identifiers. ## Extends - [`AutoMapperError`](AutoMapperError) ## Constructors ### Constructor > **new MappingNotFoundError**(`sourceName`, `destinationName`): `MappingNotFoundError` Defined in: [packages/core/src/lib/errors.ts:17](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L17) #### Parameters ##### sourceName `string` ##### destinationName `string` #### Returns `MappingNotFoundError` #### Overrides [`AutoMapperError`](AutoMapperError).[`constructor`](AutoMapperError#constructor) ## Properties ### cause? > `optional` **cause?**: `unknown` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 #### Inherited from [`AutoMapperError`](AutoMapperError).[`cause`](AutoMapperError#cause) *** ### destinationName > `readonly` **destinationName**: `string` Defined in: [packages/core/src/lib/errors.ts:19](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L19) *** ### message > **message**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 #### Inherited from [`AutoMapperError`](AutoMapperError).[`message`](AutoMapperError#message) *** ### name > **name**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074 #### Inherited from [`AutoMapperError`](AutoMapperError).[`name`](AutoMapperError#name) *** ### sourceName > `readonly` **sourceName**: `string` Defined in: [packages/core/src/lib/errors.ts:18](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/errors.ts#L18) *** ### stack? > `optional` **stack?**: `string` Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 #### Inherited from [`AutoMapperError`](AutoMapperError).[`stack`](AutoMapperError#stack) *** ### stackTraceLimit > `static` **stackTraceLimit**: `number` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:68 The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. #### Inherited from [`AutoMapperError`](AutoMapperError).[`stackTraceLimit`](AutoMapperError#stacktracelimit) ## Methods ### captureStackTrace() > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:52 Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` #### Parameters ##### targetObject `object` ##### constructorOpt? `Function` #### Returns `void` #### Inherited from [`AutoMapperError`](AutoMapperError).[`captureStackTrace`](AutoMapperError#capturestacktrace) *** ### prepareStackTrace() > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` Defined in: node\_modules/.pnpm/@types+node@22.20.0/node\_modules/@types/node/globals.d.ts:56 #### Parameters ##### err `Error` ##### stackTraces `CallSite`[] #### Returns `any` #### See https://v8.dev/docs/stack-trace-api#customizing-stack-traces #### Inherited from [`AutoMapperError`](AutoMapperError).[`prepareStackTrace`](AutoMapperError#preparestacktrace) --- # Class: PascalCaseNamingConvention Source: https://automapperts.netlify.app/api/core/classes/PascalCaseNamingConvention [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts:8](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts#L8) PascalCaseNamingConvention ## Example ```ts ThisIsPascalCase ``` ## Implements - [`NamingConvention`](../interfaces/NamingConvention) ## Constructors ### Constructor > **new PascalCaseNamingConvention**(): `PascalCaseNamingConvention` #### Returns `PascalCaseNamingConvention` ## Properties ### separatorCharacter > **separatorCharacter**: `string` = `''` Defined in: [packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts:9](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts#L9) #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`separatorCharacter`](../interfaces/NamingConvention#separatorcharacter) *** ### splittingExpression > **splittingExpression**: `RegExp` Defined in: [packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts#L10) #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`splittingExpression`](../interfaces/NamingConvention#splittingexpression) ## Methods ### transformPropertyName() > **transformPropertyName**(`sourceNameParts`): `string` Defined in: [packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts:12](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/pascal-case-naming-convention.ts#L12) #### Parameters ##### sourceNameParts `string`[] #### Returns `string` #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`transformPropertyName`](../interfaces/NamingConvention#transformpropertyname) --- # Class: SnakeCaseNamingConvention Source: https://automapperts.netlify.app/api/core/classes/SnakeCaseNamingConvention [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts:8](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts#L8) SnakeCaseNamingConvention ## Example ```ts this_is_snake_case ``` ## Implements - [`NamingConvention`](../interfaces/NamingConvention) ## Constructors ### Constructor > **new SnakeCaseNamingConvention**(): `SnakeCaseNamingConvention` #### Returns `SnakeCaseNamingConvention` ## Properties ### separatorCharacter > **separatorCharacter**: `string` = `'_'` Defined in: [packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts:9](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts#L9) #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`separatorCharacter`](../interfaces/NamingConvention#separatorcharacter) *** ### splittingExpression > **splittingExpression**: `RegExp` Defined in: [packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts#L10) #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`splittingExpression`](../interfaces/NamingConvention#splittingexpression) ## Methods ### transformPropertyName() > **transformPropertyName**(`sourcePropNameParts`): `string` Defined in: [packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts:12](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/naming-conventions/snake-case-naming-convention.ts#L12) #### Parameters ##### sourcePropNameParts `string`[] #### Returns `string` #### Implementation of [`NamingConvention`](../interfaces/NamingConvention).[`transformPropertyName`](../interfaces/NamingConvention#transformpropertyname) --- # Enumeration: MapFnClassId Source: https://automapperts.netlify.app/api/core/enumerations/MapFnClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:336](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L336) ## Enumeration Members ### fn > **fn**: `1` Defined in: [packages/core/src/lib/types.ts:338](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L338) *** ### isConverted > **isConverted**: `2` Defined in: [packages/core/src/lib/types.ts:339](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L339) *** ### type > **type**: `0` Defined in: [packages/core/src/lib/types.ts:337](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L337) --- # Enumeration: MappingCallbacksClassId Source: https://automapperts.netlify.app/api/core/enumerations/MappingCallbacksClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:525](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L525) ## Enumeration Members ### afterMap > **afterMap**: `1` Defined in: [packages/core/src/lib/types.ts:527](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L527) *** ### afterMapArray > **afterMapArray**: `3` Defined in: [packages/core/src/lib/types.ts:529](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L529) *** ### beforeMap > **beforeMap**: `0` Defined in: [packages/core/src/lib/types.ts:526](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L526) *** ### beforeMapArray > **beforeMapArray**: `2` Defined in: [packages/core/src/lib/types.ts:528](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L528) --- # Enumeration: MappingClassId Source: https://automapperts.netlify.app/api/core/enumerations/MappingClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:588](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L588) ## Enumeration Members ### callbacks > **callbacks**: `7` Defined in: [packages/core/src/lib/types.ts:596](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L596) *** ### compiledPlan > **compiledPlan**: `9` Defined in: [packages/core/src/lib/types.ts:598](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L598) *** ### customProperties > **customProperties**: `3` Defined in: [packages/core/src/lib/types.ts:592](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L592) *** ### destinationConstructor > **destinationConstructor**: `5` Defined in: [packages/core/src/lib/types.ts:594](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L594) *** ### identifierMetadata > **identifierMetadata**: `1` Defined in: [packages/core/src/lib/types.ts:590](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L590) *** ### identifiers > **identifiers**: `0` Defined in: [packages/core/src/lib/types.ts:589](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L589) *** ### mapper > **mapper**: `4` Defined in: [packages/core/src/lib/types.ts:593](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L593) *** ### namingConventions > **namingConventions**: `8` Defined in: [packages/core/src/lib/types.ts:597](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L597) *** ### properties > **properties**: `2` Defined in: [packages/core/src/lib/types.ts:591](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L591) *** ### typeConverters > **typeConverters**: `6` Defined in: [packages/core/src/lib/types.ts:595](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L595) --- # Enumeration: MappingPropertiesClassId Source: https://automapperts.netlify.app/api/core/enumerations/MappingPropertiesClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:519](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L519) ## Enumeration Members ### mappingProperty > **mappingProperty**: `1` Defined in: [packages/core/src/lib/types.ts:521](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L521) *** ### nestedMappingPair > **nestedMappingPair**: `2` Defined in: [packages/core/src/lib/types.ts:522](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L522) *** ### path > **path**: `0` Defined in: [packages/core/src/lib/types.ts:520](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L520) --- # Enumeration: MappingPropertyClassId Source: https://automapperts.netlify.app/api/core/enumerations/MappingPropertyClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:503](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L503) ## Enumeration Members ### target > **target**: `0` Defined in: [packages/core/src/lib/types.ts:504](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L504) *** ### transformation > **transformation**: `1` Defined in: [packages/core/src/lib/types.ts:505](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L505) --- # Enumeration: MappingTransformationClassId Source: https://automapperts.netlify.app/api/core/enumerations/MappingTransformationClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:489](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L489) ## Enumeration Members ### memberMapFn > **memberMapFn**: `0` Defined in: [packages/core/src/lib/types.ts:490](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L490) *** ### preCond > **preCond**: `1` Defined in: [packages/core/src/lib/types.ts:491](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L491) --- # Enumeration: MetadataClassId Source: https://automapperts.netlify.app/api/core/enumerations/MetadataClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:151](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L151) ## Enumeration Members ### isArray > **isArray**: `2` Defined in: [packages/core/src/lib/types.ts:154](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L154) *** ### isGetterOnly > **isGetterOnly**: `3` Defined in: [packages/core/src/lib/types.ts:155](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L155) *** ### metaFn > **metaFn**: `1` Defined in: [packages/core/src/lib/types.ts:153](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L153) *** ### propertyKeys > **propertyKeys**: `0` Defined in: [packages/core/src/lib/types.ts:152](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L152) --- # Enumeration: MetadataObjectMapClassId Source: https://automapperts.netlify.app/api/core/enumerations/MetadataObjectMapClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:146](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L146) ## Enumeration Members ### asDestination > **asDestination**: `1` Defined in: [packages/core/src/lib/types.ts:148](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L148) *** ### asSource > **asSource**: `0` Defined in: [packages/core/src/lib/types.ts:147](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L147) --- # Enumeration: NestedMappingPairClassId Source: https://automapperts.netlify.app/api/core/enumerations/NestedMappingPairClassId [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:532](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L532) ## Enumeration Members ### destination > **destination**: `0` Defined in: [packages/core/src/lib/types.ts:533](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L533) *** ### source > **source**: `1` Defined in: [packages/core/src/lib/types.ts:534](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L534) --- # Enumeration: TransformationType Source: https://automapperts.netlify.app/api/core/enumerations/TransformationType [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:322](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L322) ## Enumeration Members ### Condition > **Condition**: `2` Defined in: [packages/core/src/lib/types.ts:325](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L325) *** ### ConvertUsing > **ConvertUsing**: `5` Defined in: [packages/core/src/lib/types.ts:328](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L328) *** ### FromValue > **FromValue**: `3` Defined in: [packages/core/src/lib/types.ts:326](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L326) *** ### Ignore > **Ignore**: `0` Defined in: [packages/core/src/lib/types.ts:323](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L323) *** ### MapDefer > **MapDefer**: `10` Defined in: [packages/core/src/lib/types.ts:333](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L333) *** ### MapFrom > **MapFrom**: `1` Defined in: [packages/core/src/lib/types.ts:324](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L324) *** ### MapInitialize > **MapInitialize**: `6` Defined in: [packages/core/src/lib/types.ts:329](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L329) *** ### MapWith > **MapWith**: `4` Defined in: [packages/core/src/lib/types.ts:327](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L327) *** ### MapWithArguments > **MapWithArguments**: `9` Defined in: [packages/core/src/lib/types.ts:332](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L332) *** ### NullSubstitution > **NullSubstitution**: `7` Defined in: [packages/core/src/lib/types.ts:330](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L330) *** ### UndefinedSubstitution > **UndefinedSubstitution**: `8` Defined in: [packages/core/src/lib/types.ts:331](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L331) --- # Function: addProfile() Source: https://automapperts.netlify.app/api/core/functions/addProfile [**@automapper/core**](../index) *** > **addProfile**(`mapper`, `profile`, ...`mappingConfigurations`): `void` Defined in: [packages/core/src/lib/mappings/add-profile.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mappings/add-profile.ts#L4) ## Parameters ### mapper [`Mapper`](../interfaces/Mapper) ### profile [`MappingProfile`](../type-aliases/MappingProfile) ### mappingConfigurations ...[`MappingConfiguration`](../type-aliases/MappingConfiguration)[] ## Returns `void` --- # Function: afterMap() Source: https://automapperts.netlify.app/api/core/functions/afterMap [**@automapper/core**](../index) *** > **afterMap**\<`TSource`, `TDestination`\>(`cb`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/after-map.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/after-map.ts#L4) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ## Parameters ### cb [`MapCallback`](../type-aliases/MapCallback)\<`TSource`, `TDestination`\> ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: afterMapArray() Source: https://automapperts.netlify.app/api/core/functions/afterMapArray [**@automapper/core**](../index) *** > **afterMapArray**\<`TSource`, `TDestination`\>(`cb`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/after-map-array.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/after-map-array.ts#L4) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ## Parameters ### cb [`MapCallback`](../type-aliases/MapCallback)\<`TSource`[], `TDestination`[]\> ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: autoMap() Source: https://automapperts.netlify.app/api/core/functions/autoMap [**@automapper/core**](../index) *** > **autoMap**\<`TSource`, `TDestination`, `TKey`, `TValue`\>(`prop`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/auto-map.ts:6](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/auto-map.ts#L6) ## Type Parameters ### TSource `TSource` *extends* \{ \[key in string \| number \| symbol\]: TValue \} ### TDestination `TDestination` *extends* \{ \[key in string \| number \| symbol\]: TValue \} ### TKey `TKey` *extends* `string` \| `number` \| `symbol` ### TValue `TValue` ## Parameters ### prop `TKey` ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: beforeMap() Source: https://automapperts.netlify.app/api/core/functions/beforeMap [**@automapper/core**](../index) *** > **beforeMap**\<`TSource`, `TDestination`\>(`cb`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/before-map.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/before-map.ts#L4) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ## Parameters ### cb [`MapCallback`](../type-aliases/MapCallback)\<`TSource`, `TDestination`\> ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: beforeMapArray() Source: https://automapperts.netlify.app/api/core/functions/beforeMapArray [**@automapper/core**](../index) *** > **beforeMapArray**\<`TSource`, `TDestination`\>(`cb`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/before-map-array.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/before-map-array.ts#L4) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ## Parameters ### cb [`MapCallback`](../type-aliases/MapCallback)\<`TSource`[], `TDestination`[]\> ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: condition() Source: https://automapperts.netlify.app/api/core/functions/condition [**@automapper/core**](../index) *** > **condition**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`predicate`, `defaultValue?`): [`ConditionReturn`](../type-aliases/ConditionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/condition.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/condition.ts#L10) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### predicate [`ConditionPredicate`](../interfaces/ConditionPredicate)\<`TSource`\> ### defaultValue? `TSelectorReturn` ## Returns [`ConditionReturn`](../type-aliases/ConditionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: constructUsing() Source: https://automapperts.netlify.app/api/core/functions/constructUsing [**@automapper/core**](../index) *** > **constructUsing**\<`TSource`, `TDestination`\>(`destinationConstructor`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/construct-using.ts:9](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/construct-using.ts#L9) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ## Parameters ### destinationConstructor [`DestinationConstructor`](../type-aliases/DestinationConstructor)\<`TSource`, `TDestination`\> ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: convertUsing() Source: https://automapperts.netlify.app/api/core/functions/convertUsing [**@automapper/core**](../index) *** > **convertUsing**\<`TSource`, `TDestination`, `TSelectorReturn`, `TConvertSourceReturn`\>(`converter`, `selector`): [`ConvertUsingReturn`](../type-aliases/ConvertUsingReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/convert-using.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/convert-using.ts#L10) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ### TConvertSourceReturn `TConvertSourceReturn` = `unknown` ## Parameters ### converter [`Converter`](../interfaces/Converter)\<`TConvertSourceReturn`, `TSelectorReturn`\> ### selector [`Selector`](../type-aliases/Selector)\<`TSource`, `TConvertSourceReturn`\> ## Returns [`ConvertUsingReturn`](../type-aliases/ConvertUsingReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: createMap() Source: https://automapperts.netlify.app/api/core/functions/createMap [**@automapper/core**](../index) *** ## Call Signature > **createMap**\<`TSource`\>(`mapper`, `source`, ...`mappingConfigFns`): [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TSource`\> Defined in: [packages/core/src/lib/mappings/create-map.ts:20](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mappings/create-map.ts#L20) ### Type Parameters #### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### Parameters #### mapper [`Mapper`](../interfaces/Mapper) #### source [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> #### mappingConfigFns ...([`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TSource`\> \| `undefined`)[] ### Returns [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TSource`\> ## Call Signature > **createMap**\<`TSource`, `TDestination`\>(`mapper`, `source`, `destination`, ...`mappingConfigFns`): [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mappings/create-map.ts:25](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mappings/create-map.ts#L25) ### Type Parameters #### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> #### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### Parameters #### mapper [`Mapper`](../interfaces/Mapper) #### source [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> #### destination [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> #### mappingConfigFns ...([`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> \| `undefined`)[] ### Returns [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TDestination`\> --- # Function: createMapper() Source: https://automapperts.netlify.app/api/core/functions/createMapper [**@automapper/core**](../index) *** > **createMapper**(`options`): [`Mapper`](../interfaces/Mapper) Defined in: [packages/core/src/lib/core.ts:61](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/core.ts#L61) Creates and returns a Mapper {}. The following methods are available to use with a Mapper: ``` - Mapper#map(Array)(Async), Mapper#mutate(Array)(Async) - createMap() - addProfile() - getMapping() - getMappings() ``` ## Parameters ### options [`CreateMapperOptions`](../interfaces/CreateMapperOptions) ## Returns [`Mapper`](../interfaces/Mapper) --- # Function: extend() Source: https://automapperts.netlify.app/api/core/functions/extend [**@automapper/core**](../index) *** ## Call Signature > **extend**\<`TSource`, `TDestination`, `TExtendSource`, `TExtendDestination`\>(`mapping`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/extend.ts:12](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/extend.ts#L12) ### Type Parameters #### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> #### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> #### TExtendSource `TExtendSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TExtendSource`\> #### TExtendDestination `TExtendDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TExtendDestination`\> ### Parameters #### mapping [`Mapping`](../type-aliases/Mapping)\<`TExtendSource`, `TExtendDestination`\> ### Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> ## Call Signature > **extend**\<`TSource`, `TDestination`, `TExtendSource`, `TExtendDestination`\>(`source`, `destination`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/extend.ts:20](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/extend.ts#L20) ### Type Parameters #### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> #### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> #### TExtendSource `TExtendSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TExtendSource`\> #### TExtendDestination `TExtendDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TExtendDestination`\> ### Parameters #### source [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TExtendSource`\> #### destination [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TExtendDestination`\> ### Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: forMember() Source: https://automapperts.netlify.app/api/core/functions/forMember [**@automapper/core**](../index) *** > **forMember**\<`TSource`, `TDestination`, `TMemberType`\>(`selector`, ...`fns`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/for-member.ts:14](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/for-member.ts#L14) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TMemberType `TMemberType` = `unknown` ## Parameters ### selector [`Selector`](../type-aliases/Selector)\<`TDestination`, `TMemberType`\> ### fns ...\[[`PreConditionReturn`](../type-aliases/PreConditionReturn)\<`TSource`, `TDestination`, `TMemberType`\> \| [`MemberMapReturn`](../type-aliases/MemberMapReturn)\<`TSource`, `TDestination`, `TMemberType`\>, [`MemberMapReturn`](../type-aliases/MemberMapReturn)\<`TSource`, `TDestination`, `TMemberType`\>\] ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: forSelf() Source: https://automapperts.netlify.app/api/core/functions/forSelf [**@automapper/core**](../index) *** > **forSelf**\<`TSource`, `TDestination`, `TSelfSource`\>(`sourceOrMapping`, `selector`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/for-self.ts:23](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/for-self.ts#L23) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelfSource `TSelfSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSelfSource`\> ## Parameters ### sourceOrMapping [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSelfSource`\> \| [`Mapping`](../type-aliases/Mapping)\<`TSelfSource`, `TDestination`\> ### selector [`Selector`](../type-aliases/Selector)\<`TSource`, `TSelfSource`\> ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: fromValue() Source: https://automapperts.netlify.app/api/core/functions/fromValue [**@automapper/core**](../index) *** > **fromValue**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`rawValue`): [`FromValueReturn`](../type-aliases/FromValueReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/from-value.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/from-value.ts#L4) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### rawValue `TSelectorReturn` ## Returns [`FromValueReturn`](../type-aliases/FromValueReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: getRecursiveValue() Source: https://automapperts.netlify.app/api/core/functions/getRecursiveValue [**@automapper/core**](../index) *** > **getRecursiveValue**(`recursiveMap`, `parent`, `member`): `number` \| `undefined` Defined in: [packages/core/src/lib/utils/recursion.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/recursion.ts#L10) ## Parameters ### recursiveMap `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier), [`ArrayKeyedMap`](../type-aliases/ArrayKeyedMap)\> ### parent [`MetadataIdentifier`](../type-aliases/MetadataIdentifier) ### member `string`[] ## Returns `number` \| `undefined` --- # Function: ignore() Source: https://automapperts.netlify.app/api/core/functions/ignore [**@automapper/core**](../index) *** > **ignore**\<`TSource`, `TDestination`\>(): [`IgnoreReturn`](../type-aliases/IgnoreReturn)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/member-map-functions/ignore.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/ignore.ts#L4) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ## Returns [`IgnoreReturn`](../type-aliases/IgnoreReturn)\<`TSource`, `TDestination`\> --- # Function: isDateConstructor() Source: https://automapperts.netlify.app/api/core/functions/isDateConstructor [**@automapper/core**](../index) *** > **isDateConstructor**(`value`): `boolean` Defined in: [packages/core/src/lib/utils/is-date-constructor.ts:6](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/is-date-constructor.ts#L6) Check if value is a Date constructor ## Parameters ### value `unknown` ## Returns `boolean` --- # Function: isEmpty() Source: https://automapperts.netlify.app/api/core/functions/isEmpty [**@automapper/core**](../index) *** > **isEmpty**(`value`): `boolean` Defined in: [packages/core/src/lib/utils/is-empty.ts:1](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/is-empty.ts#L1) ## Parameters ### value `unknown` ## Returns `boolean` --- # Function: isMappableIdentifier() Source: https://automapperts.netlify.app/api/core/functions/isMappableIdentifier [**@automapper/core**](../index) *** > **isMappableIdentifier**(`identifier`): `boolean` Defined in: [packages/core/src/lib/utils/is-mappable-identifier.ts:12](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/is-mappable-identifier.ts#L12) True when the identifier is a "real" model identifier (not a primitive or Date constructor) — i.e. a candidate for nested (member) mapping. ## Parameters ### identifier `unknown` ## Returns `boolean` --- # Function: isPrimitiveConstructor() Source: https://automapperts.netlify.app/api/core/functions/isPrimitiveConstructor [**@automapper/core**](../index) *** > **isPrimitiveConstructor**(`value`): `boolean` Defined in: [packages/core/src/lib/utils/is-primitive-constructor.ts:6](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/is-primitive-constructor.ts#L6) Check if value is a String/Number/Boolean/Array constructor ## Parameters ### value `unknown` ## Returns `boolean` --- # Function: mapDefer() Source: https://automapperts.netlify.app/api/core/functions/mapDefer [**@automapper/core**](../index) *** > **mapDefer**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`defer`): [`MapDeferReturn`](../type-aliases/MapDeferReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/map-defer.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/map-defer.ts#L4) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> = `any` ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### defer [`DeferFunction`](../interfaces/DeferFunction)\<`TSource`, `TDestination`, `TSelectorReturn`\> ## Returns [`MapDeferReturn`](../type-aliases/MapDeferReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: mapFrom() Source: https://automapperts.netlify.app/api/core/functions/mapFrom [**@automapper/core**](../index) *** > **mapFrom**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`from`): [`MapFromReturn`](../type-aliases/MapFromReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/map-from.ts:11](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/map-from.ts#L11) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### from [`Resolver`](../interfaces/Resolver)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| ((`source`) => [`MaybePromise`](../type-aliases/MaybePromise)\<`TSelectorReturn`\>) ## Returns [`MapFromReturn`](../type-aliases/MapFromReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: mapWith() Source: https://automapperts.netlify.app/api/core/functions/mapWith [**@automapper/core**](../index) *** > **mapWith**\<`TSource`, `TDestination`, `TSelectorReturn`, `TWithDestination`, `TWithSource`, `TWithSourceValue`\>(`withDestination`, `withSource`, `withSourceValue`): [`MapWithReturn`](../type-aliases/MapWithReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/map-with.ts:12](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/map-with.ts#L12) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ### TWithDestination `TWithDestination` *extends* [`ModelIdentifier`](../type-aliases/ModelIdentifier) = [`ModelIdentifier`](../type-aliases/ModelIdentifier) ### TWithSource `TWithSource` *extends* [`ModelIdentifier`](../type-aliases/ModelIdentifier) = [`ModelIdentifier`](../type-aliases/ModelIdentifier) ### TWithSourceValue `TWithSourceValue` *extends* [`ValueSelector`](../type-aliases/ValueSelector) = `TWithSource` *extends* `Constructor`\<`InferredWithSource`\> ? [`ValueSelector`](../type-aliases/ValueSelector)\<`TSource`, `InferredWithSource`\> : [`ValueSelector`](../type-aliases/ValueSelector)\<`TSource`\> ## Parameters ### withDestination `TWithDestination` ### withSource `TWithSource` ### withSourceValue `TWithSourceValue` ## Returns [`MapWithReturn`](../type-aliases/MapWithReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: mapWithArguments() Source: https://automapperts.netlify.app/api/core/functions/mapWithArguments [**@automapper/core**](../index) *** > **mapWithArguments**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`withArgumentsResolver`): [`MapWithArgumentsReturn`](../type-aliases/MapWithArgumentsReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/map-with-arguments.ts:11](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/map-with-arguments.ts#L11) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### withArgumentsResolver [`Resolver`](../interfaces/Resolver)\<`TSource`, `Record`\<`string`, `unknown`\>, `TSelectorReturn`\> \| ((`source`, `extraArguments`) => [`MaybePromise`](../type-aliases/MaybePromise)\<`TSelectorReturn`\>) ## Returns [`MapWithArgumentsReturn`](../type-aliases/MapWithArgumentsReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: namingConventions() Source: https://automapperts.netlify.app/api/core/functions/namingConventions [**@automapper/core**](../index) *** > **namingConventions**\<`TSource`, `TDestination`\>(`namingConventionsInput`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/naming-conventions.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/naming-conventions.ts#L10) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ## Parameters ### namingConventionsInput [`NamingConventionInput`](../type-aliases/NamingConventionInput) ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: nullSubstitution() Source: https://automapperts.netlify.app/api/core/functions/nullSubstitution [**@automapper/core**](../index) *** > **nullSubstitution**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`substitution`): [`NullSubstitutionReturn`](../type-aliases/NullSubstitutionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/null-substitution.ts:9](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/null-substitution.ts#L9) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### substitution `TSelectorReturn` ## Returns [`NullSubstitutionReturn`](../type-aliases/NullSubstitutionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: preCondition() Source: https://automapperts.netlify.app/api/core/functions/preCondition [**@automapper/core**](../index) *** > **preCondition**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`predicate`, `defaultValue?`): [`PreConditionReturn`](../type-aliases/PreConditionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/pre-condition.ts:8](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/pre-condition.ts#L8) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### predicate [`ConditionPredicate`](../interfaces/ConditionPredicate)\<`TSource`\> ### defaultValue? `TSelectorReturn` ## Returns [`PreConditionReturn`](../type-aliases/PreConditionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Function: set() Source: https://automapperts.netlify.app/api/core/functions/set [**@automapper/core**](../index) *** > **set**\<`T`\>(`object`, `path`, `value`, `index?`): `T` \| `T` & `object` Defined in: [packages/core/src/lib/utils/set.ts:1](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/set.ts#L1) ## Type Parameters ### T `T` *extends* `Record`\<`string`, `unknown`\> ## Parameters ### object `T` ### path `string`[] ### value `unknown` ### index? `number` = `0` ## Returns `T` \| `T` & `object` --- # Function: setMutate() Source: https://automapperts.netlify.app/api/core/functions/setMutate [**@automapper/core**](../index) *** > **setMutate**\<`T`\>(`object`, `path`, `value`): `void` Defined in: [packages/core/src/lib/utils/set.ts:32](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/set.ts#L32) ## Type Parameters ### T `T` *extends* `Record`\<`string`, `unknown`\> ## Parameters ### object `T` ### path `string`[] ### value `unknown` ## Returns `void` --- # Function: setRecursiveValue() Source: https://automapperts.netlify.app/api/core/functions/setRecursiveValue [**@automapper/core**](../index) *** > **setRecursiveValue**(`recursiveMap`, `parent`, `member`, `value`): `void` Defined in: [packages/core/src/lib/utils/recursion.ts:19](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/recursion.ts#L19) ## Parameters ### recursiveMap `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier), [`ArrayKeyedMap`](../type-aliases/ArrayKeyedMap)\> ### parent [`MetadataIdentifier`](../type-aliases/MetadataIdentifier) ### member `string`[] ### value `number` ## Returns `void` --- # Function: typeConverter() Source: https://automapperts.netlify.app/api/core/functions/typeConverter [**@automapper/core**](../index) *** > **typeConverter**\<`TSource`, `TDestination`, `TSourceConstructor`, `TDestinationConstructor`\>(`source`, `destination`, `converterOrValueSelector`): [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/mapping-configurations/type-converters.ts:41](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/mapping-configurations/type-converters.ts#L41) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSourceConstructor `TSourceConstructor` *extends* [`PrimitiveConstructorExtended`](../type-aliases/PrimitiveConstructorExtended) \| \[[`PrimitiveConstructorExtended`](../type-aliases/PrimitiveConstructorExtended)\] ### TDestinationConstructor `TDestinationConstructor` *extends* [`PrimitiveConstructorExtended`](../type-aliases/PrimitiveConstructorExtended) \| \[[`PrimitiveConstructorExtended`](../type-aliases/PrimitiveConstructorExtended)\] ## Parameters ### source `TSourceConstructor` ### destination `TDestinationConstructor` ### converterOrValueSelector `ConverterOrValueSelector`\<`TSourceConstructor`, `TDestinationConstructor`\> ## Returns [`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`TSource`, `TDestination`\> --- # Function: undefinedSubstitution() Source: https://automapperts.netlify.app/api/core/functions/undefinedSubstitution [**@automapper/core**](../index) *** > **undefinedSubstitution**\<`TSource`, `TDestination`, `TSelectorReturn`\>(`substitution`): [`UndefinedSubstitutionReturn`](../type-aliases/UndefinedSubstitutionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/member-map-functions/undefined-substitution.ts:9](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/member-map-functions/undefined-substitution.ts#L9) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = `unknown` ## Parameters ### substitution `TSelectorReturn` ## Returns [`UndefinedSubstitutionReturn`](../type-aliases/UndefinedSubstitutionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Interface: AutoMapperLoggerLike Source: https://automapperts.netlify.app/api/core/interfaces/AutoMapperLoggerLike [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/utils/logger.ts:6](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L6) ## Properties ### debug? > `optional` **debug?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:11](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L11) *** ### error? > `optional` **error?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:10](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L10) *** ### fatal? > `optional` **fatal?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:13](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L13) *** ### info? > `optional` **info?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:8](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L8) *** ### log? > `optional` **log?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:7](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L7) *** ### trace? > `optional` **trace?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:14](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L14) *** ### verbose? > `optional` **verbose?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:12](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L12) *** ### warn? > `optional` **warn?**: [`AutoMapperLogFn`](../type-aliases/AutoMapperLogFn) Defined in: [packages/core/src/lib/utils/logger.ts:9](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L9) --- # Interface: CompiledMapping\ Source: https://automapperts.netlify.app/api/core/interfaces/CompiledMapping [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:567](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L567) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> = `any` ## Properties ### steps > **steps**: [`CompiledMapStep`](../type-aliases/CompiledMapStep)[] Defined in: [packages/core/src/lib/types.ts:571](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L571) *** ### unmappedCandidateKeys > **unmappedCandidateKeys**: `string`[] Defined in: [packages/core/src/lib/types.ts:574](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L574) --- # Interface: CompiledMappingDescriptors\ Source: https://automapperts.netlify.app/api/core/interfaces/CompiledMappingDescriptors [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:580](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L580) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> = `any` ## Properties ### configuredKeys > **configuredKeys**: `string`[] Defined in: [packages/core/src/lib/types.ts:585](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L585) *** ### props > **props**: [`CompiledMappingProperty`](CompiledMappingProperty)\<`TSource`, `TDestination`\>[] Defined in: [packages/core/src/lib/types.ts:584](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L584) --- # Interface: CompiledMappingProperty\ Source: https://automapperts.netlify.app/api/core/interfaces/CompiledMappingProperty [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:549](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L549) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> = `any` ## Properties ### destinationMemberIdentifier? > `optional` **destinationMemberIdentifier?**: [`Primitive`](../type-aliases/Primitive) \| `Date` \| [`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\> Defined in: [packages/core/src/lib/types.ts:558](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L558) *** ### destinationMemberPath > **destinationMemberPath**: `string`[] Defined in: [packages/core/src/lib/types.ts:553](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L553) *** ### sourceMemberIdentifier? > `optional` **sourceMemberIdentifier?**: [`Primitive`](../type-aliases/Primitive) \| `Date` \| [`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\> Defined in: [packages/core/src/lib/types.ts:559](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L559) *** ### transformationMapFn > **transformationMapFn**: [`MemberMapReturn`](../type-aliases/MemberMapReturn)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/types.ts:554](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L554) *** ### transformationPreConditionDefaultValue? > `optional` **transformationPreConditionDefaultValue?**: `unknown` Defined in: [packages/core/src/lib/types.ts:557](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L557) *** ### transformationPreConditionPredicate? > `optional` **transformationPreConditionPredicate?**: (`source`) => `boolean` Defined in: [packages/core/src/lib/types.ts:556](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L556) #### Parameters ##### source `TSource` #### Returns `boolean` *** ### transformationType > **transformationType**: [`TransformationType`](../enumerations/TransformationType) Defined in: [packages/core/src/lib/types.ts:555](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L555) --- # Interface: ConditionPredicate()\ Source: https://automapperts.netlify.app/api/core/interfaces/ConditionPredicate [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:416](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L416) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> > **ConditionPredicate**(`source`): `boolean` Defined in: [packages/core/src/lib/types.ts:417](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L417) ## Parameters ### source `TSource` ## Returns `boolean` --- # Interface: Converter\ Source: https://automapperts.netlify.app/api/core/interfaces/Converter [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:111](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L111) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> = `any` ### TConvertDestination `TConvertDestination` = `any` ## Methods ### convert() > **convert**(`source`): `TConvertDestination` Defined in: [packages/core/src/lib/types.ts:115](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L115) #### Parameters ##### source `TSource` #### Returns `TConvertDestination` --- # Interface: CreateMapperOptions Source: https://automapperts.netlify.app/api/core/interfaces/CreateMapperOptions [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/core.ts:44](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/core.ts#L44) ## Properties ### errorHandler? > `optional` **errorHandler?**: [`ErrorHandler`](ErrorHandler) Defined in: [packages/core/src/lib/core.ts:46](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/core.ts#L46) *** ### namingConventions? > `optional` **namingConventions?**: [`NamingConventionInput`](../type-aliases/NamingConventionInput) Defined in: [packages/core/src/lib/core.ts:47](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/core.ts#L47) *** ### strategyInitializer > **strategyInitializer**: [`MappingStrategyInitializer`](../type-aliases/MappingStrategyInitializer)\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\> Defined in: [packages/core/src/lib/core.ts:45](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/core.ts#L45) --- # Interface: DeferFunction()\ Source: https://automapperts.netlify.app/api/core/interfaces/DeferFunction [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:375](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L375) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](../type-aliases/SelectorReturn)\<`TDestination`\> > **DeferFunction**(`source`): [`MemberMapReturnNoDefer`](../type-aliases/MemberMapReturnNoDefer)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/types.ts:380](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L380) ## Parameters ### source `TSource` ## Returns [`MemberMapReturnNoDefer`](../type-aliases/MemberMapReturnNoDefer)\<`TSource`, `TDestination`, `TSelectorReturn`\> --- # Interface: ErrorHandler Source: https://automapperts.netlify.app/api/core/interfaces/ErrorHandler [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:58](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L58) ## Methods ### handle() > **handle**(`error`): `void` Defined in: [packages/core/src/lib/types.ts:59](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L59) #### Parameters ##### error `unknown` #### Returns `void` --- # Interface: MapOptions\ Source: https://automapperts.netlify.app/api/core/interfaces/MapOptions [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:128](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L128) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ### TExtraArgs `TExtraArgs` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\> ## Properties ### afterMap? > `optional` **afterMap?**: [`MapCallback`](../type-aliases/MapCallback)\<`TSource`, `TDestination`, `TExtraArgs`\> Defined in: [packages/core/src/lib/types.ts:134](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L134) *** ### beforeMap? > `optional` **beforeMap?**: [`MapCallback`](../type-aliases/MapCallback)\<`TSource`, `TDestination`, `TExtraArgs`\> Defined in: [packages/core/src/lib/types.ts:133](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L133) *** ### destinationConstructor? > `optional` **destinationConstructor?**: [`DestinationConstructor`](../type-aliases/DestinationConstructor)\<`TSource`, `TDestination`\> Defined in: [packages/core/src/lib/types.ts:135](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L135) *** ### extraArgs? > `optional` **extraArgs?**: (`mapping`, `destinationObject`) => `TExtraArgs` Defined in: [packages/core/src/lib/types.ts:136](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L136) #### Parameters ##### mapping [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TDestination`\> ##### destinationObject `TDestination` #### Returns `TExtraArgs` --- # Interface: Mapper Source: https://automapperts.netlify.app/api/core/interfaces/Mapper [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:165](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L165) ## Properties ### \[ERROR\_HANDLER\] > **\[ERROR\_HANDLER\]**: [`ErrorHandler`](ErrorHandler) Defined in: [packages/core/src/lib/types.ts:305](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L305) *** ### \[MAPPINGS\] > **\[MAPPINGS\]**: `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\>, `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\>, [`Mapping`](../type-aliases/Mapping)\<`any`, `any`\>\>\> Defined in: [packages/core/src/lib/types.ts:306](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L306) *** ### \[METADATA\_MAP\] > **\[METADATA\_MAP\]**: `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\>, [`Metadata`](../type-aliases/Metadata)[]\> Defined in: [packages/core/src/lib/types.ts:309](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L309) *** ### \[METADATA\_OBJECT\_MAP\] > **\[METADATA\_OBJECT\_MAP\]**: `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\>, \[`Record`\<`string`, `unknown`\>, `Record`\<`string`, `unknown`\>\]\> Defined in: [packages/core/src/lib/types.ts:310](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L310) *** ### \[NAMING\_CONVENTIONS\] > **\[NAMING\_CONVENTIONS\]**: [`NamingConventionInput`](../type-aliases/NamingConventionInput) Defined in: [packages/core/src/lib/types.ts:308](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L308) *** ### \[PROFILE\_CONFIGURATION\_CONTEXT\] > **\[PROFILE\_CONFIGURATION\_CONTEXT\]**: `Set`\<[`MappingConfiguration`](../type-aliases/MappingConfiguration)\<`any`, `any`\>\> Defined in: [packages/core/src/lib/types.ts:319](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L319) *** ### \[RECURSIVE\_COUNT\] > **\[RECURSIVE\_COUNT\]**: `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\>, [`ArrayKeyedMap`](../type-aliases/ArrayKeyedMap)\> Defined in: [packages/core/src/lib/types.ts:318](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L318) *** ### \[RECURSIVE\_DEPTH\] > **\[RECURSIVE\_DEPTH\]**: `Map`\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\>, [`ArrayKeyedMap`](../type-aliases/ArrayKeyedMap)\> Defined in: [packages/core/src/lib/types.ts:317](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L317) *** ### \[STRATEGY\] > **\[STRATEGY\]**: [`MappingStrategy`](MappingStrategy)\<[`MetadataIdentifier`](../type-aliases/MetadataIdentifier)\<`any`\>\> Defined in: [packages/core/src/lib/types.ts:307](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L307) ## Methods ### dispose() > **dispose**(): `void` Defined in: [packages/core/src/lib/types.ts:303](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L303) #### Returns `void` *** ### map() #### Call Signature > **map**\<`TSource`, `TDestination`\>(`sourceObject`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `TDestination` Defined in: [packages/core/src/lib/types.ts:166](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L166) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceObject `TSource` ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TDestination`, `Record`\<`string`, `unknown`\>\> ##### Returns `TDestination` #### Call Signature > **map**\<`TSource`\>(`sourceObject`, `identifier`, `options?`): `TSource` Defined in: [packages/core/src/lib/types.ts:175](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L175) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceObject `TSource` ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TSource`, `Record`\<`string`, `unknown`\>\> ##### Returns `TSource` *** ### mapArray() #### Call Signature > **mapArray**\<`TSource`, `TDestination`\>(`sourceArray`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `TDestination`[] Defined in: [packages/core/src/lib/types.ts:205](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L205) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceArray `TSource`[] ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TDestination`[], `Record`\<`string`, `unknown`\>\> ##### Returns `TDestination`[] #### Call Signature > **mapArray**\<`TSource`\>(`sourceArray`, `identifier`, `options?`): `TSource`[] Defined in: [packages/core/src/lib/types.ts:214](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L214) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceArray `TSource`[] ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TSource`[], `Record`\<`string`, `unknown`\>\> ##### Returns `TSource`[] *** ### mapArrayAsync() #### Call Signature > **mapArrayAsync**\<`TSource`, `TDestination`\>(`sourceArray`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `Promise`\<`TDestination`[]\> Defined in: [packages/core/src/lib/types.ts:220](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L220) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceArray `TSource`[] ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TDestination`[], `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`TDestination`[]\> #### Call Signature > **mapArrayAsync**\<`TSource`\>(`sourceArray`, `identifier`, `options?`): `Promise`\<`TSource`[]\> Defined in: [packages/core/src/lib/types.ts:229](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L229) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceArray `TSource`[] ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TSource`[], `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`TSource`[]\> *** ### mapAsync() #### Call Signature > **mapAsync**\<`TSource`, `TDestination`\>(`sourceObject`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `Promise`\<`TDestination`\> Defined in: [packages/core/src/lib/types.ts:190](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L190) Maps `sourceObject` and resolves with the result. ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceObject `TSource` ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TDestination`, `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`TDestination`\> ##### Remarks Member mapping itself is synchronous, but any `beforeMap`/`afterMap` callbacks that return a promise are collected and awaited before the returned promise resolves. Use the synchronous [map](#map) when no async callbacks are involved. #### Call Signature > **mapAsync**\<`TSource`\>(`sourceObject`, `identifier`, `options?`): `Promise`\<`TSource`\> Defined in: [packages/core/src/lib/types.ts:199](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L199) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceObject `TSource` ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TSource`, `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`TSource`\> *** ### mutate() #### Call Signature > **mutate**\<`TSource`, `TDestination`\>(`sourceObject`, `destinationObject`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `void` Defined in: [packages/core/src/lib/types.ts:235](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L235) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceObject `TSource` ###### destinationObject `TDestination` ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TDestination`, `Record`\<`string`, `unknown`\>\> ##### Returns `void` #### Call Signature > **mutate**\<`TSource`\>(`sourceObject`, `destinationObject`, `identifier`, `options?`): `void` Defined in: [packages/core/src/lib/types.ts:245](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L245) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceObject `TSource` ###### destinationObject `TSource` ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TSource`, `Record`\<`string`, `unknown`\>\> ##### Returns `void` *** ### mutateArray() #### Call Signature > **mutateArray**\<`TSource`, `TDestination`\>(`sourceArray`, `destinationArray`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `void` Defined in: [packages/core/src/lib/types.ts:269](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L269) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceArray `TSource`[] ###### destinationArray `TDestination`[] ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TDestination`[], `Record`\<`string`, `unknown`\>\> ##### Returns `void` #### Call Signature > **mutateArray**\<`TSource`\>(`sourceArray`, `destinationArray`, `identifier`, `options?`): `void` Defined in: [packages/core/src/lib/types.ts:279](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L279) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceArray `TSource`[] ###### destinationArray `TSource`[] ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TSource`[], `Record`\<`string`, `unknown`\>\> ##### Returns `void` *** ### mutateArrayAsync() #### Call Signature > **mutateArrayAsync**\<`TSource`, `TDestination`\>(`sourceArray`, `destinationArray`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `Promise`\<`void`\> Defined in: [packages/core/src/lib/types.ts:286](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L286) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceArray `TSource`[] ###### destinationArray `TDestination`[] ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TDestination`[], `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`void`\> #### Call Signature > **mutateArrayAsync**\<`TSource`\>(`sourceArray`, `destinationArray`, `identifier`, `options?`): `Promise`\<`void`\> Defined in: [packages/core/src/lib/types.ts:296](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L296) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceArray `TSource`[] ###### destinationArray `TSource`[] ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`[], `TSource`[], `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`void`\> *** ### mutateAsync() #### Call Signature > **mutateAsync**\<`TSource`, `TDestination`\>(`sourceObject`, `destinationObject`, `sourceIdentifier`, `destinationIdentifier`, `options?`): `Promise`\<`void`\> Defined in: [packages/core/src/lib/types.ts:252](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L252) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ###### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> ##### Parameters ###### sourceObject `TSource` ###### destinationObject `TDestination` ###### sourceIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### destinationIdentifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TDestination`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TDestination`, `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`void`\> #### Call Signature > **mutateAsync**\<`TSource`\>(`sourceObject`, `destinationObject`, `identifier`, `options?`): `Promise`\<`void`\> Defined in: [packages/core/src/lib/types.ts:262](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L262) ##### Type Parameters ###### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### Parameters ###### sourceObject `TSource` ###### destinationObject `TSource` ###### identifier [`ModelIdentifier`](../type-aliases/ModelIdentifier)\<`TSource`\> ###### options? [`MapOptions`](MapOptions)\<`TSource`, `TSource`, `Record`\<`string`, `unknown`\>\> ##### Returns `Promise`\<`void`\> --- # Interface: MappingStrategy\ Source: https://automapperts.netlify.app/api/core/interfaces/MappingStrategy [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:709](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L709) ## Type Parameters ### TIdentifier `TIdentifier` *extends* [`MetadataIdentifier`](../type-aliases/MetadataIdentifier) ## Properties ### applyMetadata > `readonly` **applyMetadata**: [`ApplyMetadataFn`](../type-aliases/ApplyMetadataFn) Defined in: [packages/core/src/lib/types.ts:712](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L712) *** ### destinationConstructor > **destinationConstructor**: [`DestinationConstructor`](../type-aliases/DestinationConstructor) Defined in: [packages/core/src/lib/types.ts:710](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L710) *** ### mapper > **mapper**: [`Mapper`](Mapper) Defined in: [packages/core/src/lib/types.ts:711](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L711) ## Methods ### postMap() > **postMap**\<`TSource`, `TDestination`\>(`source`, `destination`, `mapping`): `TDestination` \| `undefined` Defined in: [packages/core/src/lib/types.ts:723](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L723) #### Type Parameters ##### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> #### Parameters ##### source `TSource` ##### destination `TDestination` ##### mapping [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TDestination`\> #### Returns `TDestination` \| `undefined` *** ### preMap() > **preMap**\<`TSource`, `TDestination`\>(`source`, `mapping`): `TSource` Defined in: [packages/core/src/lib/types.ts:716](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L716) #### Type Parameters ##### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> #### Parameters ##### source `TSource` ##### mapping [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TDestination`\> #### Returns `TSource` *** ### retrieveMetadata() > **retrieveMetadata**(...`identifiers`): `Map`\<`TIdentifier`, [`MetadataList`](../type-aliases/MetadataList)\> Defined in: [packages/core/src/lib/types.ts:713](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L713) #### Parameters ##### identifiers ...`TIdentifier`[] #### Returns `Map`\<`TIdentifier`, [`MetadataList`](../type-aliases/MetadataList)\> --- # Interface: MappingStrategyInitializerOptions Source: https://automapperts.netlify.app/api/core/interfaces/MappingStrategyInitializerOptions [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:736](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L736) ## Properties ### applyMetadata? > `optional` **applyMetadata?**: [`ApplyMetadata`](../type-aliases/ApplyMetadata) Defined in: [packages/core/src/lib/types.ts:737](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L737) *** ### destinationConstructor? > `optional` **destinationConstructor?**: [`DestinationConstructor`](../type-aliases/DestinationConstructor)\<`any`, `any`\> Defined in: [packages/core/src/lib/types.ts:738](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L738) ## Methods ### postMap()? > `optional` **postMap**\<`TSource`, `TDestination`\>(`source`, `destination`, `mapping`): `TDestination` Defined in: [packages/core/src/lib/types.ts:746](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L746) #### Type Parameters ##### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> #### Parameters ##### source `TSource` ##### destination `TDestination` ##### mapping [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TDestination`\> #### Returns `TDestination` *** ### preMap()? > `optional` **preMap**\<`TSource`, `TDestination`\>(`source`, `mapping`): `TSource` Defined in: [packages/core/src/lib/types.ts:739](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L739) #### Type Parameters ##### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> ##### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> #### Parameters ##### source `TSource` ##### mapping [`Mapping`](../type-aliases/Mapping)\<`TSource`, `TDestination`\> #### Returns `TSource` --- # Interface: NamingConvention Source: https://automapperts.netlify.app/api/core/interfaces/NamingConvention [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:62](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L62) ## Properties ### separatorCharacter > **separatorCharacter**: `string` Defined in: [packages/core/src/lib/types.ts:64](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L64) *** ### splittingExpression > **splittingExpression**: `RegExp` Defined in: [packages/core/src/lib/types.ts:63](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L63) *** ### transformPropertyName > **transformPropertyName**: (`sourcePropNameParts`) => `string` Defined in: [packages/core/src/lib/types.ts:65](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L65) #### Parameters ##### sourcePropNameParts `string`[] #### Returns `string` --- # Interface: Resolver\ Source: https://automapperts.netlify.app/api/core/interfaces/Resolver [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:100](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L100) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](../type-aliases/Dictionary)\<`TDestination`\> = `any` ### TResolvedType `TResolvedType` = [`SelectorReturn`](../type-aliases/SelectorReturn)\<`TDestination`\> ## Methods ### resolve() > **resolve**(`source`, `destination?`): [`MaybePromise`](../type-aliases/MaybePromise)\<`TResolvedType`\> Defined in: [packages/core/src/lib/types.ts:105](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L105) #### Parameters ##### source `TSource` ##### destination? `TDestination` #### Returns [`MaybePromise`](../type-aliases/MaybePromise)\<`TResolvedType`\> --- # Interface: TransformerMetadataFactory Source: https://automapperts.netlify.app/api/core/interfaces/TransformerMetadataFactory [**@automapper/core**](../index) *** Defined in: [packages/core/src/lib/types.ts:47](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L47) ## Properties ### \_\_AUTOMAPPER\_METADATA\_FACTORY\_\_? > `optional` **\_\_AUTOMAPPER\_METADATA\_FACTORY\_\_?**: () => \[`string`, `object`\][] Defined in: [packages/core/src/lib/types.ts:48](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L48) #### Returns \[`string`, `object`\][] --- # Type Alias: AbstractConstructor\ Source: https://automapperts.netlify.app/api/core/type-aliases/AbstractConstructor [**@automapper/core**](../index) *** > **AbstractConstructor**\<`T`\> = (...`args`) => `T` Defined in: [packages/core/src/lib/types.ts:16](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L16) ## Type Parameters ### T `T` = `any` ## Parameters ### args ...`any`[] ## Returns `T` --- # Type Alias: AnyConstructor Source: https://automapperts.netlify.app/api/core/type-aliases/AnyConstructor [**@automapper/core**](../index) *** > **AnyConstructor** = (...`args`) => `any` Defined in: [packages/core/src/lib/types.ts:15](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L15) ## Parameters ### args ...`any`[] ## Returns `any` --- # Type Alias: ApplyMetadata Source: https://automapperts.netlify.app/api/core/type-aliases/ApplyMetadata [**@automapper/core**](../index) *** > **ApplyMetadata** = (`strategy`) => [`ApplyMetadataFn`](ApplyMetadataFn) Defined in: [packages/core/src/lib/types.ts:683](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L683) ## Parameters ### strategy [`MappingStrategy`](../interfaces/MappingStrategy)\<[`MetadataIdentifier`](MetadataIdentifier)\> ## Returns [`ApplyMetadataFn`](ApplyMetadataFn) --- # Type Alias: ApplyMetadataFn Source: https://automapperts.netlify.app/api/core/type-aliases/ApplyMetadataFn [**@automapper/core**](../index) *** > **ApplyMetadataFn** = \<`TModel`\>(`model`, `as`) => `TModel` Defined in: [packages/core/src/lib/types.ts:678](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L678) ## Type Parameters ### TModel `TModel` *extends* [`Dictionary`](Dictionary)\<`TModel`\> ## Parameters ### model [`MetadataIdentifier`](MetadataIdentifier)\<`TModel`\> ### as [`MetadataObjectMapClassId`](../enumerations/MetadataObjectMapClassId) ## Returns `TModel` --- # Type Alias: ArrayKeyedMap Source: https://automapperts.netlify.app/api/core/type-aliases/ArrayKeyedMap [**@automapper/core**](../index) *** > **ArrayKeyedMap** = [`PathMap`](PathMap) \| [`DataMap`](DataMap) Defined in: [packages/core/src/lib/types.ts:671](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L671) --- # Type Alias: AutoMapperLogFn Source: https://automapperts.netlify.app/api/core/type-aliases/AutoMapperLogFn [**@automapper/core**](../index) *** > **AutoMapperLogFn** = (`message`, ...`optionalParams`) => `void` Defined in: [packages/core/src/lib/utils/logger.ts:1](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/utils/logger.ts#L1) ## Parameters ### message `unknown` ### optionalParams ...`unknown`[] ## Returns `void` --- # Type Alias: ClassIdentifier\ Source: https://automapperts.netlify.app/api/core/type-aliases/ClassIdentifier [**@automapper/core**](../index) *** > **ClassIdentifier**\<`T`\> = [`Constructor`](Constructor)\<`T`\> \| [`AbstractConstructor`](AbstractConstructor)\<`T`\> & [`TransformerMetadataFactory`](../interfaces/TransformerMetadataFactory) \| `Function` & [`TransformerMetadataFactory`](../interfaces/TransformerMetadataFactory) & `object` Defined in: [packages/core/src/lib/types.ts:19](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L19) ## Type Parameters ### T `T` = `any` --- # Type Alias: CompiledMapStep Source: https://automapperts.netlify.app/api/core/type-aliases/CompiledMapStep [**@automapper/core**](../index) *** > **CompiledMapStep** = (`context`) => `void` Defined in: [packages/core/src/lib/types.ts:565](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L565) ## Parameters ### context `any` ## Returns `void` --- # Type Alias: ConditionReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/ConditionReturn [**@automapper/core**](../index) *** > **ConditionReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`Condition`](../enumerations/TransformationType#condition), (`source`, `sourceMemberPath`) => `TSelectorReturn`\] Defined in: [packages/core/src/lib/types.ts:420](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L420) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: Constructor\ Source: https://automapperts.netlify.app/api/core/type-aliases/Constructor [**@automapper/core**](../index) *** > **Constructor**\<`T`\> = (...`args`) => `T` & [`TransformerMetadataFactory`](../interfaces/TransformerMetadataFactory) Defined in: [packages/core/src/lib/types.ts:17](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L17) ## Type Parameters ### T `T` = `any` --- # Type Alias: ConvertUsingReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/ConvertUsingReturn [**@automapper/core**](../index) *** > **ConvertUsingReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`ConvertUsing`](../enumerations/TransformationType#convertusing), [`Selector`](Selector)\<`TSource`, `TSelectorReturn`\>\] Defined in: [packages/core/src/lib/types.ts:435](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L435) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: DataMap Source: https://automapperts.netlify.app/api/core/type-aliases/DataMap [**@automapper/core**](../index) *** > **DataMap** = `Map`\<`symbol`, `number`\> Defined in: [packages/core/src/lib/types.ts:667](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L667) --- # Type Alias: DestinationConstructor\ Source: https://automapperts.netlify.app/api/core/type-aliases/DestinationConstructor [**@automapper/core**](../index) *** > **DestinationConstructor**\<`TSource`, `TDestination`\> = (`sourceObject`, `destinationIdentifier`) => `TDestination` Defined in: [packages/core/src/lib/types.ts:687](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L687) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> = `any` ## Parameters ### sourceObject `TSource` ### destinationIdentifier [`MetadataIdentifier`](MetadataIdentifier)\<`TDestination`\> ## Returns `TDestination` --- # Type Alias: Dictionary\ Source: https://automapperts.netlify.app/api/core/type-aliases/Dictionary [**@automapper/core**](../index) *** > **Dictionary**\<`T`\> = `{ [key in keyof T]?: unknown }` Defined in: [packages/core/src/lib/types.ts:13](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L13) ## Type Parameters ### T `T` --- # Type Alias: FromValueReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/FromValueReturn [**@automapper/core**](../index) *** > **FromValueReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`FromValue`](../enumerations/TransformationType#fromvalue), () => `TSelectorReturn`\] Defined in: [packages/core/src/lib/types.ts:429](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L429) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: IgnoreReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/IgnoreReturn [**@automapper/core**](../index) *** > **IgnoreReturn**\<`TSource`, `TDestination`\> = \[[`Ignore`](../enumerations/TransformationType#ignore)\] Defined in: [packages/core/src/lib/types.ts:462](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L462) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> --- # Type Alias: MapCallback\ Source: https://automapperts.netlify.app/api/core/type-aliases/MapCallback [**@automapper/core**](../index) *** > **MapCallback**\<`TSource`, `TDestination`, `TExtraArgs`\> = (`source`, `destination`, `extraArguments?`) => [`MaybePromise`](MaybePromise)\<`void`\> Defined in: [packages/core/src/lib/types.ts:118](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L118) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TExtraArgs `TExtraArgs` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\> ## Parameters ### source `TSource` ### destination `TDestination` ### extraArguments? `TExtraArgs` ## Returns [`MaybePromise`](MaybePromise)\<`void`\> --- # Type Alias: MapDeferReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/MapDeferReturn [**@automapper/core**](../index) *** > **MapDeferReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`MapDefer`](../enumerations/TransformationType#mapdefer), [`DeferFunction`](../interfaces/DeferFunction)\<`TSource`, `TDestination`, `TSelectorReturn`\>\] Defined in: [packages/core/src/lib/types.ts:385](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L385) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: MapFromReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/MapFromReturn [**@automapper/core**](../index) *** > **MapFromReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`MapFrom`](../enumerations/TransformationType#mapfrom), [`Selector`](Selector)\<`TSource`, [`MaybePromise`](MaybePromise)\<`TSelectorReturn`\>\>\] Defined in: [packages/core/src/lib/types.ts:394](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L394) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: MapInitializeReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/MapInitializeReturn [**@automapper/core**](../index) *** > **MapInitializeReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`MapInitialize`](../enumerations/TransformationType#mapinitialize), [`Selector`](Selector)\<`TSource`, `TSelectorReturn`\>, `boolean`\] Defined in: [packages/core/src/lib/types.ts:479](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L479) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: Mapping\ Source: https://automapperts.netlify.app/api/core/type-aliases/Mapping [**@automapper/core**](../index) *** > **Mapping**\<`TSource`, `TDestination`\> = \[\[[`MetadataIdentifier`](MetadataIdentifier)\<`TSource`\>, [`MetadataIdentifier`](MetadataIdentifier)\<`TDestination`\>\], \[`TSource`, `TDestination`\], \[`string`[], [`MappingProperty`](MappingProperty)\<`TSource`, `TDestination`, [`SelectorReturn`](SelectorReturn)\<`TDestination`\>\>, \[[`MetadataIdentifier`](MetadataIdentifier) \| [`Primitive`](Primitive) \| `Date`, [`MetadataIdentifier`](MetadataIdentifier) \| [`Primitive`](Primitive) \| `Date`\]\][], \[`string`[], [`MappingProperty`](MappingProperty)\<`TSource`, `TDestination`, [`SelectorReturn`](SelectorReturn)\<`TDestination`\>\>, \[[`MetadataIdentifier`](MetadataIdentifier) \| [`Primitive`](Primitive) \| `Date`, [`MetadataIdentifier`](MetadataIdentifier) \| [`Primitive`](Primitive) \| `Date`\]\][], [`Mapper`](../interfaces/Mapper), [`DestinationConstructor`](DestinationConstructor)\<`TSource`, `TDestination`\>, `Map`\<[`MetadataIdentifier`](MetadataIdentifier) \| [`PrimitiveConstructor`](PrimitiveConstructor) \| `DateConstructor`, \[`Map`\<[`MetadataIdentifier`](MetadataIdentifier) \| [`PrimitiveConstructor`](PrimitiveConstructor) \| `DateConstructor`, \[[`Selector`](Selector)?, [`Selector`](Selector)?\]\>?, `Map`\<[`MetadataIdentifier`](MetadataIdentifier) \| [`PrimitiveConstructor`](PrimitiveConstructor) \| `DateConstructor`, \[[`Selector`](Selector)?, [`Selector`](Selector)?\]\>?\]\>, \[[`MapCallback`](MapCallback)\<`TSource`, `TDestination`\>, [`MapCallback`](MapCallback)\<`TSource`, `TDestination`\>, [`MapCallback`](MapCallback)\<`TSource`[], `TDestination`[]\>, [`MapCallback`](MapCallback)\<`TSource`[], `TDestination`[]\>\], \[[`NamingConvention`](../interfaces/NamingConvention), [`NamingConvention`](../interfaces/NamingConvention)\], [`CompiledMapping`](../interfaces/CompiledMapping)\<`TSource`, `TDestination`\>\] Defined in: [packages/core/src/lib/types.ts:601](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L601) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> = `any` --- # Type Alias: MappingConfiguration\ Source: https://automapperts.netlify.app/api/core/type-aliases/MappingConfiguration [**@automapper/core**](../index) *** > **MappingConfiguration**\<`TSource`, `TDestination`\> = (`mapping`) => `void` Defined in: [packages/core/src/lib/types.ts:673](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L673) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> = `any` ## Parameters ### mapping [`Mapping`](Mapping)\<`TSource`, `TDestination`\> ## Returns `void` --- # Type Alias: MappingProfile Source: https://automapperts.netlify.app/api/core/type-aliases/MappingProfile [**@automapper/core**](../index) *** > **MappingProfile** = (`mapper`) => `void` Defined in: [packages/core/src/lib/types.ts:695](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L695) ## Parameters ### mapper [`Mapper`](../interfaces/Mapper) ## Returns `void` --- # Type Alias: MappingProperty\ Source: https://automapperts.netlify.app/api/core/type-aliases/MappingProperty [**@automapper/core**](../index) *** > **MappingProperty**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[`string`[], [`MappingTransformation`](MappingTransformation)\<`TSource`, `TDestination`, `TSelectorReturn`\>\] Defined in: [packages/core/src/lib/types.ts:507](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L507) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: MappingStrategyInitializer\ Source: https://automapperts.netlify.app/api/core/type-aliases/MappingStrategyInitializer [**@automapper/core**](../index) *** > **MappingStrategyInitializer**\<`TIdentifier`\> = (`mapper`) => [`MappingStrategy`](../interfaces/MappingStrategy)\<`TIdentifier`\> Defined in: [packages/core/src/lib/types.ts:733](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L733) ## Type Parameters ### TIdentifier `TIdentifier` *extends* [`MetadataIdentifier`](MetadataIdentifier) ## Parameters ### mapper [`Mapper`](../interfaces/Mapper) ## Returns [`MappingStrategy`](../interfaces/MappingStrategy)\<`TIdentifier`\> --- # Type Alias: MappingTransformation\ Source: https://automapperts.netlify.app/api/core/type-aliases/MappingTransformation [**@automapper/core**](../index) *** > **MappingTransformation**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`MemberMapReturn`](MemberMapReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\>, [`PreConditionReturn`](PreConditionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\>\] Defined in: [packages/core/src/lib/types.ts:494](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L494) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> = `any` ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: MapWithArgumentsReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/MapWithArgumentsReturn [**@automapper/core**](../index) *** > **MapWithArgumentsReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`MapWithArguments`](../enumerations/TransformationType#mapwitharguments), (`source`, `extraArguments`) => [`MaybePromise`](MaybePromise)\<`TSelectorReturn`\>\] Defined in: [packages/core/src/lib/types.ts:467](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L467) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: MapWithReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/MapWithReturn [**@automapper/core**](../index) *** > **MapWithReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`MapWith`](../enumerations/TransformationType#mapwith), (`sourceObj`, `mapper`, `options?`) => `TSelectorReturn` \| `undefined` \| `null`\] Defined in: [packages/core/src/lib/types.ts:403](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L403) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: MaybePromise\ Source: https://automapperts.netlify.app/api/core/type-aliases/MaybePromise [**@automapper/core**](../index) *** > **MaybePromise**\<`T`\> = `T` \| `Promise`\<`T`\> Defined in: [packages/core/src/lib/types.ts:92](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L92) ## Type Parameters ### T `T` --- # Type Alias: MemberMapReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/MemberMapReturn [**@automapper/core**](../index) *** > **MemberMapReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = [`MemberMapReturnNoDefer`](MemberMapReturnNoDefer)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`MapDeferReturn`](MapDeferReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/types.ts:358](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L358) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: MemberMapReturnNoDefer\ Source: https://automapperts.netlify.app/api/core/type-aliases/MemberMapReturnNoDefer [**@automapper/core**](../index) *** > **MemberMapReturnNoDefer**\<`TSource`, `TDestination`, `TSelectorReturn`\> = [`MapInitializeReturn`](MapInitializeReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`MapWithReturn`](MapWithReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`MapFromReturn`](MapFromReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`ConditionReturn`](ConditionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`FromValueReturn`](FromValueReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`ConvertUsingReturn`](ConvertUsingReturn)\<`TSource`, `TDestination`\> \| [`NullSubstitutionReturn`](NullSubstitutionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`UndefinedSubstitutionReturn`](UndefinedSubstitutionReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> \| [`IgnoreReturn`](IgnoreReturn)\<`TSource`, `TDestination`\> \| [`MapWithArgumentsReturn`](MapWithArgumentsReturn)\<`TSource`, `TDestination`, `TSelectorReturn`\> Defined in: [packages/core/src/lib/types.ts:342](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L342) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: Metadata Source: https://automapperts.netlify.app/api/core/type-aliases/Metadata [**@automapper/core**](../index) *** > **Metadata** = \[`string`[], () => [`PrimitiveExtended`](PrimitiveExtended) \| [`MetadataIdentifier`](MetadataIdentifier), `boolean`, `boolean`\] Defined in: [packages/core/src/lib/types.ts:158](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L158) --- # Type Alias: MetadataIdentifier\ Source: https://automapperts.netlify.app/api/core/type-aliases/MetadataIdentifier [**@automapper/core**](../index) *** > **MetadataIdentifier**\<`T`\> = `Exclude`\<[`ModelIdentifier`](ModelIdentifier)\<`T`\>, `string`\> Defined in: [packages/core/src/lib/types.ts:144](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L144) ## Type Parameters ### T `T` = `any` --- # Type Alias: MetadataList Source: https://automapperts.netlify.app/api/core/type-aliases/MetadataList [**@automapper/core**](../index) *** > **MetadataList** = \[`string`, `object`\][] Defined in: [packages/core/src/lib/types.ts:697](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L697) --- # Type Alias: ModelIdentifier\ Source: https://automapperts.netlify.app/api/core/type-aliases/ModelIdentifier [**@automapper/core**](../index) *** > **ModelIdentifier**\<`T`\> = `string` \| `symbol` \| [`ClassIdentifier`](ClassIdentifier)\<`T`\> Defined in: [packages/core/src/lib/types.ts:142](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L142) ## Type Parameters ### T `T` = `any` --- # Type Alias: NamingConventionInput Source: https://automapperts.netlify.app/api/core/type-aliases/NamingConventionInput [**@automapper/core**](../index) *** > **NamingConventionInput** = [`NamingConvention`](../interfaces/NamingConvention) \| \{ `destination`: [`NamingConvention`](../interfaces/NamingConvention); `source`: [`NamingConvention`](../interfaces/NamingConvention); \} Defined in: [packages/core/src/lib/types.ts:68](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L68) --- # Type Alias: NestedMappingPair Source: https://automapperts.netlify.app/api/core/type-aliases/NestedMappingPair [**@automapper/core**](../index) *** > **NestedMappingPair** = \[[`MetadataIdentifier`](MetadataIdentifier) \| [`Primitive`](Primitive) \| `Date`, [`MetadataIdentifier`](MetadataIdentifier) \| [`Primitive`](Primitive) \| `Date`\] Defined in: [packages/core/src/lib/types.ts:537](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L537) --- # Type Alias: NullSubstitutionReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/NullSubstitutionReturn [**@automapper/core**](../index) *** > **NullSubstitutionReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`NullSubstitution`](../enumerations/TransformationType#nullsubstitution), (`source`, `sourceMemberPath`) => `TSelectorReturn`\] Defined in: [packages/core/src/lib/types.ts:444](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L444) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: PathMap Source: https://automapperts.netlify.app/api/core/type-aliases/PathMap [**@automapper/core**](../index) *** > **PathMap** = `Map`\<`string`, `PathMap` \| [`DataMap`](DataMap)\> Defined in: [packages/core/src/lib/types.ts:669](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L669) --- # Type Alias: PreConditionReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/PreConditionReturn [**@automapper/core**](../index) *** > **PreConditionReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`ConditionPredicate`](../interfaces/ConditionPredicate)\<`TSource`\>, `TSelectorReturn`\] Defined in: [packages/core/src/lib/types.ts:366](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L366) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: Primitive Source: https://automapperts.netlify.app/api/core/type-aliases/Primitive [**@automapper/core**](../index) *** > **Primitive** = `string` \| `number` \| `boolean` \| `bigint` Defined in: [packages/core/src/lib/types.ts:27](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L27) --- # Type Alias: PrimitiveConstructor Source: https://automapperts.netlify.app/api/core/type-aliases/PrimitiveConstructor [**@automapper/core**](../index) *** > **PrimitiveConstructor** = `StringConstructor` \| `NumberConstructor` \| `BooleanConstructor` \| `BigIntConstructor` Defined in: [packages/core/src/lib/types.ts:30](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L30) --- # Type Alias: PrimitiveConstructorExtended Source: https://automapperts.netlify.app/api/core/type-aliases/PrimitiveConstructorExtended [**@automapper/core**](../index) *** > **PrimitiveConstructorExtended** = [`PrimitiveConstructor`](PrimitiveConstructor) \| `DateConstructor` \| [`AnyConstructor`](AnyConstructor) Defined in: [packages/core/src/lib/types.ts:36](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L36) --- # Type Alias: PrimitiveConstructorReturnType\ Source: https://automapperts.netlify.app/api/core/type-aliases/PrimitiveConstructorReturnType [**@automapper/core**](../index) *** > **PrimitiveConstructorReturnType**\<`TType`\> = `TType` *extends* `DateConstructor` \| `Exclude`\<`TType`, [`PrimitiveConstructor`](PrimitiveConstructor)\> ? `InstanceType`\<`TType`\> : `ReturnType`\<`Extract`\<`TType`, [`PrimitiveConstructor`](PrimitiveConstructor)\>\> Defined in: [packages/core/src/lib/types.ts:41](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L41) ## Type Parameters ### TType `TType` *extends* [`PrimitiveConstructorExtended`](PrimitiveConstructorExtended) --- # Type Alias: PrimitiveExtended Source: https://automapperts.netlify.app/api/core/type-aliases/PrimitiveExtended [**@automapper/core**](../index) *** > **PrimitiveExtended** = [`Primitive`](Primitive) \| `Date` Defined in: [packages/core/src/lib/types.ts:28](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L28) --- # Type Alias: Selector\ Source: https://automapperts.netlify.app/api/core/type-aliases/Selector [**@automapper/core**](../index) *** > **Selector**\<`TObject`, `TReturnType`\> = (`obj`) => `TReturnType` Defined in: [packages/core/src/lib/types.ts:83](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L83) ## Type Parameters ### TObject `TObject` *extends* [`Dictionary`](Dictionary)\<`TObject`\> = `any` ### TReturnType `TReturnType` = `unknown` ## Parameters ### obj `TObject` ## Returns `TReturnType` --- # Type Alias: SelectorReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/SelectorReturn [**@automapper/core**](../index) *** > **SelectorReturn**\<`TObject`\> = `ReturnType`\<[`Selector`](Selector)\<`TObject`\>\> Defined in: [packages/core/src/lib/types.ts:88](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L88) ## Type Parameters ### TObject `TObject` *extends* [`Dictionary`](Dictionary)\<`TObject`\> --- # Type Alias: UndefinedSubstitutionReturn\ Source: https://automapperts.netlify.app/api/core/type-aliases/UndefinedSubstitutionReturn [**@automapper/core**](../index) *** > **UndefinedSubstitutionReturn**\<`TSource`, `TDestination`, `TSelectorReturn`\> = \[[`UndefinedSubstitution`](../enumerations/TransformationType#undefinedsubstitution), (`source`, `sourceMemberPath`) => `TSelectorReturn`\] Defined in: [packages/core/src/lib/types.ts:453](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L453) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> ### TSelectorReturn `TSelectorReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> --- # Type Alias: ValueSelector\ Source: https://automapperts.netlify.app/api/core/type-aliases/ValueSelector [**@automapper/core**](../index) *** > **ValueSelector**\<`TSource`, `TDestination`, `TValueReturn`\> = (`source`) => `TValueReturn` Defined in: [packages/core/src/lib/types.ts:94](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/types.ts#L94) ## Type Parameters ### TSource `TSource` *extends* [`Dictionary`](Dictionary)\<`TSource`\> = `any` ### TDestination `TDestination` *extends* [`Dictionary`](Dictionary)\<`TDestination`\> = `any` ### TValueReturn `TValueReturn` = [`SelectorReturn`](SelectorReturn)\<`TDestination`\> ## Parameters ### source `TSource` ## Returns `TValueReturn` --- # Variable: defaultStrategyInitializerOptions Source: https://automapperts.netlify.app/api/core/variables/defaultStrategyInitializerOptions [**@automapper/core**](../index) *** > `const` **defaultStrategyInitializerOptions**: `Required`\<`Omit`\<[`MappingStrategyInitializerOptions`](../interfaces/MappingStrategyInitializerOptions), `"destinationConstructor"`\>\> Defined in: [packages/core/src/lib/default-strategy-initializer-options.ts:4](https://github.com/nartc/mapper/blob/main/packages/core/src/lib/default-strategy-initializer-options.ts#L4) --- # @automapper/mikro Source: https://automapperts.netlify.app/api/mikro **@automapper/mikro** *** ## Functions - [mikro](functions/mikro) --- # Function: mikro() Source: https://automapperts.netlify.app/api/mikro/functions/mikro [**@automapper/mikro**](../index) *** > **mikro**(`options?`): `MappingStrategyInitializer`\<`MetadataIdentifier`\> Defined in: [mikro.ts:16](https://github.com/nartc/mapper/blob/main/packages/mikro/src/lib/mikro.ts#L16) ## Parameters ### options? `MappingStrategyInitializerOptions` = `{}` ## Returns `MappingStrategyInitializer`\<`MetadataIdentifier`\> --- # @automapper/nestjs Source: https://automapperts.netlify.app/api/nestjs **@automapper/nestjs** *** ## Classes - [AutomapperModule](classes/AutomapperModule) - [AutomapperProfile](classes/AutomapperProfile) ## Interfaces - [AutomapperAsyncOptions](interfaces/AutomapperAsyncOptions) - [AutomapperGlobalOptions](interfaces/AutomapperGlobalOptions) - [AutomapperOptionsFactory](interfaces/AutomapperOptionsFactory) ## Type Aliases - [AutomapperOptions](type-aliases/AutomapperOptions) ## Variables - [DEFAULT\_MAPPER\_TOKEN](variables/DEFAULT_MAPPER_TOKEN) - [MapInterceptor](variables/MapInterceptor) - [MapPipe](variables/MapPipe) ## Functions - [getMapperToken](functions/getMapperToken) - [InjectMapper](functions/InjectMapper) --- # Class: AutomapperModule Source: https://automapperts.netlify.app/api/nestjs/classes/AutomapperModule [**@automapper/nestjs**](../index) *** Defined in: [packages/nestjs/src/lib/automapper-nestjs.module.ts:14](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/automapper-nestjs.module.ts#L14) ## Constructors ### Constructor > **new AutomapperModule**(): `AutomapperModule` #### Returns `AutomapperModule` ## Methods ### forRoot() #### Call Signature > `static` **forRoot**(`mapperOptions`): `DynamicModule` Defined in: [packages/nestjs/src/lib/automapper-nestjs.module.ts:15](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/automapper-nestjs.module.ts#L15) ##### Parameters ###### mapperOptions `CreateMapperOptions` ##### Returns `DynamicModule` #### Call Signature > `static` **forRoot**(`mapperOptions`, `globalOptions?`): `DynamicModule` Defined in: [packages/nestjs/src/lib/automapper-nestjs.module.ts:16](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/automapper-nestjs.module.ts#L16) ##### Parameters ###### mapperOptions `CreateMapperOptions` & `object`[] ###### globalOptions? [`AutomapperGlobalOptions`](../interfaces/AutomapperGlobalOptions) ##### Returns `DynamicModule` *** ### forRootAsync() #### Call Signature > `static` **forRootAsync**(`asyncMapperOptions`): `DynamicModule` Defined in: [packages/nestjs/src/lib/automapper-nestjs.module.ts:38](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/automapper-nestjs.module.ts#L38) ##### Parameters ###### asyncMapperOptions [`AutomapperAsyncOptions`](../interfaces/AutomapperAsyncOptions) ##### Returns `DynamicModule` #### Call Signature > `static` **forRootAsync**(`asyncMapperOptions`, `globalOptions?`): `DynamicModule` Defined in: [packages/nestjs/src/lib/automapper-nestjs.module.ts:41](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/automapper-nestjs.module.ts#L41) ##### Parameters ###### asyncMapperOptions [`AutomapperAsyncOptions`](../interfaces/AutomapperAsyncOptions) & `object`[] ###### globalOptions? [`AutomapperGlobalOptions`](../interfaces/AutomapperGlobalOptions) ##### Returns `DynamicModule` --- # Abstract Class: AutomapperProfile Source: https://automapperts.netlify.app/api/nestjs/classes/AutomapperProfile [**@automapper/nestjs**](../index) *** Defined in: [packages/nestjs/src/lib/automapper-profile.ts:8](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/automapper-profile.ts#L8) ## Accessors ### profile #### Get Signature > **get** `abstract` **profile**(): `MappingProfile` Defined in: [packages/nestjs/src/lib/automapper-profile.ts:15](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/automapper-profile.ts#L15) ##### Returns `MappingProfile` --- # Function: getMapperToken() Source: https://automapperts.netlify.app/api/nestjs/functions/getMapperToken [**@automapper/nestjs**](../index) *** > **getMapperToken**(`name?`): `string` Defined in: [packages/nestjs/src/lib/di/get-mapper-token.ts:3](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/di/get-mapper-token.ts#L3) ## Parameters ### name? `string` ## Returns `string` --- # Function: InjectMapper() Source: https://automapperts.netlify.app/api/nestjs/functions/InjectMapper [**@automapper/nestjs**](../index) *** > **InjectMapper**(`name?`): `PropertyDecorator` & `ParameterDecorator` Defined in: [packages/nestjs/src/lib/di/inject-mapper.ts:4](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/di/inject-mapper.ts#L4) ## Parameters ### name? `string` ## Returns `PropertyDecorator` & `ParameterDecorator` --- # Interface: AutomapperAsyncOptions Source: https://automapperts.netlify.app/api/nestjs/interfaces/AutomapperAsyncOptions [**@automapper/nestjs**](../index) *** Defined in: [packages/nestjs/src/lib/options.ts:23](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L23) ## Extends - `Pick`\<`ModuleMetadata`, `"imports"`\> ## Properties ### imports? > `optional` **imports?**: (`DynamicModule` \| `Type`\<`any`\> \| `ForwardReference`\<`any`\> \| `Promise`\<`DynamicModule`\>)[] Defined in: node\_modules/.pnpm/@nestjs+common@11.1.27\_reflect-metadata@0.2.2\_rxjs@7.8.1/node\_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts:18 Optional list of imported modules that export the providers which are required in this module. #### Inherited from `Pick.imports` *** ### inject? > `optional` **inject?**: `any`[] Defined in: [packages/nestjs/src/lib/options.ts:25](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L25) *** ### useClass? > `optional` **useClass?**: `Type`\<[`AutomapperOptionsFactory`](AutomapperOptionsFactory)\> Defined in: [packages/nestjs/src/lib/options.ts:27](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L27) *** ### useExisting? > `optional` **useExisting?**: `Type`\<[`AutomapperOptionsFactory`](AutomapperOptionsFactory)\> Defined in: [packages/nestjs/src/lib/options.ts:26](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L26) *** ### useFactory? > `optional` **useFactory?**: (...`args`) => `CreateMapperOptions` \| `Promise`\<`CreateMapperOptions`\> Defined in: [packages/nestjs/src/lib/options.ts:28](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L28) #### Parameters ##### args ...`any`[] #### Returns `CreateMapperOptions` \| `Promise`\<`CreateMapperOptions`\> --- # Interface: AutomapperGlobalOptions Source: https://automapperts.netlify.app/api/nestjs/interfaces/AutomapperGlobalOptions [**@automapper/nestjs**](../index) *** Defined in: [packages/nestjs/src/lib/options.ts:12](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L12) ## Properties ### globalErrorHandler? > `optional` **globalErrorHandler?**: `ErrorHandler` Defined in: [packages/nestjs/src/lib/options.ts:13](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L13) *** ### globalNamingConventions? > `optional` **globalNamingConventions?**: `NamingConventionInput` Defined in: [packages/nestjs/src/lib/options.ts:14](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L14) --- # Interface: AutomapperOptionsFactory Source: https://automapperts.netlify.app/api/nestjs/interfaces/AutomapperOptionsFactory [**@automapper/nestjs**](../index) *** Defined in: [packages/nestjs/src/lib/options.ts:17](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L17) ## Methods ### createAutomapperOptions() > **createAutomapperOptions**(): `CreateMapperOptions` \| `Promise`\<`CreateMapperOptions`\> Defined in: [packages/nestjs/src/lib/options.ts:18](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L18) #### Returns `CreateMapperOptions` \| `Promise`\<`CreateMapperOptions`\> --- # Type Alias: AutomapperOptions Source: https://automapperts.netlify.app/api/nestjs/type-aliases/AutomapperOptions [**@automapper/nestjs**](../index) *** > **AutomapperOptions** = `CreateMapperOptions` \| `CreateMapperOptions` & `object`[] Defined in: [packages/nestjs/src/lib/options.ts:8](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/options.ts#L8) --- # Variable: DEFAULT\_MAPPER\_TOKEN Source: https://automapperts.netlify.app/api/nestjs/variables/DEFAULT_MAPPER_TOKEN [**@automapper/nestjs**](../index) *** > `const` **DEFAULT\_MAPPER\_TOKEN**: `"automapper:nestjs:default"` = `'automapper:nestjs:default'` Defined in: [packages/nestjs/src/lib/di/get-mapper-token.ts:1](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/di/get-mapper-token.ts#L1) --- # Variable: MapInterceptor Source: https://automapperts.netlify.app/api/nestjs/variables/MapInterceptor [**@automapper/nestjs**](../index) *** > `const` **MapInterceptor**: \<`TSource`, `TDestination`\>(`from`, `to`, `options?`) => `Type`\<`NestInterceptor`\> Defined in: [packages/nestjs/src/lib/map.interceptor.ts:29](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/map.interceptor.ts#L29) Maps route-handler responses with synchronous or asynchronous mappings. Promise-returning member resolvers and callbacks are awaited before the response is emitted, and mapping errors propagate through the response stream. ## Type Parameters ### TSource `TSource` *extends* `Dictionary`\<`TSource`\> ### TDestination `TDestination` *extends* `Dictionary`\<`TDestination`\> ## Parameters ### from `ModelIdentifier`\<`TSource`\> ### to `ModelIdentifier`\<`TDestination`\> ### options? `object` & `MapOptions`\<`TSource`, `TDestination`\> ## Returns `Type`\<`NestInterceptor`\> --- # Variable: MapPipe Source: https://automapperts.netlify.app/api/nestjs/variables/MapPipe [**@automapper/nestjs**](../index) *** > `const` **MapPipe**: \<`TSource`, `TDestination`\>(`from`, `to`, `options?`) => `Type`\<`PipeTransform`\> Defined in: [packages/nestjs/src/lib/map.pipe.ts:22](https://github.com/nartc/mapper/blob/main/packages/nestjs/src/lib/map.pipe.ts#L22) Maps request bodies or query values with synchronous or asynchronous mappings. Promise-returning member resolvers and callbacks are awaited, and mapping errors propagate through Nest's request pipeline. ## Type Parameters ### TSource `TSource` *extends* `Dictionary`\<`TSource`\> ### TDestination `TDestination` *extends* `Dictionary`\<`TDestination`\> ## Parameters ### from `ModelIdentifier`\<`TSource`\> ### to `ModelIdentifier`\<`TDestination`\> ### options? `object` & `MapOptions`\<`TSource`, `TDestination`\> ## Returns `Type`\<`PipeTransform`\> --- # @automapper/pojos Source: https://automapperts.netlify.app/api/pojos **@automapper/pojos** *** ## Classes - [PojosMetadataMap](classes/PojosMetadataMap) ## Type Aliases - [PojoMetadata](type-aliases/PojoMetadata) ## Functions - [pojos](functions/pojos) --- # Class: PojosMetadataMap Source: https://automapperts.netlify.app/api/pojos/classes/PojosMetadataMap [**@automapper/pojos**](../index) *** Defined in: [metadata-map.ts:12](https://github.com/nartc/mapper/blob/main/packages/pojos/src/lib/metadata-map.ts#L12) ## Constructors ### Constructor > **new PojosMetadataMap**(): `PojosMetadataMap` #### Returns `PojosMetadataMap` ## Methods ### create() > `static` **create**\<`TModel`\>(`identifier`, `metadata?`): `void` Defined in: [metadata-map.ts:28](https://github.com/nartc/mapper/blob/main/packages/pojos/src/lib/metadata-map.ts#L28) #### Type Parameters ##### TModel `TModel` *extends* `Dictionary`\<`TModel`\> #### Parameters ##### identifier `string` \| `symbol` ##### metadata? \{ \[key in string \| number \| symbol\]?: PojoMetadata \| \[PojoMetadata\] \| \{ depth: number; type: PojoMetadata \| \[PojoMetadata\] \} \} = `{}` #### Returns `void` *** ### reset() > `static` **reset**(): `void` Defined in: [metadata-map.ts:24](https://github.com/nartc/mapper/blob/main/packages/pojos/src/lib/metadata-map.ts#L24) #### Returns `void` *** ### retrieve() > `static` **retrieve**(`identifier`): \[`string`, \{ `depth`: `number`; `isArray`: `boolean`; `isGetterOnly?`: `boolean`; `type`: () => [`PojoMetadata`](../type-aliases/PojoMetadata); \}\][] Defined in: [metadata-map.ts:58](https://github.com/nartc/mapper/blob/main/packages/pojos/src/lib/metadata-map.ts#L58) #### Parameters ##### identifier `symbol` #### Returns \[`string`, \{ `depth`: `number`; `isArray`: `boolean`; `isGetterOnly?`: `boolean`; `type`: () => [`PojoMetadata`](../type-aliases/PojoMetadata); \}\][] --- # Function: pojos() Source: https://automapperts.netlify.app/api/pojos/functions/pojos [**@automapper/pojos**](../index) *** > **pojos**(`options?`): `MappingStrategyInitializer`\<`symbol`\> Defined in: [pojos.ts:10](https://github.com/nartc/mapper/blob/main/packages/pojos/src/lib/pojos.ts#L10) ## Parameters ### options? `MappingStrategyInitializerOptions` = `{}` ## Returns `MappingStrategyInitializer`\<`symbol`\> --- # Type Alias: PojoMetadata Source: https://automapperts.netlify.app/api/pojos/type-aliases/PojoMetadata [**@automapper/pojos**](../index) *** > **PojoMetadata** = `Exclude`\<`ModelIdentifier`, `Constructor`\> \| `AnyConstructor` Defined in: [metadata-map.ts:8](https://github.com/nartc/mapper/blob/main/packages/pojos/src/lib/metadata-map.ts#L8) --- # @automapper/sequelize Source: https://automapperts.netlify.app/api/sequelize **@automapper/sequelize** *** ## Functions - [sequelize](functions/sequelize) --- # Function: sequelize() Source: https://automapperts.netlify.app/api/sequelize/functions/sequelize [**@automapper/sequelize**](../index) *** > **sequelize**(`options?`): `MappingStrategyInitializer`\<`MetadataIdentifier`\> Defined in: [sequelize.ts:12](https://github.com/nartc/mapper/blob/main/packages/sequelize/src/lib/sequelize.ts#L12) ## Parameters ### options? `MappingStrategyInitializerOptions` = `defaultStrategyInitializerOptions` ## Returns `MappingStrategyInitializer`\<`MetadataIdentifier`\> --- # AutoMapper 9 Source: https://automapperts.netlify.app/changelog/v9-0-0 AutoMapper 9 moves the package family to a modern ESM and Node.js baseline, adds genuine asynchronous mapping, and introduces stronger runtime contracts. ## Highlights - Async map and mutation APIs now await promise-returning member resolvers and lifecycle callbacks. - NestJS `MapInterceptor` and `MapPipe` await asynchronous object and array mappings. - `beforeMapArray()` and `afterMapArray()` configure collection-wide lifecycle work. - `AutoMapperError`, `MappingNotFoundError`, and `MapMemberError` make mapper failures distinguishable and inspectable. - `AutoMapperLogger` supports additional log levels, repeatable configuration, restoration, and reset. - Class identifiers accept abstract classes and classes with non-public constructors. - Mapping plans are compiled when mappings are created, reducing repeated per-object work. ## Compatibility - Node.js 20 or later is required. - Packages are ESM-only. - NestJS 10 and 11 are supported. - MikroORM 6 is supported. - Sequelize 6 remains supported. - `reflect-metadata` 0.1.14 and 0.2 releases are accepted. Read [Migrating to AutoMapper 9](/getting-started/migrate-v9) for code examples and the upgrade checklist. --- # Mapper and strategies Source: https://automapperts.netlify.app/fundamentals/mapper `Mapper` owns registered mappings and executes map and mutation operations. Create it with one mapping strategy: ```ts const mapper = createMapper({ strategyInitializer: classes(), }); ``` ## Mapping strategies A strategy discovers, retrieves, and applies model metadata. It also constructs destination objects and can preprocess source or postprocess destination values. | Package | Initializer | Metadata source | | --- | --- | --- | | `@automapper/classes` | `classes()` | `@AutoMap()` and reflected class metadata | | `@automapper/pojos` | `pojos()` | `PojosMetadataMap` registrations | | `@automapper/mikro` | `mikro()` | Class metadata adapted for MikroORM entities | | `@automapper/sequelize` | `sequelize()` | Class metadata adapted for Sequelize models | `mikro()` and `sequelize()` extend the classes strategy with integration-specific defaults. ## Mapper lifetime Register mappings once and reuse the mapper. Call `mapper.dispose()` when its mapping registry is no longer needed, such as during application or test teardown. ## Error handling Without a custom `errorHandler`, mapper failures are forwarded to `AutoMapperLogger.error`. Supply an `ErrorHandler` when your application needs different behavior: ```ts const mapper = createMapper({ strategyInitializer: classes(), errorHandler: { handle(error: unknown) { throw error; }, }, }); ``` Failures use `AutoMapperError`, `MappingNotFoundError`, and `MapMemberError`, allowing consumers to narrow mapping failures with `instanceof`. ## Logger AutoMapper's default logger delegates to `console` with an `[AutoMapper]:` prefix. It supports `log`, `info`, `warn`, `error`, `debug`, `verbose`, `fatal`, and optional `trace` methods. ```ts const restore = AutoMapperLogger.configure({ error: (message, ...details) => appLogger.error({ message, details }), warn: () => undefined, }); restore(); // restore the previously active configuration AutoMapperLogger.reset(); // restore console-backed defaults ``` Configure logging as early as possible when you need to capture warnings emitted while decorators are evaluated. --- # Mappings and transformations Source: https://automapperts.netlify.app/fundamentals/mapping A `Mapping` is a unidirectional contract between source and destination identifiers. Create each direction explicitly: ```ts createMap(mapper, User, UserDto); createMap(mapper, UserDto, User); ``` Each source/destination pair is unique within a mapper. You can also create a [self mapping](/misc/self-mapping) by using one identifier. ## Destination-member transformations Mapping configuration defines how each destination path receives its value. Public member functions include: | Function | Purpose | | --- | --- | | `ignore()` | Leave a destination member unmapped | | `mapFrom()` | Select or resolve a value from the source | | `condition()` | Map only when a predicate succeeds | | `fromValue()` | Assign a fixed value | | `mapWith()` | Map a nested value with explicit model identifiers | | `convertUsing()` | Convert a selected source value with a reusable converter | | `nullSubstitution()` | Replace a `null` source value | | `undefinedSubstitution()` | Replace an `undefined` source value | | `mapWithArguments()` | Resolve a member using invocation-time arguments | | `mapDefer()` | Choose a member function at mapping time | `forMember()` associates one of these functions with a selected destination path: ```ts forMember( (destination) => destination.displayName, mapFrom((source) => `${source.firstName} ${source.lastName}`), ); ``` Use [mapping profiles](/fundamentals/mapping-profiles) to organize related mapping declarations and share configuration across them. --- # Mapping profiles Source: https://automapperts.netlify.app/fundamentals/mapping-profiles A `MappingProfile` groups mappings that belong to the same feature or domain. It is a function that receives a mapper and registers mappings with `createMap()`. ```ts const userProfile: MappingProfile = (mapper) => { createMap(mapper, Address, AddressDto); createMap(mapper, User, UserDto); createMap(mapper, User, UserSummaryDto); }; ``` Register the profile once during application startup: ```ts addProfile(mapper, userProfile); ``` ## Shared configuration Additional `addProfile()` arguments apply to every mapping created inside that profile: ```ts addProfile( mapper, userProfile, namingConventions(new CamelCaseNamingConvention()), extend(BaseEntity, BaseDto), ); ``` Keep profiles focused. Separate unrelated domains, and register profiles in dependency order when one profile relies on a nested mapping from another. NestJS applications can express profiles as injectable classes by extending [`AutomapperProfile`](/nestjs#profiles). --- # Mutation Source: https://automapperts.netlify.app/fundamentals/mutation Mapping creates a destination object; mutation applies the same mapping instructions to an object you provide. ```ts const dto = mapper.map(user, User, UserDto); const existingDto = new UserDto(); mapper.mutate(user, existingDto, User, UserDto); ``` Mutation methods return `void` because the supplied destination is updated in place: | Create destination | Mutate destination | | --- | --- | | `map()` | `mutate()` | | `mapAsync()` | `mutateAsync()` | | `mapArray()` | `mutateArray()` | | `mapArrayAsync()` | `mutateArrayAsync()` | Use the async variants when member resolvers or mapping callbacks return promises. ```ts await mapper.mutateAsync(user, existingDto, User, UserDto); await mapper.mutateArrayAsync(users, existingDtos, User, UserDto); ``` --- # Naming conventions Source: https://automapperts.netlify.app/fundamentals/naming-convention Naming conventions let AutoMapper compare differently cased property names and enable auto-flattening. AutoMapper includes: - `CamelCaseNamingConvention`; - `PascalCaseNamingConvention`; - `SnakeCaseNamingConvention`. No convention is enabled by default. ## Mapper-wide convention ```ts const mapper = createMapper({ strategyInitializer: classes(), namingConventions: new CamelCaseNamingConvention(), }); ``` ## Mapping or profile convention ```ts createMap( mapper, User, UserDto, namingConventions(new CamelCaseNamingConvention()), ); addProfile( mapper, userProfile, namingConventions(new CamelCaseNamingConvention()), ); ``` ## Different source and destination conventions ```ts const mapper = createMapper({ strategyInitializer: classes(), namingConventions: { source: new PascalCaseNamingConvention(), destination: new CamelCaseNamingConvention(), }, }); ``` ## Auto-flattening Auto-flattening matches a destination name against a path through the source model. The configured naming convention determines how the destination name is split. ```ts class Customer { @AutoMap() name!: string; } class Order { @AutoMap(() => Customer) customer!: Customer; @AutoMap() total!: number; } class OrderDto { @AutoMap() customerName!: string; @AutoMap() total!: number; } ``` With camel case enabled, `customerName` splits into `customer` and `name`, so it maps from `order.customer.name`: ```ts const mapper = createMapper({ strategyInitializer: classes(), namingConventions: new CamelCaseNamingConvention(), }); createMap(mapper, Order, OrderDto); const dto = mapper.map(order, Order, OrderDto); // { customerName: 'Chau Tran', total: 50 } ``` Use `forMember()` with `mapFrom()` when a flattened name is ambiguous or does not follow the configured convention. --- # Installation Source: https://automapperts.netlify.app/getting-started/installation :::warning AutoMapper 9 requires Node.js 20 or later and is ESM-only. Your application must be able to consume ES modules. ::: ## Choose a strategy Install `@automapper/core` and one strategy. **npm** ```shell # Classes npm install @automapper/core @automapper/classes reflect-metadata # POJOs npm install @automapper/core @automapper/pojos # MikroORM npm install @automapper/core @automapper/classes @automapper/mikro reflect-metadata # Sequelize npm install @automapper/core @automapper/classes @automapper/sequelize reflect-metadata ``` **pnpm** ```shell # Classes pnpm add @automapper/core @automapper/classes reflect-metadata # POJOs pnpm add @automapper/core @automapper/pojos # MikroORM pnpm add @automapper/core @automapper/classes @automapper/mikro reflect-metadata # Sequelize pnpm add @automapper/core @automapper/classes @automapper/sequelize reflect-metadata ``` **Bun** ```shell # Classes bun add @automapper/core @automapper/classes reflect-metadata # POJOs bun add @automapper/core @automapper/pojos # MikroORM bun add @automapper/core @automapper/classes @automapper/mikro reflect-metadata # Sequelize bun add @automapper/core @automapper/classes @automapper/sequelize reflect-metadata ``` :::tip Using NestJS? If you're using NestJS, install your strategy above, then follow the [NestJS integration guide](/nestjs) to add `@automapper/nestjs` and register AutoMapper in your application. ::: ## Configure class metadata The classes-based strategies use decorators and emitted design metadata: ```json title="tsconfig.json" { "compilerOptions": { "experimentalDecorators": true, "emitDecoratorMetadata": true } } ``` Import `reflect-metadata` once, before decorated models are evaluated: ```ts title="main.ts" import "reflect-metadata"; ``` ## ESM setup For Node.js applications, use an ESM-compatible package configuration and TypeScript module resolution. For example: ```json title="package.json" { "type": "module" } ``` Your framework or bundler may provide its own ESM configuration. The important requirement is that it does not attempt to load AutoMapper packages with CommonJS `require()`. --- # Migrating to AutoMapper 8 Source: https://automapperts.netlify.app/getting-started/migrate-v8 Version 8 replaced the fluent API with standalone mapping-configuration functions and renamed mapping plugins to strategies. If you are upgrading from v7 or earlier, make these changes before applying the [v9 migration](/getting-started/migrate-v9). ## Mapper and strategy ```ts // v7 const mapper = createMapper({ name: 'default', pluginInitializer: classes, }); // v8+ const mapper = createMapper({ strategyInitializer: classes(), }); ``` All official strategy initializers are invoked: `classes()`, `pojos()`, `mikro()`, and `sequelize()`. ## Mapping declarations `createMap()` and configuration methods became standalone functions: ```ts // v7 mapper .createMap(User, UserDto) .forMember((destination) => destination.name, mapFrom((source) => source.fullName)); // v8+ createMap( mapper, User, UserDto, forMember( (destination) => destination.name, mapFrom((source) => source.fullName), ), ); ``` The model identifier order is source then destination: ```ts mapper.map(user, User, UserDto); ``` ## Profiles and mutation Use standalone `addProfile()` and the dedicated mutation methods: ```ts addProfile(mapper, userProfile); mapper.mutate(user, existingDto, User, UserDto); mapper.mutateArray(users, existingDtos, User, UserDto); ``` ## Metadata changes - `@AutoMap({ typeFn: () => User })` became `@AutoMap(() => User)`. - Arrays must identify their element type with `@AutoMap(() => [User])`. - POJO metadata is registered through `PojosMetadataMap.create()`. - `PojosMetadataMap.reset()` clears registered POJO metadata for tests. See the current [classes strategy](/strategies/classes) and [POJOs strategy](/strategies/pojos) guides for supported syntax. --- # Migrating to AutoMapper 9 Source: https://automapperts.netlify.app/getting-started/migrate-v9 AutoMapper 9 modernizes the runtime and makes asynchronous mapping real. Most mapping declarations remain source-compatible, but the environment, async behavior, and several public contracts changed. ## Upgrade checklist 1. Upgrade the application to Node.js 20 or later. 2. Ensure the application can consume ESM-only packages. 3. Upgrade all `@automapper/*` packages together. 4. For NestJS, use version 10 or 11. 5. For MikroORM, use version 6. 6. Replace workarounds built around the old "fake async" behavior. 7. Update error and logger integrations to use the new typed contracts. ## Node.js and modules Every published package now declares Node.js `>=20.0.0` and uses explicit ESM exports. CommonJS-only consumers must migrate their runtime or add an ESM-compatible build boundary. ```json title="package.json" { "type": "module" } ``` ## Asynchronous mapping In v8, `mapAsync()` deferred a synchronous map operation. It did not resolve promises returned by member selectors or mapping callbacks. In v9, these APIs collect and await asynchronous work: - `mapAsync()` and `mapArrayAsync()`; - `mutateAsync()` and `mutateArrayAsync()`; - `mapFrom()` selectors and resolvers; - `mapWithArguments()` selectors and resolvers; - `beforeMap()` and `afterMap()` callbacks. ```ts createMap( mapper, User, UserDto, forMember( (destination) => destination.displayName, mapFrom(async (source) => loadDisplayName(source.id)), ), afterMap(async (_, destination) => { destination.permissions = await loadPermissions(destination.id); }), ); const dto = await mapper.mapAsync(user, User, UserDto); ``` Calling synchronous `map()` or `mapArray()` when a member returns a promise now throws and tells you to use the async API. This prevents promises from being assigned silently to destination members. `MapInterceptor` and `MapPipe` from `@automapper/nestjs` now support both synchronous and asynchronous mappings. NestJS applications can use asynchronous members and callbacks with either helper without mapping explicitly in a controller or service. ## Array-wide callbacks Version 9 adds `beforeMapArray()` and `afterMapArray()` for work that belongs to a whole collection rather than an individual mapped object: ```ts createMap( mapper, User, UserDto, beforeMapArray(async (users) => { await preloadUsers(users.map((user) => user.id)); }), afterMapArray((_, destinations) => { destinations.sort((a, b) => a.name.localeCompare(b.name)); }), ); const dtos = await mapper.mapArrayAsync(users, User, UserDto); ``` The callbacks may be synchronous. Use `mapArrayAsync()` when either callback or an element mapping returns a promise. ## Typed errors Mapper failures now use exported error classes: - `AutoMapperError` is the base class; - `MappingNotFoundError` includes `sourceName` and `destinationName`; - `MapMemberError` includes `memberPath`, `destinationName`, and `originalError`. ```ts import { AutoMapperError, MapMemberError } from "@automapper/core"; try { await mapper.mapAsync(user, User, UserDto); } catch (error) { if (error instanceof MapMemberError) { reportMemberFailure(error.memberPath, error.originalError); } else if (error instanceof AutoMapperError) { reportMappingFailure(error); } } ``` Custom `ErrorHandler.handle` implementations now receive `unknown`, so narrow the value before reading error-specific fields. ## Logger configuration `AutoMapperLogger` now supports `log`, `info`, `warn`, `error`, `debug`, `verbose`, `fatal`, and optional `trace` methods. `configure()` can be called more than once and returns a restore function. ```ts const restore = AutoMapperLogger.configure({ warn: (message, ...details) => appLogger.warn({ message, details }), trace: (message, ...details) => appLogger.trace({ message, details }), }); // Restore the logger that was active before this configuration. restore(); // Or restore AutoMapper's console-backed defaults. AutoMapperLogger.reset(); ``` Unspecified methods retain their default implementations. To silence a level, provide a no-op function. ```ts AutoMapperLogger.configure({ warn: () => undefined }); ``` Configure the logger before decorators and mapping profiles are evaluated if you need to capture metadata warnings. ## Broader class identifiers Class metadata can now use abstract classes and classes with non-public constructors as runtime identifiers. This mainly improves compatibility with framework and domain-model patterns; existing public constructors continue to work. ## Integration versions | Integration | v9 support | | ------------------ | --------------------- | | Node.js | 20 and later | | NestJS | 10 or 11 | | MikroORM | 6 | | Sequelize | 6 | | `reflect-metadata` | `^0.1.14` or `^0.2.0` | ## What did not change The central workflow is unchanged: create a mapper with a strategy, register mappings with `createMap()`, then call `map()`, `mapArray()`, or their async variants. Existing mapping configurations remain available. --- # Overview Source: https://automapperts.netlify.app/getting-started/overview ## What AutoMapper does AutoMapper maps one object shape to another by convention. When source and destination models use matching property names and compatible metadata, the mapper can copy values without per-property configuration. Use mapping configuration only for the differences: computed values, renamed members, conversions, conditions, or nested types that cannot be inferred. ## When it fits AutoMapper is most useful when: - destination types are mostly subsets or projections of source types; - property names follow consistent conventions; - you repeatedly map domain, persistence, API, or view models; - central mapping profiles are easier to maintain than scattered constructors and object literals. If most destination members need custom business logic, explicit transformation code is usually clearer. ## How it is structured Every mapper combines `@automapper/core` with one mapping strategy: | Strategy | Use it for | | ------------- | ----------------------------------------------------------- | | `classes()` | TypeScript classes with `@AutoMap()` metadata | | `pojos()` | Interfaces, types, and plain objects with explicit metadata | | `mikro()` | MikroORM entities; extends the classes strategy | | `sequelize()` | Sequelize models; extends the classes strategy | The `@automapper/nestjs` package integrates a mapper with NestJS dependency injection, profiles, interceptors, and pipes. ## The basic flow ```ts import { classes } from "@automapper/classes"; import { createMap, createMapper } from "@automapper/core"; const mapper = createMapper({ strategyInitializer: classes() }); createMap(mapper, User, UserDto); const dto = mapper.map(user, User, UserDto); ``` ## Types follow the destination The destination identifier drives the result type across single, array, and asynchronous mapping. These types come from the TypeScript compiler; hover an identifier to inspect it in place. {/* prettier-ignore */} ```ts twoslash import type { Mapper } from "@automapper/core"; import { createMap } from "@automapper/core"; class User { firstName!: string; lastName!: string; } class UserDto { firstName!: string; lastName!: string; } declare const mapper: Mapper; declare const user: User; declare const users: User[]; // ---cut--- createMap(mapper, User, UserDto); const dto = mapper.map(user, User, UserDto); // ^? const dtos = mapper.mapArray(users, User, UserDto); // ^? const pending = mapper.mapAsync(user, User, UserDto); // ^? ``` Continue with [Installation](/getting-started/installation), or follow the [tutorial](/tutorial/preface) for a complete example. --- # afterMap Source: https://automapperts.netlify.app/mapping-configuration/after-map `afterMap()` runs after destination members have been assigned: ```ts createMap( mapper, User, UserDto, afterMap((source, destination) => { destination.label = `${destination.fullName} (${source.id})`; }), ); ``` An invocation-specific callback overrides the mapping callback: ```ts mapper.map(user, User, UserDto, { afterMap: (source, destination) => audit(source, destination), }); ``` ## Async callback In v9, `mapAsync()` waits for asynchronous members before `afterMap()` runs, then waits for the callback itself: ```ts createMap( mapper, User, UserDto, forMember( (destination) => destination.fullName, mapFrom(async (source) => loadDisplayName(source.id)), ), afterMap(async (_, destination) => { destination.permissions = await loadPermissions(destination.id); }), ); const dto = await mapper.mapAsync(user, User, UserDto); ``` ## Whole-array callback `afterMapArray()` runs once after all array elements have been mapped: ```ts createMap( mapper, User, UserDto, afterMapArray((_, destinations) => { destinations.sort((a, b) => a.fullName.localeCompare(b.fullName)); }), ); ``` Use `mapArrayAsync()` if the array callback returns a promise. --- # autoMap Source: https://automapperts.netlify.app/mapping-configuration/auto-map `autoMap()` adds a same-name property to a classes mapping without requiring `@AutoMap()` on the source and destination. ```ts class User { constructor( public readonly firstName: string, public readonly lastName: string, public readonly birthday: Date, ) {} } class UserDto { firstName!: string; lastName!: string; birthday!: string; fullName!: string; } createMap( mapper, User, UserDto, autoMap('firstName'), autoMap('lastName'), forMember( (destination) => destination.birthday, mapFrom((source) => source.birthday.toDateString()), ), forMember( (destination) => destination.fullName, mapFrom((source) => `${source.firstName} ${source.lastName}`), ), ); ``` Use strategy metadata for model-wide discovery. `autoMap()` is best for a small number of decoratorless members. --- # beforeMap Source: https://automapperts.netlify.app/mapping-configuration/before-map Configure a callback on the mapping: ```ts createMap( mapper, User, UserDto, beforeMap((source, destination) => { normalizeUser(source); }), ); ``` Or provide an invocation-specific callback through `MapOptions`: ```ts mapper.map(user, User, UserDto, { beforeMap: (source, destination) => normalizeUser(source), }); ``` The invocation callback takes precedence over mapping configuration. ## Async callback Callbacks may return promises when the async map API is used: ```ts createMap( mapper, User, UserDto, beforeMap(async (source) => hydrateUser(source)), ); const dto = await mapper.mapAsync(user, User, UserDto); ``` ## Whole-array callback `beforeMapArray()` runs once before array elements are mapped: ```ts createMap( mapper, User, UserDto, beforeMapArray(async (users) => preloadUsers(users)), ); const dtos = await mapper.mapArrayAsync(users, User, UserDto); ``` An invocation-level `beforeMap` passed to `mapArray()` or `mapArrayAsync()` also receives the source and destination arrays and overrides `beforeMapArray()`. --- # constructUsing Source: https://automapperts.netlify.app/mapping-configuration/construct-using Every strategy provides a default destination constructor. Use `constructUsing()` when one mapping needs a factory, dependency, or non-default constructor. ```ts createMap( mapper, User, UserDto, constructUsing((source, destinationIdentifier) => { return new UserDto(source.id); }), ); ``` The callback receives the source object and destination identifier. It must return the destination instance that AutoMapper will populate. For a one-off invocation, `MapOptions.destinationConstructor` can override destination construction without changing the registered mapping. --- # extend Source: https://automapperts.netlify.app/mapping-configuration/extend Create the base mapping first, then extend it by mapping value or model identifiers: ```ts const baseMapping = createMap(mapper, BaseEntity, BaseDto); createMap( mapper, User, UserDto, extend(baseMapping), forMember( (destination) => destination.name, mapFrom((source) => source.displayName), ), ); // Equivalent lookup form: createMap(mapper, Admin, AdminDto, extend(BaseEntity, BaseDto)); ``` Explicit member configuration on the new mapping is not overwritten by inherited configuration. Use `extend()` for structurally related models, not as a substitute for unrelated shared business logic. --- # condition Source: https://automapperts.netlify.app/mapping-configuration/for-member/condition ```ts forMember( (destination) => destination.petName, condition((source) => source.hasPet), ); ``` If the predicate is truthy, AutoMapper maps the conventionally matching source member. Otherwise the destination is `undefined`. Provide a default for the false branch: ```ts forMember( (destination) => destination.petName, condition((source) => source.hasPet, 'No pet'), ); ``` --- # convertUsing Source: https://automapperts.netlify.app/mapping-configuration/for-member/convert-using A converter packages synchronous conversion logic: ```ts const dateToString: Converter = { convert(source) { return source.toISOString(); }, }; forMember( (destination) => destination.birthday, convertUsing(dateToString, (source) => source.birthday), ); ``` Use a [type converter](/mapping-configuration/type-converters) when the same metadata conversion should apply to every matching property pair in a mapping. Use `convertUsing()` when one destination member needs it. --- # fromValue Source: https://automapperts.netlify.app/mapping-configuration/for-member/from-value ```ts forMember( (destination) => destination.status, fromValue('active'), ); ``` Objects are assigned as provided; `fromValue()` does not run them through a nested mapping. --- # ignore Source: https://automapperts.netlify.app/mapping-configuration/for-member/ignore ```ts createMap( mapper, User, UserDto, forMember((destination) => destination.internalNote, ignore()), ); ``` The destination value remains `undefined`, but the member counts as configured and is excluded from unmapped-property diagnostics. --- # mapDefer Source: https://automapperts.netlify.app/mapping-configuration/for-member/map-defer `mapDefer()` returns another member function after inspecting the source: ```ts forMember( (destination) => destination.profile, mapDefer((source) => { if (source.profile.type === 'business') { return mapWith(ProfileDto, BusinessProfile, (value) => value.profile); } return mapWith(ProfileDto, Profile, (value) => value.profile); }), ); ``` Register every nested mapping that the deferred branch can select. Prefer `condition()` or a direct `mapFrom()` when only the value changes and the mapping strategy does not. --- # mapFrom Source: https://automapperts.netlify.app/mapping-configuration/for-member/map-from ## Selector ```ts forMember( (destination) => destination.fullName, mapFrom((source) => `${source.firstName} ${source.lastName}`), ); ``` ## Reusable resolver A resolver receives the source and current destination and may return a value or promise: ```ts const taxResolver: Resolver = { resolve(source) { return source.type === 'A' ? source.price * 0.5 : source.price * 0.9; }, }; forMember((destination) => destination.tax, mapFrom(taxResolver)); ``` ## Async resolver ```ts forMember( (destination) => destination.ownerName, mapFrom(async (source) => loadOwnerName(source.ownerId)), ); const dto = await mapper.mapAsync(item, Item, ItemDto); ``` Synchronous `map()` and `mapArray()` reject promise-returning members. Use their async variants. --- # mapWith Source: https://automapperts.netlify.app/mapping-configuration/for-member/map-with Use `mapWith()` when nested metadata cannot identify the mapping automatically or the source and destination member names differ. ```ts forMember( (destination) => destination.profile, mapWith(ProfileDto, Profile, (source) => source.originalProfile), ); ``` Its arguments are: 1. the nested destination identifier; 2. the nested source identifier; 3. a selector for the nested source value. The corresponding `Profile` to `ProfileDto` mapping must already be registered. --- # mapWithArguments Source: https://automapperts.netlify.app/mapping-configuration/for-member/map-with-arguments Define the member resolver: ```ts forMember( (destination) => destination.tax, mapWithArguments((source, extraArguments) => { const percentage = extraArguments.percentage as number; return source.price * percentage; }), ); ``` Supply arguments through `MapOptions.extraArgs`: ```ts const dto = mapper.map(item, Item, ItemDto, { extraArgs: () => ({ percentage: 0.5 }), }); ``` The resolver may also be an object implementing `Resolver`. In v9, selectors and resolvers may return promises when you call `mapAsync()` or `mapArrayAsync()`: ```ts const dto = await mapper.mapAsync(item, Item, ItemDto, { extraArgs: () => ({ region: 'us-east' }), }); ``` --- # nullSubstitution Source: https://automapperts.netlify.app/mapping-configuration/for-member/null-substitution ```ts forMember( (destination) => destination.fullName, nullSubstitution('Unknown user'), ); ``` Only `null` is substituted. An `undefined` value is unchanged; use `undefinedSubstitution()` for that case. Object substitutions are assigned as provided without nested mapping. --- # forMember Source: https://automapperts.netlify.app/mapping-configuration/for-member/overview `forMember()` targets one destination member and assigns its transformation: The callbacks are contextually typed from the source and destination passed to `createMap()`. {/* prettier-ignore */} ```ts twoslash import type { Mapper } from "@automapper/core"; import { createMap, forMember, mapFrom } from "@automapper/core"; declare const mapper: Mapper; class User { firstName!: string; lastName!: string; } class UserDto { fullName!: string; } // ---cut--- createMap( mapper, User, UserDto, forMember( (destination) => destination.fullName, // ^? mapFrom((source) => `${source.firstName} ${source.lastName}`), // ^? ), ); ``` The destination selector is strongly typed. The second argument determines how AutoMapper produces that value. ## Precondition Add `preCondition()` before the member function to skip its work unless a source predicate succeeds. An optional default is assigned when the predicate fails. ```ts forMember( (destination) => destination.fullName, preCondition((source) => source.visible, "Hidden user"), mapFrom((source) => `${source.firstName} ${source.lastName}`), ); ``` Use custom members for exceptions to convention. If almost every destination path needs one, an explicit transformation may be easier to understand. --- # undefinedSubstitution Source: https://automapperts.netlify.app/mapping-configuration/for-member/undefined-substitution ```ts forMember( (destination) => destination.fullName, undefinedSubstitution('Unknown user'), ); ``` Only `undefined` is substituted. A `null` value is unchanged; use `nullSubstitution()` for that case. Object substitutions are assigned as provided without nested mapping. --- # forSelf Source: https://automapperts.netlify.app/mapping-configuration/for-self Auto-flattening maps `item.name` to `itemName`. Use `forSelf()` when the destination intentionally omits that prefix: ```ts class CartItemDto { @AutoMap() name!: string; @AutoMap() price!: number; @AutoMap() quantity!: number; } createMap( mapper, CartItem, CartItemDto, forSelf(Item, (source) => source.item), ); ``` `forSelf()` creates or reuses mapping information from the nested `Item` model to the destination, then selects the nested source value at runtime. You can provide an existing mapping instead of the nested source identifier: ```ts const itemMapping = createMap(mapper, Item, CartItemDto); createMap( mapper, CartItem, CartItemDto, forSelf(itemMapping, (source) => source.item), ); ``` --- # namingConventions Source: https://automapperts.netlify.app/mapping-configuration/naming-conventions ```ts createMap( mapper, User, UserDto, namingConventions(new CamelCaseNamingConvention()), ); ``` Use separate conventions when the source and destination differ: ```ts createMap( mapper, ProductRow, ProductDto, namingConventions({ source: new SnakeCaseNamingConvention(), destination: new CamelCaseNamingConvention(), }), ); ``` Mapping-level configuration overrides the convention supplied to `createMapper()` or `addProfile()`. See [Naming conventions](/fundamentals/naming-convention) for mapper- and profile-level examples. --- # Mapping configuration Source: https://automapperts.netlify.app/mapping-configuration/overview Matching metadata maps by convention. Nested values also map automatically when their source and destination mapping is registered. ```ts createMap(mapper, Address, AddressDto); createMap(mapper, User, UserDto); ``` Pass configuration functions after the destination identifier when a mapping differs from convention: ```ts createMap( mapper, User, UserDto, forMember( (destination) => destination.fullName, mapFrom((source) => `${source.firstName} ${source.lastName}`), ), namingConventions(new CamelCaseNamingConvention()), ); ``` ## Available configuration | Function | Purpose | | --- | --- | | `autoMap()` | Explicitly map a same-name property without decorator metadata | | `beforeMap()` / `afterMap()` | Run a callback around each object mapping | | `beforeMapArray()` / `afterMapArray()` | Run a callback around a whole array mapping | | `constructUsing()` | Construct the destination with a mapping-specific factory | | `extend()` | Reuse member configuration from another mapping | | `forMember()` | Configure one destination path | | `forSelf()` | Map matching destination members from a nested source object | | `namingConventions()` | Override naming conventions for this mapping | | `typeConverter()` | Convert every matching pair of source and destination metadata types | :::tip Convention should still do most of the work. A mapping dominated by custom configuration is often clearer as explicit transformation code. ::: --- # typeConverter Source: https://automapperts.netlify.app/mapping-configuration/type-converters JavaScript permits a value to be assigned even when TypeScript metadata differs. A type converter makes the conversion explicit for every matching property pair in one mapping. ```ts createMap( mapper, Source, Destination, typeConverter(String, Number, (value) => Number.parseInt(value, 10)), typeConverter(String, Date, (value) => new Date(value)), typeConverter(String, Boolean, (value) => value === 'true'), ); ``` ```ts const destination = mapper.map(source, Source, Destination); ``` Converters support four metadata shapes: - `Type` to `Type`; - `Type` to `[Type]`; - `[Type]` to `Type`; - `[Type]` to `[Type]`. ```ts typeConverter([String], [Number], (values) => values.map((value) => Number.parseInt(value, 10)), ); ``` :::warning A type-converted member is treated as the converter's result and does not continue through automatic nested mapping. Use a nested mapping or `mapWith()` when object structure should be mapped recursively. ::: Use [`convertUsing()`](/mapping-configuration/for-member/convert-using) when the conversion should apply to one destination member instead of every matching metadata pair. --- # Async mapping Source: https://automapperts.netlify.app/misc/async-mapping AutoMapper 9 provides genuine asynchronous mapping. Async APIs wait for promises returned by supported member resolvers and mapping callbacks before returning the destination. ## Async members `mapFrom()` and `mapWithArguments()` selectors or resolvers may return promises: ```ts createMap( mapper, User, UserDto, forMember( (destination) => destination.displayName, mapFrom(async (source) => loadDisplayName(source.id)), ), ); const dto = await mapper.mapAsync(user, User, UserDto); ``` Async nested work is collected in the active mapping context, so `afterMap()` sees resolved destination members. ## Async callbacks ```ts createMap( mapper, User, UserDto, beforeMap(async (source) => hydrateUser(source)), afterMap(async (_, destination) => auditDestination(destination)), ); ``` For arrays, use `beforeMapArray()` and `afterMapArray()` for work that should run once around the collection. `mapArrayAsync()` waits for those callbacks and each element's async work. ## Choose the correct API | Create destination | Mutate destination | | ------------------ | -------------------- | | `mapAsync()` | `mutateAsync()` | | `mapArrayAsync()` | `mutateArrayAsync()` | Synchronous `map()` or `mapArray()` throws if a member resolver returns a promise. This prevents unresolved promises from leaking into destination properties. ## NestJS integration `MapInterceptor` and `MapPipe` from `@automapper/nestjs` support both synchronous and asynchronous mappings. They wait for asynchronous members and callbacks automatically, including array mappings configured with `isArray: true`. Mapping errors are not replaced with the original response or request value. They propagate through Nest's normal exception handling. ## What async mapping does not do Mapping still runs in the current JavaScript thread. Async APIs coordinate promise-returning application work; they do not move CPU-intensive mapping to a worker. Avoid using mapping callbacks for unrelated orchestration or heavy business logic. --- # Mapped types Source: https://automapperts.netlify.app/misc/mapped-types Import mapped-type helpers from `@automapper/classes/mapped-types`. ## Pick properties ```ts class UserSummary extends MapperPickType(User, [ "id", "displayName", ] as const) {} createMap(mapper, User, UserSummary); ``` ## Omit properties `MapperOmitType()` removes omitted members from both AutoMapper metadata and the derived TypeScript type. The diagnostic below is generated by TypeScript. {/* prettier-ignore */} ```ts twoslash // @errors: 2339 import { MapperOmitType } from "@automapper/classes/mapped-types"; import type { Mapper } from "@automapper/core"; import { createMap } from "@automapper/core"; class User { id!: string; displayName!: string; passwordHash!: string; internalNotes!: string; } declare const mapper: Mapper; // ---cut--- class PublicUser extends MapperOmitType(User, [ "passwordHash", "internalNotes", ] as const) {} createMap(mapper, User, PublicUser); declare const publicUser: PublicUser; publicUser.displayName; // ^? publicUser.passwordHash; ``` ## Intersect classes ```ts class AuditedUser extends MapperIntersectionType(User, AuditFields) {} ``` The helpers inherit property initializers and AutoMapper metadata from their input classes. `MapperIntersectionType` combines metadata but does not add a "multiple source objects" map operation; the resulting class is still one model identifier. --- # Self mapping Source: https://automapperts.netlify.app/misc/self-mapping Self mappings are useful when nested values keep the same runtime type but still need cloning or member configuration. ```ts class Person { @AutoMap() name!: string; @AutoMap() nickname?: string; } createMap( mapper, Person, forMember( (destination) => destination.nickname, mapFrom((source) => source.nickname ?? source.name), ), ); ``` The short form above is equivalent to `createMap(mapper, Person, Person, ...)`. Map one object or array with the same shorthand: ```ts const clone = mapper.map(person, Person); const clones = mapper.mapArray(people, Person); ``` If a parent mapping contains `Person` on both source and destination metadata, the registered self mapping can be used for that nested value. --- # Transformer plugin Source: https://automapperts.netlify.app/misc/transformer-plugin `@automapper/classes/transformer-plugin` is a public subpath of `@automapper/classes`. It uses a TypeScript `before` transformer to add `__AUTOMAPPER_METADATA_FACTORY__()` methods to model classes. The default model suffixes are `.entity.ts`, `.model.ts`, `.vm.ts`, and `.dto.ts`. Override them with `modelFileNameSuffix`. ```ts export interface AutomapperTransformerPluginOptions { modelFileNameSuffix?: string[]; } ``` ## Ignore one property The plugin generates metadata for matching model properties unless they already use `@AutoMap()`. Add `@autoMapIgnore` when a property should have no generated metadata: ```ts class UserDto { firstName!: string; /** @autoMapIgnore */ internalState!: string; } ``` ## NestJS CLI ```json title="nest-cli.json" { "compilerOptions": { "plugins": [ { "name": "@automapper/classes/transformer-plugin", "options": { "modelFileNameSuffix": [".entity.ts", ".dto.ts"] } } ] } } ``` ## Nx executors Nx TypeScript and webpack executors that expose a `transformers` option can load the same plugin: ```json { "transformers": [ { "name": "@automapper/classes/transformer-plugin", "options": { "modelFileNameSuffix": [".dto.ts"] } } ] } ``` ## Direct compiler integrations Webpack `ts-loader`, Rollup TypeScript integrations, and `ts-patch` can install the exported transformer directly. With `ts-patch`, use its `tspBefore` export: ```json { "compilerOptions": { "plugins": [ { "transform": "@automapper/classes/transformer-plugin", "import": "tspBefore" } ] } } ``` :::warning TypeScript's transformer API is not stable across compiler releases. Verify generated metadata after TypeScript or build-tool upgrades. Complex unions and multidimensional arrays should use explicit `@AutoMap()` metadata or `forMember()` configuration. ::: --- # NestJS integration Source: https://automapperts.netlify.app/nestjs `@automapper/nestjs` provides a global module and NestJS-specific mapping helpers. The classes strategy is the usual choice for decorated DTOs and entities. **npm** ```shell npm install @automapper/core @automapper/classes @automapper/nestjs reflect-metadata ``` **pnpm** ```shell pnpm add @automapper/core @automapper/classes @automapper/nestjs reflect-metadata ``` **Bun** ```shell bun add @automapper/core @automapper/classes @automapper/nestjs reflect-metadata ``` ## Register a mapper ```ts import { classes } from "@automapper/classes"; import { AutomapperModule } from "@automapper/nestjs"; import { Module } from "@nestjs/common"; @Module({ imports: [ AutomapperModule.forRoot({ strategyInitializer: classes(), }), ], }) export class AppModule {} ``` The module is global, so import it once at the application root. ## Inject the mapper ```ts @Injectable() export class UserService { constructor(@InjectMapper() private readonly mapper: Mapper) {} toDto(user: User): UserDto { return this.mapper.map(user, User, UserDto); } } ``` For multiple strategies, name each mapper and pass the same name to `@InjectMapper()`: ```ts AutomapperModule.forRoot( [ { name: 'classes', strategyInitializer: classes() }, { name: 'pojos', strategyInitializer: pojos() }, ], { globalErrorHandler, globalNamingConventions: new CamelCaseNamingConvention(), }, ); constructor(@InjectMapper('classes') private readonly mapper: Mapper) {} ``` Mapper-specific options take precedence over global options. ## Async module configuration `forRootAsync()` supports `useFactory`, `useClass`, or `useExisting`: ```ts AutomapperModule.forRootAsync({ imports: [PersistenceModule], inject: [EntityManager], useFactory: (entityManager: EntityManager) => ({ strategyInitializer: classes({ destinationConstructor: (_, destinationIdentifier) => entityManager.create(destinationIdentifier, {}), }), }), }); ``` Class and existing providers implement `AutomapperOptionsFactory.createAutomapperOptions()`. ## Profiles ```ts @Injectable() export class UserProfile extends AutomapperProfile { constructor(@InjectMapper() mapper: Mapper) { super(mapper); } override get profile(): MappingProfile { return (mapper) => { createMap(mapper, User, UserDto); createMap(mapper, User, UserSummaryDto); }; } protected override get mappingConfigurations(): MappingConfiguration[] { return [extend(BaseEntity, BaseDto)]; } } ``` Add the profile class to a module's `providers`. `mappingConfigurations` applies to every `createMap()` in the profile. ## Response interceptor ```ts @Get('me') @UseInterceptors(MapInterceptor(User, UserDto)) me(): Promise { return this.userService.getMe(); } ``` For arrays or named mappers: ```ts MapInterceptor(User, UserDto, { isArray: true, mapperName: "classes", }); ``` ## Request pipe `MapPipe` transforms `@Body()` or `@Query()` values: ```ts @Post() create(@Body(MapPipe(CreateUserDto, User)) user: User) { return this.userService.create(user); } ``` Request data is already serialized, so configure conversions for values such as dates and numbers. :::note Async mappings `MapInterceptor` and `MapPipe` support both synchronous and asynchronous mappings, including arrays. They wait for asynchronous member resolvers and mapping callbacks before passing the mapped value onward. Mapping failures propagate through Nest's normal exception handling. ::: --- # Classes strategy Source: https://automapperts.netlify.app/strategies/classes `@automapper/classes` maps TypeScript and JavaScript classes. It reads metadata created by `@AutoMap()` or the optional [transformer plugin](/misc/transformer-plugin). **npm** ```shell npm install @automapper/core @automapper/classes reflect-metadata ``` **pnpm** ```shell pnpm add @automapper/core @automapper/classes reflect-metadata ``` **Bun** ```shell bun add @automapper/core @automapper/classes reflect-metadata ``` ```ts import 'reflect-metadata'; import { AutoMap, classes } from '@automapper/classes'; import { createMapper } from '@automapper/core'; const mapper = createMapper({ strategyInitializer: classes() }); ``` ## AutoMap metadata Use `@AutoMap()` when emitted design metadata identifies a primitive or `Date`. Supply an explicit callback for nested models, arrays, enums, unions, and ambiguous types. ```ts enum Role { Admin = 'admin', User = 'user', } class User { @AutoMap() name!: string; @AutoMap(() => String) role!: Role; @AutoMap(() => Profile) profile!: Profile; @AutoMap(() => [Date]) logins!: Date[]; } ``` Array metadata wraps the element identifier in an array: `() => [Profile]`. ## Circular models Nested metadata defaults to depth `1`. Use the options form when a circular relationship should traverse further: ```ts class User { @AutoMap({ type: () => Organization, depth: 2 }) organization!: Organization; } ``` Keep depth bounded so circular graphs terminate. ## Class identifiers in v9 Abstract classes and classes with non-public constructors can be used as runtime identifiers. If such a destination cannot be instantiated by the default strategy, provide `constructUsing()` for that mapping or a custom `destinationConstructor` in the strategy options. ## Decoratorless options - Use [`autoMap()`](/mapping-configuration/auto-map) for a few same-name members. - Use the [transformer plugin](/misc/transformer-plugin) to emit metadata for whole model files. - Use [mapped types](/misc/mapped-types) to derive pick, omit, and intersection classes while retaining metadata. --- # MikroORM strategy Source: https://automapperts.netlify.app/strategies/mikro `@automapper/mikro` extends the classes strategy for MikroORM 6. **npm** ```shell npm install @automapper/core @automapper/classes @automapper/mikro reflect-metadata ``` **pnpm** ```shell pnpm add @automapper/core @automapper/classes @automapper/mikro reflect-metadata ``` **Bun** ```shell bun add @automapper/core @automapper/classes @automapper/mikro reflect-metadata ``` ```ts const mapper = createMapper({ strategyInitializer: mikro(), }); ``` Use `@AutoMap()` metadata and register mappings exactly as with `classes()`. The default `preMap` recursively serializes MikroORM entities, references, and collections before member mapping begins. Override strategy behavior when your entity lifecycle needs it: ```ts const mapper = createMapper({ strategyInitializer: mikro({ preMap: (source, mapping) => customSerialize(source, mapping), destinationConstructor: (_, destinationIdentifier) => entityManager.create(destinationIdentifier, {}), }), }); ``` Supplying `preMap` replaces MikroORM's default serialization hook, so the custom implementation is responsible for producing a mappable source shape. --- # POJOs strategy Source: https://automapperts.netlify.app/strategies/pojos TypeScript interfaces do not exist at runtime. `@automapper/pojos` associates their property metadata with string or symbol identifiers. **npm** ```shell npm install @automapper/core @automapper/pojos ``` **pnpm** ```shell pnpm add @automapper/core @automapper/pojos ``` **Bun** ```shell bun add @automapper/core @automapper/pojos ``` ## Register metadata Metadata must be registered before `createMap()`: ```ts interface User { firstName: string; lastName: string; } interface UserDto { firstName: string; lastName: string; fullName: string; } PojosMetadataMap.create('User', { firstName: String, lastName: String, }); PojosMetadataMap.create('UserDto', { firstName: String, lastName: String, fullName: String, }); const mapper = createMapper({ strategyInitializer: pojos() }); createMap( mapper, 'User', 'UserDto', forMember( (destination) => destination.fullName, mapFrom((source) => `${source.firstName} ${source.lastName}`), ), ); const dto = mapper.map(user, 'User', 'UserDto'); ``` The generic on `PojosMetadataMap.create()` checks metadata keys against the interface. ## Nested and array metadata Register nested identifiers before their parent: ```ts PojosMetadataMap.create
('Address', { street: String, }); PojosMetadataMap.create('User', { name: String, address: 'Address', previousAddresses: ['Address'], logins: [Date], }); ``` String identifiers are normalized to global symbols internally. You may provide symbols directly when global string identity is undesirable. ## Circular depth ```ts PojosMetadataMap.create('User', { organization: { type: 'Organization', depth: 2 }, }); ``` The default depth is `1`. ## Reset metadata `PojosMetadataMap` is process-wide. Reset it when tests need isolated metadata registration: ```ts afterEach(() => PojosMetadataMap.reset()); ``` --- # Sequelize strategy Source: https://automapperts.netlify.app/strategies/sequelize `@automapper/sequelize` extends the classes strategy for Sequelize 6. **npm** ```shell npm install @automapper/core @automapper/classes @automapper/sequelize reflect-metadata ``` **pnpm** ```shell pnpm add @automapper/core @automapper/classes @automapper/sequelize reflect-metadata ``` **Bun** ```shell bun add @automapper/core @automapper/classes @automapper/sequelize reflect-metadata ``` ```ts const mapper = createMapper({ strategyInitializer: sequelize(), }); ``` The default strategy behavior: - calls `Model#get()` when the source is a Sequelize model; - calls the destination model's static `build()` method when available; - falls back to normal class construction for non-Sequelize destinations. Override either hook when needed: ```ts const mapper = createMapper({ strategyInitializer: sequelize({ preMap: (source) => customSerialize(source), destinationConstructor: (_, destinationIdentifier) => customConstruct(destinationIdentifier), }), }); ``` --- # Create a mapper Source: https://automapperts.netlify.app/tutorial/create-mapper ## Install the packages **npm** ```shell npm install @automapper/core @automapper/classes reflect-metadata ``` **pnpm** ```shell pnpm add @automapper/core @automapper/classes reflect-metadata ``` **Bun** ```shell bun add @automapper/core @automapper/classes reflect-metadata ``` Enable `experimentalDecorators` and `emitDecoratorMetadata` in `tsconfig.json`, then import `reflect-metadata` before decorated classes are evaluated. ## Create one mapper ```ts title="src/mappings/mapper.ts" import { classes } from '@automapper/classes'; import { createMapper } from '@automapper/core'; export const mapper = createMapper({ strategyInitializer: classes(), }); ``` A typical application keeps one mapper per strategy. Mappings registered on that mapper are reused by every map operation. ## Describe class metadata Decorate properties that participate in mapping. Give nested classes an explicit type callback and omit sensitive properties that should not be mapped by convention. **user.ts** ```ts import { AutoMap } from '@automapper/classes'; export class User { @AutoMap() firstName!: string; @AutoMap() lastName!: string; @AutoMap() username!: string; password!: string; @AutoMap(() => Bio) bio!: Bio; } export class Bio { @AutoMap(() => Job) job!: Job; @AutoMap() birthday!: Date; @AutoMap() avatarUrl!: string; } export class Job { @AutoMap() title!: string; @AutoMap() salary!: number; } ``` **user.dto.ts** ```ts import { AutoMap } from '@automapper/classes'; export class UserDto { @AutoMap() firstName!: string; @AutoMap() lastName!: string; @AutoMap() fullName!: string; @AutoMap() username!: string; @AutoMap(() => BioDto) bio!: BioDto; } export class BioDto { @AutoMap() jobTitle!: string; @AutoMap() jobSalary!: number; @AutoMap() birthday!: string; @AutoMap() avatarUrl!: string; } ``` The classes strategy can infer primitive design types. Nested models and arrays should use explicit callbacks such as `@AutoMap(() => Bio)` and `@AutoMap(() => [User])`. --- # Create mappings Source: https://automapperts.netlify.app/tutorial/create-mapping Create mappings once during application startup. Register a nested mapping before a mapping that depends on it. ```ts title="src/mappings/register.ts" import { createMap } from '@automapper/core'; import { mapper } from './mapper'; import { Bio, User } from '../models/user'; import { BioDto, UserDto } from '../models/user.dto'; createMap(mapper, Bio, BioDto); createMap(mapper, User, UserDto); ``` `createMap(mapper, Source, Destination)` registers and returns a unidirectional mapping. Register the reverse direction separately if you need it. ## Execute the mapping ```ts const dto = mapper.map(user, User, UserDto); ``` Matching metadata maps automatically: - `firstName`, `lastName`, and `username` copy by name; - `password` is not part of destination metadata; - `bio` uses the registered `Bio` to `BioDto` mapping. Three differences remain: - `fullName` is computed; - `birthday` changes from `Date` to `string`; - `jobTitle` and `jobSalary` flatten values from `job`. The next page configures those differences. --- # Configure the differences Source: https://automapperts.netlify.app/tutorial/mapping-configurations ## Compute `fullName` Use `forMember()` to target one destination member and `mapFrom()` to select or compute its value. ```ts createMap( mapper, User, UserDto, forMember( (destination) => destination.fullName, mapFrom((source) => `${source.firstName} ${source.lastName}`), ), ); ``` ## Convert `birthday` A type converter applies to every matching source and destination member pair in that mapping. ```ts createMap( mapper, Bio, BioDto, typeConverter(Date, String, (date) => date.toDateString()), ); ``` Use `forMember()` instead when only one destination member should use the conversion. ## Flatten `job` Auto-flattening splits destination names according to a configured naming convention. With camel case enabled, `jobTitle` can match `job.title` and `jobSalary` can match `job.salary`. ```ts createMap( mapper, Bio, BioDto, typeConverter(Date, String, (date) => date.toDateString()), namingConventions(new CamelCaseNamingConvention()), ); ``` The completed mapping returns a DTO with copied, computed, converted, nested, and flattened members while keeping the source and destination classes independent. ## Async values In v9, `mapFrom()` may return a promise when you call `mapAsync()`: ```ts createMap( mapper, User, UserDto, forMember( (destination) => destination.fullName, mapFrom(async (source) => loadDisplayName(source.username)), ), ); const dto = await mapper.mapAsync(user, User, UserDto); ``` Do not call synchronous `map()` for a mapping with asynchronous member resolvers. --- # Group mappings with profiles Source: https://automapperts.netlify.app/tutorial/mapping-profile A `MappingProfile` is a function that receives a mapper and registers a related set of mappings. For the underlying concept and profile-level configuration, see [Mapping profiles](/fundamentals/mapping-profiles). ```ts import type { MappingProfile } from '@automapper/core'; export const bioProfile: MappingProfile = (mapper) => { createMap( mapper, Bio, BioDto, typeConverter(Date, String, (date) => date.toDateString()), ); }; export const userProfile: MappingProfile = (mapper) => { createMap( mapper, User, UserDto, forMember( (destination) => destination.fullName, mapFrom((source) => `${source.firstName} ${source.lastName}`), ), ); }; ``` Register profiles during startup. Dependency order still matters when one mapping contains another. ```ts addProfile(mapper, bioProfile); addProfile(mapper, userProfile); ``` ## Share configuration Additional `addProfile()` arguments apply to every `createMap()` called by that profile: ```ts const productProfile: MappingProfile = (mapper) => { createMap(mapper, Product, ProductDto); createMap(mapper, Product, ProductSummaryDto); }; addProfile( mapper, productProfile, namingConventions(new CamelCaseNamingConvention()), extend(BaseEntity, BaseDto), ); ``` NestJS applications usually express the same organization by extending `AutomapperProfile`; see the [NestJS integration](/nestjs). --- # Tutorial: map a user to a DTO Source: https://automapperts.netlify.app/tutorial/preface This tutorial maps a database-facing `User` model to a public `UserDto`. It uses `@automapper/classes`, but the same mapping concepts apply to other strategies. **user.ts** ```ts export class User { firstName!: string; lastName!: string; username!: string; password!: string; bio!: Bio; } export class Bio { job!: Job; birthday!: Date; avatarUrl!: string; } export class Job { title!: string; salary!: number; } ``` **user.dto.ts** ```ts export class UserDto { firstName!: string; lastName!: string; fullName!: string; username!: string; bio!: BioDto; } export class BioDto { jobTitle!: string; jobSalary!: number; birthday!: string; avatarUrl!: string; } ``` Without a mapping layer, constructors, factories, or services must repeatedly copy matching values, flatten `bio.job`, format the birthday, and compute `fullName`. That couples the destination model to its source and spreads transformation rules through the application. The next steps move those rules into a mapper: 1. [Create a mapper](/tutorial/create-mapper) and describe model metadata. 2. [Create mappings](/tutorial/create-mapping) between model identifiers. 3. [Configure the differences](/tutorial/mapping-configurations). 4. [Group mappings in profiles](/tutorial/mapping-profile).