Skip to content

inline decorators #2613

@zh99998

Description

@zh99998

continue from #325, I think it need more discussion

It's really ugly to put them in one line in field definition like in TypeORM.

maybe only decorators without () should be inline?

before

@Entity()
export class Board {
  
    @PrimaryGeneratedColumn()
    id: number;
    
    @Column()
    slug: string;
    
    @Column()
    name: string;
    
    @Column()
    theme: string;
    
    @Column()
    description: string;
    
    @OneToMany(type => Topic, topic => topic.board)
    topics: Topic[]
  
}

after

@Entity()
export class Board {
  @PrimaryGeneratedColumn() id: number;

  @Column() slug: string;

  @Column() name: string;

  @Column() theme: string;

  @Column() description: string;

  @OneToMany(type => Topic, topic => topic.board)
  topics: Topic[];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:javascriptIssues affecting JSstatus:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions