0

I have a class which contains a reference to itself as a property viz:

export class Person {

  @ApiProperty()
  name: string;
 
  // I have tried the following. It always shows up as string
  @ApiProperty({type: [Person]})
  @ApiProperty({isArray: true, type: Person})
  @ApiProperty({isArray: true, type: ()=>Person})
  @ApiProperty({type: ()=>[Person]})
  partners?: Person[]
  
}
SoWhat
  • 5,564
  • 2
  • 28
  • 59

0 Answers0