Open Evalon opened 1 month ago
sort-intersection-types
Consider this type: { apiKey: string | null } & Config I think it's better for readability if named (aliased) types (Config) are followed by anonymous types ({ apiKey: string | null }). Also, it feels more explicit in intention.
{ apiKey: string | null } & Config
Config
{ apiKey: string | null }
constructor(props: { apiKey: string | null } & Config) { super(props) this.apiKey = props.apiKey } --- VS constructor(props: Config & { apiKey: string | null }) { super(props) this.apiKey = props.apiKey }
No response
What rule do you want to change?
sort-intersection-types
Describe the problem
Consider this type:
{ apiKey: string | null } & Config
I think it's better for readability if named (aliased) types (Config
) are followed by anonymous types ({ apiKey: string | null }
). Also, it feels more explicit in intention.Code example
Additional comments
No response
Validations