mgechev / angular2-style-guide

[Deprecated] Community-driven set of best practices and style guidelines for Angular 2 application development
https://mgechev.github.io/angular2-style-guide/
1.2k stars 98 forks source link

Style for Array #53

Closed hongbo-miao closed 8 years ago

hongbo-miao commented 8 years ago

Maybe add a style for array?

names: string[];
levels: Level[];
interface User {
  emails: {
    address: string,
    verified: boolean
  }[]
}

or

names: Array<string>;
levels: Array<Level>;
interface User {
  emails: Array<{
    address: string,
    verified: boolean
  }>
}
hongbo-miao commented 8 years ago

Hmm.. I think this may belong to TypeScript style. So I closed it.

mgechev commented 8 years ago

@Hongbo-Miao the first style is what is usually used. I agree, it is mostly a TypeScript style guidelines.

hongbo-miao commented 8 years ago

@mgechev thanks!