import { createMap, Mapper } from '@automapper/core'; import { AutomapperProfile, InjectMapper } from '@automapper/nestjs'; import { Injectable } from '@nestjs/common'; import { Coordinates } from '../../geography/domain/types/coordinates.type'; @Injectable() export class CoordinatesProfile extends AutomapperProfile { constructor(@InjectMapper() mapper: Mapper) { super(mapper); } override get profile() { return (mapper: any) => { createMap(mapper, Coordinates, Coordinates); }; } }