注意: このページはまだ日本語に翻訳されていません。以下は英語の原文です。A Result is a sub-class of Array, which allows accessing any of its values either positionally by its index or, if keys are provided by its name.
Array
<any
>name
.
Since it is possible to have a key whose name conflicts with a method on a Result or its
superclass Array, or any JavaScript keyword, this ensures all named values are still accessible by name.
Parameter | Type | Description |
---|---|---|
name | string | The name of the value to retrieve. |
any
The value for name
.
any
[]
Record
<string
, any
>
items
with each entry also accessible by its corresponding name in
keys
.
Parameter | Type | Description |
---|---|---|
items | any [] | The items to include in the Result. |
keys ? | (null | string )[] | The names for each item in items . |
Result
The new Result.