import '@nestjs/mapped-types' import { IntersectionType, ApiProperty, OmitType } from '@nestjs/swagger' import { UserEntity } from 'src/users/entities/user.entity' export class Token { @ApiProperty() accessToken: string @ApiProperty() refreshToken: string } export class UserToken extends IntersectionType( Token, OmitType(UserEntity, ['password']), ) {}