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
Promise<Inner[]> is easier to read than Promise<Array<Inner>>. The eye does not need to match opening and closing braces.
The bracket syntax is ubiquitous in programming, whereas generics are an advanced feature and the syntax is more varied.
Downs
Slightly mismatching with PW (i.e., see this). However, improved readability outweighs being consistent with PW's docs. It also appears to be a convention we've used in the type definitions.
The text was updated successfully, but these errors were encountered:
As discussed here, we want to convert all
Array
signatures to[]
in the k6-browser docs.It is common to use simple array types in typescript, i.e.
Cookie[]
, for named types:The generic version is usually reserved for more complex types, where the brackets might be easy to miss due to the amount of symbols:
Ups
Promise<Inner[]>
is easier to read thanPromise<Array<Inner>>
. The eye does not need to match opening and closing braces.Downs
The text was updated successfully, but these errors were encountered: