-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
array.ts
40 lines (32 loc) · 862 Bytes
/
array.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { Arguments, VM } from '@glimmer/runtime';
import { PathReference } from '@glimmer/reference';
import { Opaque } from '@glimmer/util';
/**
@module ember
*/
/**
Use the `{{array}}` helper to create an array to pass as an option to your
components.
```handlebars
{{my-component people=(array
'Tom Dade'
'Yehuda Katz'
this.myOtherPerson)
}}
```
Would result in an object such as:
```js
['Tom Date', 'Yehuda Katz', this.get('myOtherPerson')]
```
Where the 3rd item in the array is bound to updates of the `myOtherPerson` property.
@method array
@for Ember.Templates.helpers
@param {Array} options
@return {Array} Array
@category array-helper
@since 3.7.0
@public
*/
export default function(_vm: VM, args: Arguments): PathReference<Opaque[]> {
return args.positional.capture();
}