You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
Sounds like you'd like to follow the same guidelines that @danvk mentioned here:
Not necessarily something that needs to be implemented in this PR, but our style guide is a little more nuanced than either of these options. For simple (non-generic) types we use T[]. If the type becomes more complex, we switch to Array<> for clarity, e.g. Array<{[key: string]: T}>.
Yes, exactly, I read that comment on the original issue but didn't think deeply enough. @ScottSWu do you want to do the "array-type": [true, "array-for-simple-types"] or shall I?
Bug Report
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
Replaces with
Expected behavior
These are more readable in the original form with
Array<T>
.@mprobst explains:
precisely, if your type in the grammar (https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#a1-types) is not just a PredefinedType (number, string, etc) or a TypeReference (some.namepsace.MyFunkyType), then you should be allowed to use Array.
The text was updated successfully, but these errors were encountered: