ember-source 4.6.0-alpha.2 → 4.6.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +2 -2
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +110 -129
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +465 -525
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/error-handling/index.js +1 -1
- package/dist/packages/@ember/-internals/metal/index.js +16 -6
- package/dist/packages/@ember/-internals/runtime/lib/compare.js +4 -3
- package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +281 -368
- package/dist/packages/@ember/-internals/runtime/lib/system/array_proxy.js +8 -5
- package/dist/packages/@ember/application/lib/application.js +4 -1
- package/dist/packages/@ember/engine/index.js +3 -1
- package/dist/packages/@ember/object/index.js +16 -8
- package/dist/packages/@ember/object/lib/computed/reduce_computed_macros.js +1 -1
- package/dist/packages/@ember/test/adapter.js +2 -2
- package/dist/packages/ember/version.js +1 -1
- package/dist/packages/ember-testing/lib/adapters/adapter.js +9 -20
- package/dist/packages/ember-testing/lib/adapters/qunit.js +8 -16
- package/dist/packages/ember-testing/lib/ext/application.js +28 -19
- package/dist/packages/ember-testing/lib/helpers/and_then.js +4 -1
- package/dist/packages/ember-testing/lib/helpers/current_path.js +5 -0
- package/dist/packages/ember-testing/lib/helpers/current_route_name.js +5 -0
- package/dist/packages/ember-testing/lib/helpers/current_url.js +8 -1
- package/dist/packages/ember-testing/lib/helpers/visit.js +12 -2
- package/dist/packages/ember-testing/lib/helpers/wait.js +6 -1
- package/dist/packages/ember-testing/lib/initializers.js +3 -3
- package/dist/packages/ember-testing/lib/test/adapter.js +2 -1
- package/dist/packages/ember-testing/lib/test/helpers.js +3 -1
- package/dist/packages/ember-testing/lib/test/on_inject_helpers.js +2 -2
- package/dist/packages/ember-testing/lib/test/promise.js +8 -8
- package/dist/packages/ember-testing/lib/test/waiters.js +14 -45
- package/dist/packages/ember-testing/lib/test.js +1 -1
- package/docs/data.json +268 -258
- package/package.json +3 -3
package/docs/data.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "The Ember API",
|
|
4
4
|
"description": "The Ember API: a framework for building ambitious web applications",
|
|
5
5
|
"url": "https://emberjs.com/",
|
|
6
|
-
"version": "4.6.0-alpha.
|
|
6
|
+
"version": "4.6.0-alpha.3"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"node_modules/rsvp/lib/rsvp/promise/all.js": {
|
|
@@ -959,8 +959,8 @@
|
|
|
959
959
|
"Ember": 1
|
|
960
960
|
}
|
|
961
961
|
},
|
|
962
|
-
"packages/@ember/-internals/runtime/lib/mixins/array.
|
|
963
|
-
"name": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
962
|
+
"packages/@ember/-internals/runtime/lib/mixins/array.ts": {
|
|
963
|
+
"name": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
964
964
|
"modules": {},
|
|
965
965
|
"classes": {
|
|
966
966
|
"EmberArray": 1,
|
|
@@ -1516,8 +1516,8 @@
|
|
|
1516
1516
|
},
|
|
1517
1517
|
"namespaces": {}
|
|
1518
1518
|
},
|
|
1519
|
-
"packages/@ember/object/index.
|
|
1520
|
-
"name": "packages/@ember/object/index.
|
|
1519
|
+
"packages/@ember/object/index.ts": {
|
|
1520
|
+
"name": "packages/@ember/object/index.ts",
|
|
1521
1521
|
"modules": {},
|
|
1522
1522
|
"classes": {},
|
|
1523
1523
|
"fors": {
|
|
@@ -1582,8 +1582,8 @@
|
|
|
1582
1582
|
"fors": {},
|
|
1583
1583
|
"namespaces": {}
|
|
1584
1584
|
},
|
|
1585
|
-
"packages/ember-testing/lib/adapters/adapter.
|
|
1586
|
-
"name": "packages/ember-testing/lib/adapters/adapter.
|
|
1585
|
+
"packages/ember-testing/lib/adapters/adapter.ts": {
|
|
1586
|
+
"name": "packages/ember-testing/lib/adapters/adapter.ts",
|
|
1587
1587
|
"modules": {},
|
|
1588
1588
|
"classes": {
|
|
1589
1589
|
"TestAdapter": 1
|
|
@@ -1591,8 +1591,8 @@
|
|
|
1591
1591
|
"fors": {},
|
|
1592
1592
|
"namespaces": {}
|
|
1593
1593
|
},
|
|
1594
|
-
"packages/ember-testing/lib/adapters/qunit.
|
|
1595
|
-
"name": "packages/ember-testing/lib/adapters/qunit.
|
|
1594
|
+
"packages/ember-testing/lib/adapters/qunit.ts": {
|
|
1595
|
+
"name": "packages/ember-testing/lib/adapters/qunit.ts",
|
|
1596
1596
|
"modules": {},
|
|
1597
1597
|
"classes": {
|
|
1598
1598
|
"Ember.Test.QUnitAdapter": 1
|
|
@@ -1602,57 +1602,57 @@
|
|
|
1602
1602
|
"Ember.Test": 1
|
|
1603
1603
|
}
|
|
1604
1604
|
},
|
|
1605
|
-
"packages/ember-testing/lib/ext/application.
|
|
1606
|
-
"name": "packages/ember-testing/lib/ext/application.
|
|
1605
|
+
"packages/ember-testing/lib/ext/application.ts": {
|
|
1606
|
+
"name": "packages/ember-testing/lib/ext/application.ts",
|
|
1607
1607
|
"modules": {},
|
|
1608
1608
|
"classes": {},
|
|
1609
1609
|
"fors": {},
|
|
1610
1610
|
"namespaces": {}
|
|
1611
1611
|
},
|
|
1612
|
-
"packages/ember-testing/lib/helpers/current_path.
|
|
1613
|
-
"name": "packages/ember-testing/lib/helpers/current_path.
|
|
1612
|
+
"packages/ember-testing/lib/helpers/current_path.ts": {
|
|
1613
|
+
"name": "packages/ember-testing/lib/helpers/current_path.ts",
|
|
1614
1614
|
"modules": {},
|
|
1615
1615
|
"classes": {},
|
|
1616
1616
|
"fors": {},
|
|
1617
1617
|
"namespaces": {}
|
|
1618
1618
|
},
|
|
1619
|
-
"packages/ember-testing/lib/helpers/current_route_name.
|
|
1620
|
-
"name": "packages/ember-testing/lib/helpers/current_route_name.
|
|
1619
|
+
"packages/ember-testing/lib/helpers/current_route_name.ts": {
|
|
1620
|
+
"name": "packages/ember-testing/lib/helpers/current_route_name.ts",
|
|
1621
1621
|
"modules": {},
|
|
1622
1622
|
"classes": {},
|
|
1623
1623
|
"fors": {},
|
|
1624
1624
|
"namespaces": {}
|
|
1625
1625
|
},
|
|
1626
|
-
"packages/ember-testing/lib/helpers/current_url.
|
|
1627
|
-
"name": "packages/ember-testing/lib/helpers/current_url.
|
|
1626
|
+
"packages/ember-testing/lib/helpers/current_url.ts": {
|
|
1627
|
+
"name": "packages/ember-testing/lib/helpers/current_url.ts",
|
|
1628
1628
|
"modules": {},
|
|
1629
1629
|
"classes": {},
|
|
1630
1630
|
"fors": {},
|
|
1631
1631
|
"namespaces": {}
|
|
1632
1632
|
},
|
|
1633
|
-
"packages/ember-testing/lib/helpers/pause_test.
|
|
1634
|
-
"name": "packages/ember-testing/lib/helpers/pause_test.
|
|
1633
|
+
"packages/ember-testing/lib/helpers/pause_test.ts": {
|
|
1634
|
+
"name": "packages/ember-testing/lib/helpers/pause_test.ts",
|
|
1635
1635
|
"modules": {},
|
|
1636
1636
|
"classes": {},
|
|
1637
1637
|
"fors": {},
|
|
1638
1638
|
"namespaces": {}
|
|
1639
1639
|
},
|
|
1640
|
-
"packages/ember-testing/lib/helpers/visit.
|
|
1641
|
-
"name": "packages/ember-testing/lib/helpers/visit.
|
|
1640
|
+
"packages/ember-testing/lib/helpers/visit.ts": {
|
|
1641
|
+
"name": "packages/ember-testing/lib/helpers/visit.ts",
|
|
1642
1642
|
"modules": {},
|
|
1643
1643
|
"classes": {},
|
|
1644
1644
|
"fors": {},
|
|
1645
1645
|
"namespaces": {}
|
|
1646
1646
|
},
|
|
1647
|
-
"packages/ember-testing/lib/helpers/wait.
|
|
1648
|
-
"name": "packages/ember-testing/lib/helpers/wait.
|
|
1647
|
+
"packages/ember-testing/lib/helpers/wait.ts": {
|
|
1648
|
+
"name": "packages/ember-testing/lib/helpers/wait.ts",
|
|
1649
1649
|
"modules": {},
|
|
1650
1650
|
"classes": {},
|
|
1651
1651
|
"fors": {},
|
|
1652
1652
|
"namespaces": {}
|
|
1653
1653
|
},
|
|
1654
|
-
"packages/ember-testing/lib/test/helpers.
|
|
1655
|
-
"name": "packages/ember-testing/lib/test/helpers.
|
|
1654
|
+
"packages/ember-testing/lib/test/helpers.ts": {
|
|
1655
|
+
"name": "packages/ember-testing/lib/test/helpers.ts",
|
|
1656
1656
|
"modules": {
|
|
1657
1657
|
"@ember/test": 1
|
|
1658
1658
|
},
|
|
@@ -1662,8 +1662,8 @@
|
|
|
1662
1662
|
},
|
|
1663
1663
|
"namespaces": {}
|
|
1664
1664
|
},
|
|
1665
|
-
"packages/ember-testing/lib/test/on_inject_helpers.
|
|
1666
|
-
"name": "packages/ember-testing/lib/test/on_inject_helpers.
|
|
1665
|
+
"packages/ember-testing/lib/test/on_inject_helpers.ts": {
|
|
1666
|
+
"name": "packages/ember-testing/lib/test/on_inject_helpers.ts",
|
|
1667
1667
|
"modules": {},
|
|
1668
1668
|
"classes": {},
|
|
1669
1669
|
"fors": {
|
|
@@ -1671,8 +1671,8 @@
|
|
|
1671
1671
|
},
|
|
1672
1672
|
"namespaces": {}
|
|
1673
1673
|
},
|
|
1674
|
-
"packages/ember-testing/lib/test/promise.
|
|
1675
|
-
"name": "packages/ember-testing/lib/test/promise.
|
|
1674
|
+
"packages/ember-testing/lib/test/promise.ts": {
|
|
1675
|
+
"name": "packages/ember-testing/lib/test/promise.ts",
|
|
1676
1676
|
"modules": {},
|
|
1677
1677
|
"classes": {},
|
|
1678
1678
|
"fors": {
|
|
@@ -1680,8 +1680,8 @@
|
|
|
1680
1680
|
},
|
|
1681
1681
|
"namespaces": {}
|
|
1682
1682
|
},
|
|
1683
|
-
"packages/ember-testing/lib/test/waiters.
|
|
1684
|
-
"name": "packages/ember-testing/lib/test/waiters.
|
|
1683
|
+
"packages/ember-testing/lib/test/waiters.ts": {
|
|
1684
|
+
"name": "packages/ember-testing/lib/test/waiters.ts",
|
|
1685
1685
|
"modules": {},
|
|
1686
1686
|
"classes": {},
|
|
1687
1687
|
"fors": {
|
|
@@ -1689,8 +1689,8 @@
|
|
|
1689
1689
|
},
|
|
1690
1690
|
"namespaces": {}
|
|
1691
1691
|
},
|
|
1692
|
-
"packages/ember-testing/lib/setup_for_testing.
|
|
1693
|
-
"name": "packages/ember-testing/lib/setup_for_testing.
|
|
1692
|
+
"packages/ember-testing/lib/setup_for_testing.ts": {
|
|
1693
|
+
"name": "packages/ember-testing/lib/setup_for_testing.ts",
|
|
1694
1694
|
"modules": {},
|
|
1695
1695
|
"classes": {},
|
|
1696
1696
|
"fors": {},
|
|
@@ -1698,8 +1698,8 @@
|
|
|
1698
1698
|
"Ember": 1
|
|
1699
1699
|
}
|
|
1700
1700
|
},
|
|
1701
|
-
"packages/ember-testing/lib/test.
|
|
1702
|
-
"name": "packages/ember-testing/lib/test.
|
|
1701
|
+
"packages/ember-testing/lib/test.ts": {
|
|
1702
|
+
"name": "packages/ember-testing/lib/test.ts",
|
|
1703
1703
|
"modules": {
|
|
1704
1704
|
"ember": 1
|
|
1705
1705
|
},
|
|
@@ -1854,7 +1854,7 @@
|
|
|
1854
1854
|
"Ember.Test": 1
|
|
1855
1855
|
},
|
|
1856
1856
|
"tag": "module",
|
|
1857
|
-
"file": "packages/ember-testing/lib/test.
|
|
1857
|
+
"file": "packages/ember-testing/lib/test.ts",
|
|
1858
1858
|
"line": 11,
|
|
1859
1859
|
"access": "private",
|
|
1860
1860
|
"tagname": ""
|
|
@@ -2019,7 +2019,7 @@
|
|
|
2019
2019
|
"namespaces": {},
|
|
2020
2020
|
"tag": "module",
|
|
2021
2021
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
2022
|
-
"line":
|
|
2022
|
+
"line": 51
|
|
2023
2023
|
},
|
|
2024
2024
|
"@ember/enumerable": {
|
|
2025
2025
|
"name": "@ember/enumerable",
|
|
@@ -2260,7 +2260,7 @@
|
|
|
2260
2260
|
"Ember": 1
|
|
2261
2261
|
},
|
|
2262
2262
|
"tag": "module",
|
|
2263
|
-
"file": "packages/ember-testing/lib/adapters/adapter.
|
|
2263
|
+
"file": "packages/ember-testing/lib/adapters/adapter.ts",
|
|
2264
2264
|
"line": 7
|
|
2265
2265
|
}
|
|
2266
2266
|
},
|
|
@@ -3062,8 +3062,8 @@
|
|
|
3062
3062
|
],
|
|
3063
3063
|
"module": "@ember/array",
|
|
3064
3064
|
"namespace": "",
|
|
3065
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
3066
|
-
"line":
|
|
3065
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
3066
|
+
"line": 219,
|
|
3067
3067
|
"description": "This mixin implements Observer-friendly Array-like behavior. It is not a\nconcrete implementation, but it can be used up by other classes that want\nto appear like arrays.\n\nFor example, ArrayProxy is a concrete class that can be instantiated to\nimplement array-like behavior. This class uses the Array Mixin by way of\nthe MutableArray mixin, which allows observable changes to be made to the\nunderlying array.\n\nThis mixin defines methods specifically for collections that provide\nindex-ordered access to their contents. When you are designing code that\nneeds to accept any kind of Array-like object, you should use these methods\ninstead of Array primitives because these will properly notify observers of\nchanges to the array.\n\nAlthough these methods are efficient, they do add a layer of indirection to\nyour application so it is a good idea to use them only when you need the\nflexibility of using both true JavaScript arrays and \"virtual\" arrays such\nas controllers and collections.\n\nYou can use the methods defined in this module to access and modify array\ncontents in an observable-friendly way. You can also be notified whenever\nthe membership of an array changes by using `.observes('myArray.[]')`.\n\nTo support `EmberArray` in your own class, you must override two\nprimitives to use it: `length()` and `objectAt()`.",
|
|
3068
3068
|
"uses": [
|
|
3069
3069
|
"Enumerable"
|
|
@@ -3085,8 +3085,8 @@
|
|
|
3085
3085
|
],
|
|
3086
3086
|
"module": "@ember/array",
|
|
3087
3087
|
"namespace": "",
|
|
3088
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
3089
|
-
"line":
|
|
3088
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
3089
|
+
"line": 1457,
|
|
3090
3090
|
"description": "This mixin defines the API for modifying array-like objects. These methods\ncan be applied only to a collection that keeps its items in an ordered set.\nIt builds upon the Array mixin and adds methods to modify the array.\nOne concrete implementations of this class include ArrayProxy.\n\nIt is important to use the methods in this class to modify arrays so that\nchanges are observable. This allows the binding system in Ember to function\ncorrectly.\n\n\nNote that an Array can change even if it does not implement this mixin.\nFor example, one might implement a SparseArray that cannot be directly\nmodified, but if its underlying enumerable changes, it will change also.",
|
|
3091
3091
|
"uses": [
|
|
3092
3092
|
"EmberArray",
|
|
@@ -3105,8 +3105,8 @@
|
|
|
3105
3105
|
"extension_for": [],
|
|
3106
3106
|
"module": "ember",
|
|
3107
3107
|
"namespace": "",
|
|
3108
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
3109
|
-
"line":
|
|
3108
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
3109
|
+
"line": 1896,
|
|
3110
3110
|
"description": "The NativeArray mixin contains the properties needed to make the native\nArray support MutableArray and all of its dependent APIs. Unless you\nhave `EmberENV.EXTEND_PROTOTYPES` or `EmberENV.EXTEND_PROTOTYPES.Array` set to\nfalse, this will be applied automatically. Otherwise you can apply the mixin\nat anytime by calling `Ember.NativeArray.apply(Array.prototype)`.",
|
|
3111
3111
|
"uses": [
|
|
3112
3112
|
"MutableArray",
|
|
@@ -3292,7 +3292,7 @@
|
|
|
3292
3292
|
"module": "@ember/array",
|
|
3293
3293
|
"namespace": "",
|
|
3294
3294
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
3295
|
-
"line":
|
|
3295
|
+
"line": 51,
|
|
3296
3296
|
"description": "An ArrayProxy wraps any other object that implements `Array` and/or\n`MutableArray,` forwarding all requests. This makes it very useful for\na number of binding use cases or other cases where being able to swap\nout the underlying array is useful.\n\nA simple example of usage:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nlet pets = ['dog', 'cat', 'fish'];\nlet ap = ArrayProxy.create({ content: A(pets) });\n\nap.get('firstObject'); // 'dog'\nap.set('content', ['amoeba', 'paramecium']);\nap.get('firstObject'); // 'amoeba'\n```\n\nThis class can also be useful as a layer to transform the contents of\nan array, as they are accessed. This can be done by overriding\n`objectAtContent`:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nlet pets = ['dog', 'cat', 'fish'];\nlet ap = ArrayProxy.create({\n content: A(pets),\n objectAtContent: function(idx) {\n return this.get('content').objectAt(idx).toUpperCase();\n }\n});\n\nap.get('firstObject'); // . 'DOG'\n```\n\nWhen overriding this class, it is important to place the call to\n`_super` *after* setting `content` so the internal observers have\na chance to fire properly:\n\n```javascript\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nexport default ArrayProxy.extend({\n init() {\n this.set('content', A(['dog', 'cat', 'fish']));\n this._super(...arguments);\n }\n});\n```",
|
|
3297
3297
|
"extends": "EmberObject",
|
|
3298
3298
|
"uses": [
|
|
@@ -3807,7 +3807,7 @@
|
|
|
3807
3807
|
"extension_for": [],
|
|
3808
3808
|
"module": "@ember/test",
|
|
3809
3809
|
"namespace": "",
|
|
3810
|
-
"file": "packages/ember-testing/lib/adapters/adapter.
|
|
3810
|
+
"file": "packages/ember-testing/lib/adapters/adapter.ts",
|
|
3811
3811
|
"line": 7,
|
|
3812
3812
|
"description": "The primary purpose of this class is to create hooks that can be implemented\nby an adapter for various test frameworks.",
|
|
3813
3813
|
"access": "public",
|
|
@@ -3823,8 +3823,8 @@
|
|
|
3823
3823
|
"extension_for": [],
|
|
3824
3824
|
"module": "ember",
|
|
3825
3825
|
"namespace": "Ember.Test",
|
|
3826
|
-
"file": "packages/ember-testing/lib/adapters/qunit.
|
|
3827
|
-
"line":
|
|
3826
|
+
"file": "packages/ember-testing/lib/adapters/qunit.ts",
|
|
3827
|
+
"line": 17,
|
|
3828
3828
|
"description": "This class implements the methods defined by TestAdapter for the\nQUnit testing framework.",
|
|
3829
3829
|
"extends": "TestAdapter",
|
|
3830
3830
|
"access": "public",
|
|
@@ -3851,7 +3851,7 @@
|
|
|
3851
3851
|
"extension_for": [],
|
|
3852
3852
|
"module": "ember",
|
|
3853
3853
|
"namespace": "Ember",
|
|
3854
|
-
"file": "packages/ember-testing/lib/test.
|
|
3854
|
+
"file": "packages/ember-testing/lib/test.ts",
|
|
3855
3855
|
"line": 11,
|
|
3856
3856
|
"description": "This is a container for an assortment of testing related functionality:\n\n* Choose your default test adapter (for your framework of choice).\n* Register/Unregister additional test helpers.\n* Setup callbacks to be fired when the test helpers are injected into\n your application.",
|
|
3857
3857
|
"access": "public",
|
|
@@ -7505,13 +7505,13 @@
|
|
|
7505
7505
|
},
|
|
7506
7506
|
{
|
|
7507
7507
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7508
|
-
"line":
|
|
7508
|
+
"line": 680,
|
|
7509
7509
|
"class": "@ember/object/mixin",
|
|
7510
7510
|
"module": "@ember/object"
|
|
7511
7511
|
},
|
|
7512
7512
|
{
|
|
7513
7513
|
"file": "packages/@ember/-internals/metal/lib/mixin.ts",
|
|
7514
|
-
"line":
|
|
7514
|
+
"line": 772,
|
|
7515
7515
|
"description": "Specify a method that observes property changes.\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { observer } from '@ember/object';\n\nexport default EmberObject.extend({\n valueObserver: observer('value', function() {\n // Executes whenever the \"value\" property changes\n })\n});\n```\n\nAlso available as `Function.prototype.observes` if prototype extensions are\nenabled.",
|
|
7516
7516
|
"itemtype": "method",
|
|
7517
7517
|
"name": "observer",
|
|
@@ -11130,8 +11130,8 @@
|
|
|
11130
11130
|
"namespace": "Ember"
|
|
11131
11131
|
},
|
|
11132
11132
|
{
|
|
11133
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11134
|
-
"line":
|
|
11133
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11134
|
+
"line": 140,
|
|
11135
11135
|
"description": "Returns true if the passed object is an array or Array-like.\n\nObjects are considered Array-like if any of the following are true:\n\n - the object is a native Array\n - the object has an objectAt property\n - the object is an Object, and has a length property\n\nUnlike `typeOf` this method returns true even if the passed object is\nnot formally an array but appears to be array-like (i.e. implements `Array`)\n\n```javascript\nimport { isArray } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nisArray(); // false\nisArray([]); // true\nisArray(ArrayProxy.create({ content: [] })); // true\n```",
|
|
11136
11136
|
"itemtype": "method",
|
|
11137
11137
|
"name": "isArray",
|
|
@@ -11153,8 +11153,8 @@
|
|
|
11153
11153
|
"module": "@ember/array"
|
|
11154
11154
|
},
|
|
11155
11155
|
{
|
|
11156
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11157
|
-
"line":
|
|
11156
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11157
|
+
"line": 319,
|
|
11158
11158
|
"description": "__Required.__ You must implement this method to apply this mixin.\n\nYour array must support the `length` property. Your replace methods should\nset this property whenever it changes.",
|
|
11159
11159
|
"itemtype": "property",
|
|
11160
11160
|
"name": "length",
|
|
@@ -11165,8 +11165,8 @@
|
|
|
11165
11165
|
"module": "@ember/array"
|
|
11166
11166
|
},
|
|
11167
11167
|
{
|
|
11168
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11169
|
-
"line":
|
|
11168
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11169
|
+
"line": 329,
|
|
11170
11170
|
"description": "Returns the object at the given `index`. If the given `index` is negative\nor is greater or equal than the array length, returns `undefined`.\n\nThis is one of the primitives you must implement to support `EmberArray`.\nIf your object supports retrieving the value of an array item using `get()`\n(i.e. `myArray.get(0)`), then you do not need to implement this method\nyourself.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectAt(0); // 'a'\narr.objectAt(3); // 'd'\narr.objectAt(-1); // undefined\narr.objectAt(4); // undefined\narr.objectAt(5); // undefined\n```",
|
|
11171
11171
|
"itemtype": "method",
|
|
11172
11172
|
"name": "objectAt",
|
|
@@ -11187,8 +11187,8 @@
|
|
|
11187
11187
|
"module": "@ember/array"
|
|
11188
11188
|
},
|
|
11189
11189
|
{
|
|
11190
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11191
|
-
"line":
|
|
11190
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11191
|
+
"line": 354,
|
|
11192
11192
|
"description": "This returns the objects at the specified indexes, using `objectAt`.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd'];\n\narr.objectsAt([0, 1, 2]); // ['a', 'b', 'c']\narr.objectsAt([2, 3, 4]); // ['c', 'd', undefined]\n```",
|
|
11193
11193
|
"itemtype": "method",
|
|
11194
11194
|
"name": "objectsAt",
|
|
@@ -11209,8 +11209,8 @@
|
|
|
11209
11209
|
"module": "@ember/array"
|
|
11210
11210
|
},
|
|
11211
11211
|
{
|
|
11212
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11213
|
-
"line":
|
|
11212
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11213
|
+
"line": 373,
|
|
11214
11214
|
"description": "This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```",
|
|
11215
11215
|
"itemtype": "property",
|
|
11216
11216
|
"name": "[]",
|
|
@@ -11223,8 +11223,8 @@
|
|
|
11223
11223
|
"module": "@ember/array"
|
|
11224
11224
|
},
|
|
11225
11225
|
{
|
|
11226
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11227
|
-
"line":
|
|
11226
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11227
|
+
"line": 401,
|
|
11228
11228
|
"description": "The first object in the array, or `undefined` if the array is empty.\n\n```javascript\nlet vowels = ['a', 'e', 'i', 'o', 'u'];\nvowels.firstObject; // 'a'\n\nvowels.shiftObject();\nvowels.firstObject; // 'e'\n\nvowels.reverseObjects();\nvowels.firstObject; // 'u'\n\nvowels.clear();\nvowels.firstObject; // undefined\n```",
|
|
11229
11229
|
"itemtype": "property",
|
|
11230
11230
|
"name": "firstObject",
|
|
@@ -11238,8 +11238,8 @@
|
|
|
11238
11238
|
"module": "@ember/array"
|
|
11239
11239
|
},
|
|
11240
11240
|
{
|
|
11241
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11242
|
-
"line":
|
|
11241
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11242
|
+
"line": 426,
|
|
11243
11243
|
"description": "The last object in the array, or `undefined` if the array is empty.",
|
|
11244
11244
|
"itemtype": "property",
|
|
11245
11245
|
"name": "lastObject",
|
|
@@ -11253,8 +11253,8 @@
|
|
|
11253
11253
|
"module": "@ember/array"
|
|
11254
11254
|
},
|
|
11255
11255
|
{
|
|
11256
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11257
|
-
"line":
|
|
11256
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11257
|
+
"line": 438,
|
|
11258
11258
|
"description": "Returns a new array that is a slice of the receiver. This implementation\nuses the observable array methods to retrieve the objects for the new\nslice.\n\n```javascript\nlet arr = ['red', 'green', 'blue'];\n\narr.slice(0); // ['red', 'green', 'blue']\narr.slice(0, 2); // ['red', 'green']\narr.slice(1, 100); // ['green', 'blue']\n```",
|
|
11259
11259
|
"itemtype": "method",
|
|
11260
11260
|
"name": "slice",
|
|
@@ -11280,8 +11280,8 @@
|
|
|
11280
11280
|
"module": "@ember/array"
|
|
11281
11281
|
},
|
|
11282
11282
|
{
|
|
11283
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11284
|
-
"line":
|
|
11283
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11284
|
+
"line": 481,
|
|
11285
11285
|
"description": "Used to determine the passed object's first occurrence in the array.\nReturns the index if found, -1 if no match is found.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.indexOf('a'); // 0\narr.indexOf('z'); // -1\narr.indexOf('a', 2); // 4\narr.indexOf('a', -1); // 4, equivalent to indexOf('a', 4)\narr.indexOf('a', -100); // 0, searches entire array\narr.indexOf('b', 3); // -1\narr.indexOf('a', 100); // -1\n\nlet people = [{ name: 'Zoey' }, { name: 'Bob' }]\nlet newPerson = { name: 'Tom' };\npeople = [newPerson, ...people, newPerson];\n\npeople.indexOf(newPerson); // 0\npeople.indexOf(newPerson, 1); // 3\npeople.indexOf(newPerson, -4); // 0\npeople.indexOf(newPerson, 10); // -1\n```",
|
|
11286
11286
|
"itemtype": "method",
|
|
11287
11287
|
"name": "indexOf",
|
|
@@ -11307,8 +11307,8 @@
|
|
|
11307
11307
|
"module": "@ember/array"
|
|
11308
11308
|
},
|
|
11309
11309
|
{
|
|
11310
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11311
|
-
"line":
|
|
11310
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11311
|
+
"line": 523,
|
|
11312
11312
|
"description": "Returns the index of the given `object`'s last occurrence.\n\n- If no `startAt` argument is given, the search starts from\nthe last position.\n- If it's greater than or equal to the length of the array,\nthe search starts from the last position.\n- If it's negative, it is taken as the offset from the end\nof the array i.e. `startAt + array.length`.\n- If it's any other positive number, will search backwards\nfrom that index of the array.\n\nReturns -1 if no match is found.\n\n```javascript\nlet arr = ['a', 'b', 'c', 'd', 'a'];\n\narr.lastIndexOf('a'); // 4\narr.lastIndexOf('z'); // -1\narr.lastIndexOf('a', 2); // 0\narr.lastIndexOf('a', -1); // 4\narr.lastIndexOf('a', -3); // 0\narr.lastIndexOf('b', 3); // 1\narr.lastIndexOf('a', 100); // 4\n```",
|
|
11313
11313
|
"itemtype": "method",
|
|
11314
11314
|
"name": "lastIndexOf",
|
|
@@ -11334,8 +11334,8 @@
|
|
|
11334
11334
|
"module": "@ember/array"
|
|
11335
11335
|
},
|
|
11336
11336
|
{
|
|
11337
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11338
|
-
"line":
|
|
11337
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11338
|
+
"line": 577,
|
|
11339
11339
|
"description": "Iterates through the array, calling the passed function on each\nitem. This method corresponds to the `forEach()` method defined in\nJavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet foods = [\n { name: 'apple', eaten: false },\n { name: 'banana', eaten: false },\n { name: 'carrot', eaten: false }\n];\n\nfoods.forEach((food) => food.eaten = true);\n\nlet output = '';\nfoods.forEach((item, index, array) =>\n output += `${index + 1}/${array.length} ${item.name}\\n`;\n);\nconsole.log(output);\n// 1/3 apple\n// 2/3 banana\n// 3/3 carrot\n```",
|
|
11340
11340
|
"itemtype": "method",
|
|
11341
11341
|
"name": "forEach",
|
|
@@ -11362,8 +11362,8 @@
|
|
|
11362
11362
|
"module": "@ember/array"
|
|
11363
11363
|
},
|
|
11364
11364
|
{
|
|
11365
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11366
|
-
"line":
|
|
11365
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11366
|
+
"line": 637,
|
|
11367
11367
|
"description": "Alias for `mapBy`.\n\nReturns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.getEach('name');\n// ['Joe', 'Matt'];\n\npeople.getEach('nonexistentProperty');\n// [undefined, undefined];\n```",
|
|
11368
11368
|
"itemtype": "method",
|
|
11369
11369
|
"name": "getEach",
|
|
@@ -11384,8 +11384,8 @@
|
|
|
11384
11384
|
"module": "@ember/array"
|
|
11385
11385
|
},
|
|
11386
11386
|
{
|
|
11387
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11388
|
-
"line":
|
|
11387
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11388
|
+
"line": 660,
|
|
11389
11389
|
"description": "Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```",
|
|
11390
11390
|
"itemtype": "method",
|
|
11391
11391
|
"name": "setEach",
|
|
@@ -11411,8 +11411,8 @@
|
|
|
11411
11411
|
"module": "@ember/array"
|
|
11412
11412
|
},
|
|
11413
11413
|
{
|
|
11414
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11415
|
-
"line":
|
|
11414
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11415
|
+
"line": 683,
|
|
11416
11416
|
"description": "Maps all of the items in the enumeration to another value, returning\na new array. This method corresponds to `map()` defined in JavaScript 1.6.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\nlet arr = [1, 2, 3, 4, 5, 6];\n\narr.map(element => element * element);\n// [1, 4, 9, 16, 25, 36];\n\narr.map((element, index) => element + index);\n// [1, 3, 5, 7, 9, 11];\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the mapped value.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.",
|
|
11417
11417
|
"itemtype": "method",
|
|
11418
11418
|
"name": "map",
|
|
@@ -11439,8 +11439,8 @@
|
|
|
11439
11439
|
"module": "@ember/array"
|
|
11440
11440
|
},
|
|
11441
11441
|
{
|
|
11442
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11443
|
-
"line":
|
|
11442
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11443
|
+
"line": 731,
|
|
11444
11444
|
"description": "Similar to map, this specialized function returns the value of the named\nproperty on all items in the enumeration.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.mapBy('name');\n// ['Joe', 'Matt'];\n\npeople.mapBy('unknownProperty');\n// [undefined, undefined];\n```",
|
|
11445
11445
|
"itemtype": "method",
|
|
11446
11446
|
"name": "mapBy",
|
|
@@ -11461,8 +11461,8 @@
|
|
|
11461
11461
|
"module": "@ember/array"
|
|
11462
11462
|
},
|
|
11463
11463
|
{
|
|
11464
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11465
|
-
"line":
|
|
11464
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11465
|
+
"line": 752,
|
|
11466
11466
|
"description": "Returns a new array with all of the items in the enumeration that the provided\ncallback function returns true for. This method corresponds to [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll parameters are optional. The function should return `true` to include the item\nin the results, and `false` otherwise.\n\nExample:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nlet people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n\npeople.filter(isAdult); // returns [{ name: 'Joan', age: 45 }];\n```\n\nNote that in addition to a callback, you can pass an optional target object\nthat will be set as `this` on the context. This is a good way to give your\niterator function access to the current object. For example:\n\n```javascript\nfunction isAdultAndEngineer(person) {\n return person.age > 18 && this.engineering;\n}\n\nclass AdultsCollection {\n engineering = false;\n\n constructor(opts = {}) {\n super(...arguments);\n\n this.engineering = opts.engineering;\n this.people = Ember.A([{ name: 'John', age: 14 }, { name: 'Joan', age: 45 }]);\n }\n}\n\nlet collection = new AdultsCollection({ engineering: true });\ncollection.people.filter(isAdultAndEngineer, { target: collection });\n```",
|
|
11467
11467
|
"itemtype": "method",
|
|
11468
11468
|
"name": "filter",
|
|
@@ -11489,8 +11489,8 @@
|
|
|
11489
11489
|
"module": "@ember/array"
|
|
11490
11490
|
},
|
|
11491
11491
|
{
|
|
11492
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11493
|
-
"line":
|
|
11492
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11493
|
+
"line": 829,
|
|
11494
11494
|
"description": "Returns an array with all of the items in the enumeration where the passed\nfunction returns false. This method is the inverse of filter().\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- *item* is the current item in the iteration.\n- *index* is the current index in the iteration\n- *array* is the array itself.\n\nIt should return a falsey value to include the item in the results.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as \"this\" on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\nconst nonFruits = food.reject(function(thing) {\n return thing.isFruit;\n}); // [{food: 'bread', isFruit: false}]\n```",
|
|
11495
11495
|
"itemtype": "method",
|
|
11496
11496
|
"name": "reject",
|
|
@@ -11517,8 +11517,8 @@
|
|
|
11517
11517
|
"module": "@ember/array"
|
|
11518
11518
|
},
|
|
11519
11519
|
{
|
|
11520
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11521
|
-
"line":
|
|
11520
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11521
|
+
"line": 881,
|
|
11522
11522
|
"description": "Filters the array by the property and an optional value. If a value is given, it returns\nthe items that have said value for the property. If not, it returns all the items that\nhave a truthy value for the property.\n\nExample Usage:\n\n```javascript\nlet things = Ember.A([{ food: 'apple', isFruit: true }, { food: 'beans', isFruit: false }]);\n\nthings.filterBy('food', 'beans'); // [{ food: 'beans', isFruit: false }]\nthings.filterBy('isFruit'); // [{ food: 'apple', isFruit: true }]\n```",
|
|
11523
11523
|
"itemtype": "method",
|
|
11524
11524
|
"name": "filterBy",
|
|
@@ -11545,8 +11545,8 @@
|
|
|
11545
11545
|
"module": "@ember/array"
|
|
11546
11546
|
},
|
|
11547
11547
|
{
|
|
11548
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11549
|
-
"line":
|
|
11548
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11549
|
+
"line": 906,
|
|
11550
11550
|
"description": "Returns an array with the items that do not have truthy values for the provided key.\nYou can pass an optional second argument with a target value to reject for the key.\nOtherwise this will reject objects where the provided property evaluates to false.\n\nExample Usage:\n\n```javascript\n let food = [\n { name: \"apple\", isFruit: true },\n { name: \"carrot\", isFruit: false },\n { name: \"bread\", isFruit: false },\n ];\n food.rejectBy('isFruit'); // [{ name: \"carrot\", isFruit: false }, { name: \"bread\", isFruit: false }]\n food.rejectBy('name', 'carrot'); // [{ name: \"apple\", isFruit: true }}, { name: \"bread\", isFruit: false }]\n```",
|
|
11551
11551
|
"itemtype": "method",
|
|
11552
11552
|
"name": "rejectBy",
|
|
@@ -11573,8 +11573,8 @@
|
|
|
11573
11573
|
"module": "@ember/array"
|
|
11574
11574
|
},
|
|
11575
11575
|
{
|
|
11576
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11577
|
-
"line":
|
|
11576
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11577
|
+
"line": 934,
|
|
11578
11578
|
"description": "Returns the first item in the array for which the callback returns true.\nThis method is similar to the `find()` method defined in ECMAScript 2015.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nIt should return the `true` to include the item in the results, `false`\notherwise.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nExample Usage:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda' },\n { id: 2, name: 'Tom' },\n { id: 3, name: 'Melanie' },\n { id: 4, name: 'Leah' }\n];\n\nusers.find((user) => user.name == 'Tom'); // [{ id: 2, name: 'Tom' }]\nusers.find(({ id }) => id == 3); // [{ id: 3, name: 'Melanie' }]\n```",
|
|
11579
11579
|
"itemtype": "method",
|
|
11580
11580
|
"name": "find",
|
|
@@ -11601,8 +11601,8 @@
|
|
|
11601
11601
|
"module": "@ember/array"
|
|
11602
11602
|
},
|
|
11603
11603
|
{
|
|
11604
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11605
|
-
"line":
|
|
11604
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11605
|
+
"line": 981,
|
|
11606
11606
|
"description": "Returns the first item with a property matching the passed value. You\ncan pass an optional second argument with the target value. Otherwise\nthis will match any property that evaluates to `true`.\n\nThis method works much like the more generic `find()` method.\n\nUsage Example:\n\n```javascript\nlet users = [\n { id: 1, name: 'Yehuda', isTom: false },\n { id: 2, name: 'Tom', isTom: true },\n { id: 3, name: 'Melanie', isTom: false },\n { id: 4, name: 'Leah', isTom: false }\n];\n\nusers.findBy('id', 4); // { id: 4, name: 'Leah', isTom: false }\nusers.findBy('name', 'Melanie'); // { id: 3, name: 'Melanie', isTom: false }\nusers.findBy('isTom'); // { id: 2, name: 'Tom', isTom: true }\n```",
|
|
11607
11607
|
"itemtype": "method",
|
|
11608
11608
|
"name": "findBy",
|
|
@@ -11629,8 +11629,8 @@
|
|
|
11629
11629
|
"module": "@ember/array"
|
|
11630
11630
|
},
|
|
11631
11631
|
{
|
|
11632
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11633
|
-
"line":
|
|
11632
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11633
|
+
"line": 1015,
|
|
11634
11634
|
"description": "Returns `true` if the passed function returns true for every item in the\nenumeration. This corresponds with the `Array.prototype.every()` method defined in ES5.\n\nThe callback method should have the following signature:\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nAll params are optional. The method should return `true` or `false`.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. This is a good way\nto give your iterator function access to the current object.\n\nUsage example:\n\n```javascript\nfunction isAdult(person) {\n return person.age > 18;\n};\n\nconst people = Ember.A([{ name: 'John', age: 24 }, { name: 'Joan', age: 45 }]);\nconst areAllAdults = people.every(isAdult);\n```",
|
|
11635
11635
|
"itemtype": "method",
|
|
11636
11636
|
"name": "every",
|
|
@@ -11657,8 +11657,8 @@
|
|
|
11657
11657
|
"module": "@ember/array"
|
|
11658
11658
|
},
|
|
11659
11659
|
{
|
|
11660
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11661
|
-
"line":
|
|
11660
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11661
|
+
"line": 1057,
|
|
11662
11662
|
"description": "Returns `true` if the passed property resolves to the value of the second\nargument for all items in the array. This method is often simpler/faster\nthan using a callback.\n\nNote that like the native `Array.every`, `isEvery` will return true when called\non any empty array.\n```javascript\nclass Language {\n constructor(name, isProgrammingLanguage) {\n this.name = name;\n this.programmingLanguage = isProgrammingLanguage;\n }\n}\n\nconst compiledLanguages = [\n new Language('Java', true),\n new Language('Go', true),\n new Language('Rust', true)\n]\n\nconst languagesKnownByMe = [\n new Language('Javascript', true),\n new Language('English', false),\n new Language('Ruby', true)\n]\n\ncompiledLanguages.isEvery('programmingLanguage'); // true\nlanguagesKnownByMe.isEvery('programmingLanguage'); // false\n```",
|
|
11663
11663
|
"itemtype": "method",
|
|
11664
11664
|
"name": "isEvery",
|
|
@@ -11686,8 +11686,8 @@
|
|
|
11686
11686
|
"module": "@ember/array"
|
|
11687
11687
|
},
|
|
11688
11688
|
{
|
|
11689
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11690
|
-
"line":
|
|
11689
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11690
|
+
"line": 1101,
|
|
11691
11691
|
"description": "The any() method executes the callback function once for each element\npresent in the array until it finds the one where callback returns a truthy\nvalue (i.e. `true`). If such an element is found, any() immediately returns\ntrue. Otherwise, any() returns false.\n\n```javascript\nfunction(item, index, array);\n```\n\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array object itself.\n\nNote that in addition to a callback, you can also pass an optional target\nobject that will be set as `this` on the context. It can be a good way\nto give your iterator function access to an object in cases where an ES6\narrow function would not be appropriate.\n\nUsage Example:\n\n```javascript\nlet includesManager = people.any(this.findPersonInManagersList, this);\n\nlet includesStockHolder = people.any(person => {\n return this.findPersonInStockHoldersList(person)\n});\n\nif (includesManager || includesStockHolder) {\n Paychecks.addBiggerBonus();\n}\n```",
|
|
11692
11692
|
"itemtype": "method",
|
|
11693
11693
|
"name": "any",
|
|
@@ -11714,8 +11714,8 @@
|
|
|
11714
11714
|
"module": "@ember/array"
|
|
11715
11715
|
},
|
|
11716
11716
|
{
|
|
11717
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11718
|
-
"line":
|
|
11717
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11718
|
+
"line": 1145,
|
|
11719
11719
|
"description": "Returns `true` if the passed property resolves to the value of the second\nargument for any item in the array. This method is often simpler/faster\nthan using a callback.\n\nExample usage:\n\n```javascript\nconst food = [\n { food: 'apple', isFruit: true },\n { food: 'bread', isFruit: false },\n { food: 'banana', isFruit: true }\n];\n\nfood.isAny('isFruit'); // true\n```",
|
|
11720
11720
|
"itemtype": "method",
|
|
11721
11721
|
"name": "isAny",
|
|
@@ -11743,8 +11743,8 @@
|
|
|
11743
11743
|
"module": "@ember/array"
|
|
11744
11744
|
},
|
|
11745
11745
|
{
|
|
11746
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11747
|
-
"line":
|
|
11746
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11747
|
+
"line": 1175,
|
|
11748
11748
|
"description": "This will combine the values of the array into a single value. It\nis a useful way to collect a summary value from an array. This\ncorresponds to the `reduce()` method defined in JavaScript 1.8.\n\nThe callback method you provide should have the following signature (all\nparameters are optional):\n\n```javascript\nfunction(previousValue, item, index, array);\n```\n\n- `previousValue` is the value returned by the last call to the iterator.\n- `item` is the current item in the iteration.\n- `index` is the current index in the iteration.\n- `array` is the array itself.\n\nReturn the new cumulative value.\n\nIn addition to the callback you can also pass an `initialValue`. An error\nwill be raised if you do not pass an initial value and the enumerator is\nempty.\n\nNote that unlike the other methods, this method does not allow you to\npass a target object to set as this for the callback. It's part of the\nspec. Sorry.\n\nExample Usage:\n\n```javascript\n let numbers = [1, 2, 3, 4, 5];\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }); // 15 (1 + 2 + 3 + 4 + 5)\n\n numbers.reduce(function(summation, current) {\n return summation + current;\n }, -15); // 0 (-15 + 1 + 2 + 3 + 4 + 5)\n\n\n let binaryValues = [true, false, false];\n\n binaryValues.reduce(function(truthValue, current) {\n return truthValue && current;\n }); // false (true && false && false)\n```",
|
|
11749
11749
|
"itemtype": "method",
|
|
11750
11750
|
"name": "reduce",
|
|
@@ -11770,8 +11770,8 @@
|
|
|
11770
11770
|
"module": "@ember/array"
|
|
11771
11771
|
},
|
|
11772
11772
|
{
|
|
11773
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11774
|
-
"line":
|
|
11773
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11774
|
+
"line": 1246,
|
|
11775
11775
|
"description": "Invokes the named method on every object in the receiver that\nimplements it. This method corresponds to the implementation in\nPrototype 1.6.\n\n```javascript\nclass Person {\n name = null;\n\n constructor(name) {\n this.name = name;\n }\n\n greet(prefix='Hello') {\n return `${prefix} ${this.name}`;\n }\n}\n\nlet people = [new Person('Joe'), new Person('Matt')];\n\npeople.invoke('greet'); // ['Hello Joe', 'Hello Matt']\npeople.invoke('greet', 'Bonjour'); // ['Bonjour Joe', 'Bonjour Matt']\n```",
|
|
11776
11776
|
"itemtype": "method",
|
|
11777
11777
|
"name": "invoke",
|
|
@@ -11797,8 +11797,8 @@
|
|
|
11797
11797
|
"module": "@ember/array"
|
|
11798
11798
|
},
|
|
11799
11799
|
{
|
|
11800
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11801
|
-
"line":
|
|
11800
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11801
|
+
"line": 1285,
|
|
11802
11802
|
"description": "Simply converts the object into a genuine array. The order is not\nguaranteed. Corresponds to the method implemented by Prototype.",
|
|
11803
11803
|
"itemtype": "method",
|
|
11804
11804
|
"name": "toArray",
|
|
@@ -11812,8 +11812,8 @@
|
|
|
11812
11812
|
"module": "@ember/array"
|
|
11813
11813
|
},
|
|
11814
11814
|
{
|
|
11815
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11816
|
-
"line":
|
|
11815
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11816
|
+
"line": 1297,
|
|
11817
11817
|
"description": "Returns a copy of the array with all `null` and `undefined` elements removed.\n\n```javascript\nlet arr = ['a', null, 'c', undefined];\narr.compact(); // ['a', 'c']\n```",
|
|
11818
11818
|
"itemtype": "method",
|
|
11819
11819
|
"name": "compact",
|
|
@@ -11827,8 +11827,8 @@
|
|
|
11827
11827
|
"module": "@ember/array"
|
|
11828
11828
|
},
|
|
11829
11829
|
{
|
|
11830
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11831
|
-
"line":
|
|
11830
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11831
|
+
"line": 1313,
|
|
11832
11832
|
"description": "Used to determine if the array contains the passed object.\nReturns `true` if found, `false` otherwise.\n\nThe optional `startAt` argument can be used to pass a starting\nindex to search from, effectively slicing the searchable portion\nof the array. If it's negative it will add the array length to\nthe startAt value passed in as the index to search from. If less\nthan or equal to `-1 * array.length` the entire array is searched.\n\nThis method has the same behavior of JavaScript's [Array.includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).\n\n```javascript\n[1, 2, 3].includes(2); // true\n[1, 2, 3].includes(4); // false\n[1, 2, 3].includes(3, 2); // true\n[1, 2, 3].includes(3, 3); // false\n[1, 2, 3].includes(3, -1); // true\n[1, 2, 3].includes(1, -1); // false\n[1, 2, 3].includes(1, -4); // true\n[1, 2, NaN].includes(NaN); // true\n```",
|
|
11833
11833
|
"itemtype": "method",
|
|
11834
11834
|
"name": "includes",
|
|
@@ -11854,8 +11854,8 @@
|
|
|
11854
11854
|
"module": "@ember/array"
|
|
11855
11855
|
},
|
|
11856
11856
|
{
|
|
11857
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11858
|
-
"line":
|
|
11857
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11858
|
+
"line": 1346,
|
|
11859
11859
|
"description": "Sorts the array by the keys specified in the argument.\n\nYou may provide multiple arguments to sort by multiple properties.\n\n```javascript\n let colors = [\n { name: 'red', weight: 500 },\n { name: 'green', weight: 600 },\n { name: 'blue', weight: 500 }\n];\n\n colors.sortBy('name');\n // [{name: 'blue', weight: 500}, {name: 'green', weight: 600}, {name: 'red', weight: 500}]\n\n colors.sortBy('weight', 'name');\n // [{name: 'blue', weight: 500}, {name: 'red', weight: 500}, {name: 'green', weight: 600}]\n ```",
|
|
11860
11860
|
"itemtype": "method",
|
|
11861
11861
|
"name": "sortBy",
|
|
@@ -11877,8 +11877,8 @@
|
|
|
11877
11877
|
"module": "@ember/array"
|
|
11878
11878
|
},
|
|
11879
11879
|
{
|
|
11880
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11881
|
-
"line":
|
|
11880
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11881
|
+
"line": 1390,
|
|
11882
11882
|
"description": "Returns a new array that contains only unique values. The default\nimplementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = ['a', 'a', 'b', 'b'];\narr.uniq(); // ['a', 'b']\n```\n\nThis only works on primitive data types, e.g. Strings, Numbers, etc.",
|
|
11883
11883
|
"itemtype": "method",
|
|
11884
11884
|
"name": "uniq",
|
|
@@ -11892,8 +11892,8 @@
|
|
|
11892
11892
|
"module": "@ember/array"
|
|
11893
11893
|
},
|
|
11894
11894
|
{
|
|
11895
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11896
|
-
"line":
|
|
11895
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11896
|
+
"line": 1409,
|
|
11897
11897
|
"description": "Returns a new array that contains only items containing a unique property value.\nThe default implementation returns an array regardless of the receiver type.\n\n```javascript\nlet arr = [{ value: 'a' }, { value: 'a' }, { value: 'b' }, { value: 'b' }];\narr.uniqBy('value'); // [{ value: 'a' }, { value: 'b' }]\n\nlet arr = [2.2, 2.1, 3.2, 3.3];\narr.uniqBy(Math.floor); // [2.2, 3.2];\n```",
|
|
11898
11898
|
"itemtype": "method",
|
|
11899
11899
|
"name": "uniqBy",
|
|
@@ -11914,8 +11914,8 @@
|
|
|
11914
11914
|
"module": "@ember/array"
|
|
11915
11915
|
},
|
|
11916
11916
|
{
|
|
11917
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11918
|
-
"line":
|
|
11917
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11918
|
+
"line": 1431,
|
|
11919
11919
|
"description": "Returns a new array that excludes the passed value. The default\nimplementation returns an array regardless of the receiver type.\nIf the receiver does not contain the value it returns the original array.\n\n```javascript\nlet arr = ['a', 'b', 'a', 'c'];\narr.without('a'); // ['b', 'c']\n```",
|
|
11920
11920
|
"itemtype": "method",
|
|
11921
11921
|
"name": "without",
|
|
@@ -11936,8 +11936,8 @@
|
|
|
11936
11936
|
"module": "@ember/array"
|
|
11937
11937
|
},
|
|
11938
11938
|
{
|
|
11939
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11940
|
-
"line":
|
|
11939
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11940
|
+
"line": 1496,
|
|
11941
11941
|
"description": "__Required.__ You must implement this method to apply this mixin.\n\nThis is one of the primitives you must implement to support `Array`.\nYou should replace amt objects started at idx with the objects in the\npassed array.\n\nNote that this method is expected to validate the type(s) of objects that it expects.",
|
|
11942
11942
|
"itemtype": "method",
|
|
11943
11943
|
"name": "replace",
|
|
@@ -11965,8 +11965,8 @@
|
|
|
11965
11965
|
"module": "@ember/array"
|
|
11966
11966
|
},
|
|
11967
11967
|
{
|
|
11968
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11969
|
-
"line":
|
|
11968
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11969
|
+
"line": 1515,
|
|
11970
11970
|
"description": "Remove all elements from the array. This is useful if you\nwant to reuse an existing array without having to recreate it.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.length; // 3\ncolors.clear(); // []\ncolors.length; // 0\n```",
|
|
11971
11971
|
"itemtype": "method",
|
|
11972
11972
|
"name": "clear",
|
|
@@ -11980,8 +11980,8 @@
|
|
|
11980
11980
|
"module": "@ember/array"
|
|
11981
11981
|
},
|
|
11982
11982
|
{
|
|
11983
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
11984
|
-
"line":
|
|
11983
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
11984
|
+
"line": 1541,
|
|
11985
11985
|
"description": "This will use the primitive `replace()` method to insert an object at the\nspecified index.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.insertAt(2, 'yellow'); // ['red', 'green', 'yellow', 'blue']\ncolors.insertAt(5, 'orange'); // Error: Index out of range\n```",
|
|
11986
11986
|
"itemtype": "method",
|
|
11987
11987
|
"name": "insertAt",
|
|
@@ -12007,8 +12007,8 @@
|
|
|
12007
12007
|
"module": "@ember/array"
|
|
12008
12008
|
},
|
|
12009
12009
|
{
|
|
12010
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12011
|
-
"line":
|
|
12010
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12011
|
+
"line": 1563,
|
|
12012
12012
|
"description": "Remove an object at the specified index using the `replace()` primitive\nmethod. You can pass either a single index, or a start and a length.\n\nIf you pass a start and length that is beyond the\nlength this method will throw an assertion.\n\n```javascript\nlet colors = ['red', 'green', 'blue', 'yellow', 'orange'];\n\ncolors.removeAt(0); // ['green', 'blue', 'yellow', 'orange']\ncolors.removeAt(2, 2); // ['green', 'blue']\ncolors.removeAt(4, 2); // Error: Index out of range\n```",
|
|
12013
12013
|
"itemtype": "method",
|
|
12014
12014
|
"name": "removeAt",
|
|
@@ -12034,8 +12034,8 @@
|
|
|
12034
12034
|
"module": "@ember/array"
|
|
12035
12035
|
},
|
|
12036
12036
|
{
|
|
12037
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12038
|
-
"line":
|
|
12037
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12038
|
+
"line": 1588,
|
|
12039
12039
|
"description": "Push the object onto the end of the array. Works just like `push()` but it\nis KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green'];\n\ncolors.pushObject('black'); // ['red', 'green', 'black']\ncolors.pushObject(['yellow']); // ['red', 'green', ['yellow']]\n```",
|
|
12040
12040
|
"itemtype": "method",
|
|
12041
12041
|
"name": "pushObject",
|
|
@@ -12055,8 +12055,8 @@
|
|
|
12055
12055
|
"module": "@ember/array"
|
|
12056
12056
|
},
|
|
12057
12057
|
{
|
|
12058
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12059
|
-
"line":
|
|
12058
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12059
|
+
"line": 1608,
|
|
12060
12060
|
"description": "Add the objects in the passed array to the end of the array. Defers\nnotifying observers of the change until all objects are added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.pushObjects(['yellow', 'orange']); // ['red', 'yellow', 'orange']\n```",
|
|
12061
12061
|
"itemtype": "method",
|
|
12062
12062
|
"name": "pushObjects",
|
|
@@ -12064,12 +12064,12 @@
|
|
|
12064
12064
|
{
|
|
12065
12065
|
"name": "objects",
|
|
12066
12066
|
"description": "the objects to add",
|
|
12067
|
-
"type": "
|
|
12067
|
+
"type": "Array"
|
|
12068
12068
|
}
|
|
12069
12069
|
],
|
|
12070
12070
|
"return": {
|
|
12071
12071
|
"description": "receiver",
|
|
12072
|
-
"type": "
|
|
12072
|
+
"type": "MutableArray"
|
|
12073
12073
|
},
|
|
12074
12074
|
"access": "public",
|
|
12075
12075
|
"tagname": "",
|
|
@@ -12077,8 +12077,8 @@
|
|
|
12077
12077
|
"module": "@ember/array"
|
|
12078
12078
|
},
|
|
12079
12079
|
{
|
|
12080
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12081
|
-
"line":
|
|
12080
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12081
|
+
"line": 1628,
|
|
12082
12082
|
"description": "Pop object from array or nil if none are left. Works just like `pop()` but\nit is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.popObject(); // 'blue'\nconsole.log(colors); // ['red', 'green']\n```",
|
|
12083
12083
|
"itemtype": "method",
|
|
12084
12084
|
"name": "popObject",
|
|
@@ -12091,8 +12091,8 @@
|
|
|
12091
12091
|
"module": "@ember/array"
|
|
12092
12092
|
},
|
|
12093
12093
|
{
|
|
12094
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12095
|
-
"line":
|
|
12094
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12095
|
+
"line": 1654,
|
|
12096
12096
|
"description": "Shift an object from start of array or nil if none are left. Works just\nlike `shift()` but it is KVO-compliant.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.shiftObject(); // 'red'\nconsole.log(colors); // ['green', 'blue']\n```",
|
|
12097
12097
|
"itemtype": "method",
|
|
12098
12098
|
"name": "shiftObject",
|
|
@@ -12105,8 +12105,8 @@
|
|
|
12105
12105
|
"module": "@ember/array"
|
|
12106
12106
|
},
|
|
12107
12107
|
{
|
|
12108
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12109
|
-
"line":
|
|
12108
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12109
|
+
"line": 1679,
|
|
12110
12110
|
"description": "Unshift an object to start of array. Works just like `unshift()` but it is\nKVO-compliant.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObject('yellow'); // ['yellow', 'red']\ncolors.unshiftObject(['black']); // [['black'], 'yellow', 'red']\n```",
|
|
12111
12111
|
"itemtype": "method",
|
|
12112
12112
|
"name": "unshiftObject",
|
|
@@ -12126,8 +12126,8 @@
|
|
|
12126
12126
|
"module": "@ember/array"
|
|
12127
12127
|
},
|
|
12128
12128
|
{
|
|
12129
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12130
|
-
"line":
|
|
12129
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12130
|
+
"line": 1699,
|
|
12131
12131
|
"description": "Adds the named objects to the beginning of the array. Defers notifying\nobservers until all objects have been added.\n\n```javascript\nlet colors = ['red'];\n\ncolors.unshiftObjects(['black', 'white']); // ['black', 'white', 'red']\ncolors.unshiftObjects('yellow'); // Type Error: 'undefined' is not a function\n```",
|
|
12132
12132
|
"itemtype": "method",
|
|
12133
12133
|
"name": "unshiftObjects",
|
|
@@ -12148,8 +12148,8 @@
|
|
|
12148
12148
|
"module": "@ember/array"
|
|
12149
12149
|
},
|
|
12150
12150
|
{
|
|
12151
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12152
|
-
"line":
|
|
12151
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12152
|
+
"line": 1720,
|
|
12153
12153
|
"description": "Reverse objects in the array. Works just like `reverse()` but it is\nKVO-compliant.",
|
|
12154
12154
|
"itemtype": "method",
|
|
12155
12155
|
"name": "reverseObjects",
|
|
@@ -12163,8 +12163,8 @@
|
|
|
12163
12163
|
"module": "@ember/array"
|
|
12164
12164
|
},
|
|
12165
12165
|
{
|
|
12166
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12167
|
-
"line":
|
|
12166
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12167
|
+
"line": 1739,
|
|
12168
12168
|
"description": "Replace all the receiver's content with content of the argument.\nIf argument is an empty array receiver will be cleared.\n\n```javascript\nlet colors = ['red', 'green', 'blue'];\n\ncolors.setObjects(['black', 'white']); // ['black', 'white']\ncolors.setObjects([]); // []\n```",
|
|
12169
12169
|
"itemtype": "method",
|
|
12170
12170
|
"name": "setObjects",
|
|
@@ -12185,8 +12185,8 @@
|
|
|
12185
12185
|
"module": "@ember/array"
|
|
12186
12186
|
},
|
|
12187
12187
|
{
|
|
12188
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12189
|
-
"line":
|
|
12188
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12189
|
+
"line": 1766,
|
|
12190
12190
|
"description": "Remove all occurrences of an object in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin', 'Lima', 'Chicago'];\n\ncities.removeObject('Chicago'); // ['Berlin', 'Lima']\ncities.removeObject('Lima'); // ['Berlin']\ncities.removeObject('Tokyo') // ['Berlin']\n```",
|
|
12191
12191
|
"itemtype": "method",
|
|
12192
12192
|
"name": "removeObject",
|
|
@@ -12207,8 +12207,8 @@
|
|
|
12207
12207
|
"module": "@ember/array"
|
|
12208
12208
|
},
|
|
12209
12209
|
{
|
|
12210
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12211
|
-
"line":
|
|
12210
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12211
|
+
"line": 1794,
|
|
12212
12212
|
"description": "Removes each object in the passed array from the receiver.",
|
|
12213
12213
|
"itemtype": "method",
|
|
12214
12214
|
"name": "removeObjects",
|
|
@@ -12229,8 +12229,8 @@
|
|
|
12229
12229
|
"module": "@ember/array"
|
|
12230
12230
|
},
|
|
12231
12231
|
{
|
|
12232
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12233
|
-
"line":
|
|
12232
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12233
|
+
"line": 1812,
|
|
12234
12234
|
"description": "Push the object onto the end of the array if it is not already\npresent in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin'];\n\ncities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']\ncities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']\n```",
|
|
12235
12235
|
"itemtype": "method",
|
|
12236
12236
|
"name": "addObject",
|
|
@@ -12251,8 +12251,8 @@
|
|
|
12251
12251
|
"module": "@ember/array"
|
|
12252
12252
|
},
|
|
12253
12253
|
{
|
|
12254
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12255
|
-
"line":
|
|
12254
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12255
|
+
"line": 1838,
|
|
12256
12256
|
"description": "Adds each object in the passed array to the receiver.",
|
|
12257
12257
|
"itemtype": "method",
|
|
12258
12258
|
"name": "addObjects",
|
|
@@ -12273,8 +12273,8 @@
|
|
|
12273
12273
|
"module": "@ember/array"
|
|
12274
12274
|
},
|
|
12275
12275
|
{
|
|
12276
|
-
"file": "packages/@ember/-internals/runtime/lib/mixins/array.
|
|
12277
|
-
"line":
|
|
12276
|
+
"file": "packages/@ember/-internals/runtime/lib/mixins/array.ts",
|
|
12277
|
+
"line": 1854,
|
|
12278
12278
|
"description": "Creates an `Ember.NativeArray` from an Array-like object.\nDoes not modify the original object's contents. `A()` is not needed if\n`EmberENV.EXTEND_PROTOTYPES` is `true` (the default value). However,\nit is recommended that you use `A()` when creating addons for\nember or when you can not guarantee that `EmberENV.EXTEND_PROTOTYPES`\nwill be `true`.\n\nExample\n\n```app/components/my-component.js\nimport Component from '@ember/component';\nimport { A } from '@ember/array';\n\nexport default Component.extend({\n tagName: 'ul',\n classNames: ['pagination'],\n\n init() {\n this._super(...arguments);\n\n if (!this.get('content')) {\n this.set('content', A());\n this.set('otherContent', A([1,2,3]));\n }\n }\n});\n```",
|
|
12279
12279
|
"itemtype": "method",
|
|
12280
12280
|
"name": "A",
|
|
@@ -13408,67 +13408,67 @@
|
|
|
13408
13408
|
},
|
|
13409
13409
|
{
|
|
13410
13410
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13411
|
-
"line":
|
|
13411
|
+
"line": 127,
|
|
13412
13412
|
"class": "ArrayProxy",
|
|
13413
13413
|
"module": "@ember/array"
|
|
13414
13414
|
},
|
|
13415
13415
|
{
|
|
13416
13416
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13417
|
-
"line":
|
|
13417
|
+
"line": 129,
|
|
13418
13418
|
"class": "ArrayProxy",
|
|
13419
13419
|
"module": "@ember/array"
|
|
13420
13420
|
},
|
|
13421
13421
|
{
|
|
13422
13422
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13423
|
-
"line":
|
|
13423
|
+
"line": 132,
|
|
13424
13424
|
"class": "ArrayProxy",
|
|
13425
13425
|
"module": "@ember/array"
|
|
13426
13426
|
},
|
|
13427
13427
|
{
|
|
13428
13428
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13429
|
-
"line":
|
|
13429
|
+
"line": 134,
|
|
13430
13430
|
"class": "ArrayProxy",
|
|
13431
13431
|
"module": "@ember/array"
|
|
13432
13432
|
},
|
|
13433
13433
|
{
|
|
13434
13434
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13435
|
-
"line":
|
|
13435
|
+
"line": 137,
|
|
13436
13436
|
"class": "ArrayProxy",
|
|
13437
13437
|
"module": "@ember/array"
|
|
13438
13438
|
},
|
|
13439
13439
|
{
|
|
13440
13440
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13441
|
-
"line":
|
|
13441
|
+
"line": 139,
|
|
13442
13442
|
"class": "ArrayProxy",
|
|
13443
13443
|
"module": "@ember/array"
|
|
13444
13444
|
},
|
|
13445
13445
|
{
|
|
13446
13446
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13447
|
-
"line":
|
|
13447
|
+
"line": 141,
|
|
13448
13448
|
"class": "ArrayProxy",
|
|
13449
13449
|
"module": "@ember/array"
|
|
13450
13450
|
},
|
|
13451
13451
|
{
|
|
13452
13452
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13453
|
-
"line":
|
|
13453
|
+
"line": 143,
|
|
13454
13454
|
"class": "ArrayProxy",
|
|
13455
13455
|
"module": "@ember/array"
|
|
13456
13456
|
},
|
|
13457
13457
|
{
|
|
13458
13458
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13459
|
-
"line":
|
|
13459
|
+
"line": 145,
|
|
13460
13460
|
"class": "ArrayProxy",
|
|
13461
13461
|
"module": "@ember/array"
|
|
13462
13462
|
},
|
|
13463
13463
|
{
|
|
13464
13464
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13465
|
-
"line":
|
|
13465
|
+
"line": 147,
|
|
13466
13466
|
"class": "ArrayProxy",
|
|
13467
13467
|
"module": "@ember/array"
|
|
13468
13468
|
},
|
|
13469
13469
|
{
|
|
13470
13470
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13471
|
-
"line":
|
|
13471
|
+
"line": 164,
|
|
13472
13472
|
"description": "The content array. Must be an object that implements `Array` and/or\n`MutableArray.`",
|
|
13473
13473
|
"itemtype": "property",
|
|
13474
13474
|
"name": "content",
|
|
@@ -13480,7 +13480,7 @@
|
|
|
13480
13480
|
},
|
|
13481
13481
|
{
|
|
13482
13482
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13483
|
-
"line":
|
|
13483
|
+
"line": 176,
|
|
13484
13484
|
"description": "Should actually retrieve the object at the specified index from the\ncontent. You can override this method in subclasses to transform the\ncontent item to something new.\n\nThis method will only be called if content is non-`null`.",
|
|
13485
13485
|
"itemtype": "method",
|
|
13486
13486
|
"name": "objectAtContent",
|
|
@@ -13502,7 +13502,7 @@
|
|
|
13502
13502
|
},
|
|
13503
13503
|
{
|
|
13504
13504
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13505
|
-
"line":
|
|
13505
|
+
"line": 204,
|
|
13506
13506
|
"description": "Should actually replace the specified objects on the content array.\nYou can override this method in subclasses to transform the content item\ninto something new.\n\nThis method will only be called if content is non-`null`.",
|
|
13507
13507
|
"itemtype": "method",
|
|
13508
13508
|
"name": "replaceContent",
|
|
@@ -13520,7 +13520,7 @@
|
|
|
13520
13520
|
{
|
|
13521
13521
|
"name": "objects",
|
|
13522
13522
|
"description": "Optional array of objects to insert.",
|
|
13523
|
-
"type": "
|
|
13523
|
+
"type": "Array"
|
|
13524
13524
|
}
|
|
13525
13525
|
],
|
|
13526
13526
|
"return": {
|
|
@@ -13534,7 +13534,7 @@
|
|
|
13534
13534
|
},
|
|
13535
13535
|
{
|
|
13536
13536
|
"file": "packages/@ember/-internals/runtime/lib/system/array_proxy.ts",
|
|
13537
|
-
"line":
|
|
13537
|
+
"line": 393,
|
|
13538
13538
|
"description": "The array that the proxy pretends to be. In the default `ArrayProxy`\nimplementation, this and `content` are the same. Subclasses of `ArrayProxy`\ncan override this property to provide things like sorting and filtering.",
|
|
13539
13539
|
"itemtype": "property",
|
|
13540
13540
|
"name": "arrangedContent",
|
|
@@ -13794,7 +13794,7 @@
|
|
|
13794
13794
|
},
|
|
13795
13795
|
{
|
|
13796
13796
|
"file": "packages/@ember/-internals/runtime/lib/compare.ts",
|
|
13797
|
-
"line":
|
|
13797
|
+
"line": 53,
|
|
13798
13798
|
"description": "Compares two javascript values and returns:\n\n - -1 if the first is smaller than the second,\n - 0 if both are equal,\n - 1 if the first is greater than the second.\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 'hello'); // 0\n compare('abc', 'dfg'); // -1\n compare(2, 1); // 1\n ```\n\nIf the types of the two objects are different precedence occurs in the\nfollowing order, with types earlier in the list considered `<` types\nlater in the list:\n\n - undefined\n - null\n - boolean\n - number\n - string\n - array\n - object\n - instance\n - function\n - class\n - date\n\n ```javascript\n import { compare } from '@ember/utils';\n\n compare('hello', 50); // 1\n compare(50, 'hello'); // -1\n ```",
|
|
13799
13799
|
"itemtype": "method",
|
|
13800
13800
|
"name": "compare",
|
|
@@ -14761,7 +14761,7 @@
|
|
|
14761
14761
|
},
|
|
14762
14762
|
{
|
|
14763
14763
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14764
|
-
"line":
|
|
14764
|
+
"line": 233,
|
|
14765
14765
|
"description": "The root DOM element of the Application. This can be specified as an\nelement or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).\n\nThis is the element that will be passed to the Application's,\n`eventDispatcher`, which sets up the listeners for event delegation. Every\nview in your application should be a child of the element you specify here.",
|
|
14766
14766
|
"itemtype": "property",
|
|
14767
14767
|
"name": "rootElement",
|
|
@@ -14774,7 +14774,7 @@
|
|
|
14774
14774
|
},
|
|
14775
14775
|
{
|
|
14776
14776
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14777
|
-
"line":
|
|
14777
|
+
"line": 248,
|
|
14778
14778
|
"itemtype": "property",
|
|
14779
14779
|
"name": "_document",
|
|
14780
14780
|
"type": "Document | null",
|
|
@@ -14786,7 +14786,7 @@
|
|
|
14786
14786
|
},
|
|
14787
14787
|
{
|
|
14788
14788
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14789
|
-
"line":
|
|
14789
|
+
"line": 257,
|
|
14790
14790
|
"description": "The `Ember.EventDispatcher` responsible for delegating events to this\napplication's views.\n\nThe event dispatcher is created by the application at initialization time\nand sets up event listeners on the DOM element described by the\napplication's `rootElement` property.\n\nSee the documentation for `Ember.EventDispatcher` for more information.",
|
|
14791
14791
|
"itemtype": "property",
|
|
14792
14792
|
"name": "eventDispatcher",
|
|
@@ -14799,7 +14799,7 @@
|
|
|
14799
14799
|
},
|
|
14800
14800
|
{
|
|
14801
14801
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14802
|
-
"line":
|
|
14802
|
+
"line": 274,
|
|
14803
14803
|
"description": "The DOM events for which the event dispatcher should listen.\n\nBy default, the application's `Ember.EventDispatcher` listens\nfor a set of standard DOM events, such as `mousedown` and\n`keyup`, and delegates them to your application's `Ember.View`\ninstances.\n\nIf you would like additional bubbling events to be delegated to your\nviews, set your `Application`'s `customEvents` property\nto a hash containing the DOM event name as the key and the\ncorresponding view method name as the value. Setting an event to\na value of `null` will prevent a default event listener from being\nadded for that event.\n\nTo add new events to be listened to:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // add support for the paste event\n paste: 'paste'\n }\n});\n```\n\nTo prevent default events from being listened to:\n\n```app/app.js\nimport Application from '@ember/application';\n\nlet App = Application.extend({\n customEvents: {\n // remove support for mouseenter / mouseleave events\n mouseenter: null,\n mouseleave: null\n }\n});\n```",
|
|
14804
14804
|
"itemtype": "property",
|
|
14805
14805
|
"name": "customEvents",
|
|
@@ -14812,7 +14812,7 @@
|
|
|
14812
14812
|
},
|
|
14813
14813
|
{
|
|
14814
14814
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14815
|
-
"line":
|
|
14815
|
+
"line": 322,
|
|
14816
14816
|
"description": "Whether the application should automatically start routing and render\ntemplates to the `rootElement` on DOM ready. While default by true,\nother environments such as FastBoot or a testing harness can set this\nproperty to `false` and control the precise timing and behavior of the boot\nprocess.",
|
|
14817
14817
|
"itemtype": "property",
|
|
14818
14818
|
"name": "autoboot",
|
|
@@ -14825,7 +14825,7 @@
|
|
|
14825
14825
|
},
|
|
14826
14826
|
{
|
|
14827
14827
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14828
|
-
"line":
|
|
14828
|
+
"line": 336,
|
|
14829
14829
|
"description": "Whether the application should be configured for the legacy \"globals mode\".\nUnder this mode, the Application object serves as a global namespace for all\nclasses.\n\n```javascript\nimport Application from '@ember/application';\nimport Component from '@ember/component';\n\nlet App = Application.create({\n ...\n});\n\nApp.Router.reopen({\n location: 'none'\n});\n\nApp.Router.map({\n ...\n});\n\nApp.MyComponent = Component.extend({\n ...\n});\n```\n\nThis flag also exposes other internal APIs that assumes the existence of\na special \"default instance\", like `App.__container__.lookup(...)`.\n\nThis option is currently not configurable, its value is derived from\nthe `autoboot` flag – disabling `autoboot` also implies opting-out of\nglobals mode support, although they are ultimately orthogonal concerns.\n\nSome of the global modes features are already deprecated in 1.x. The\nexistence of this flag is to untangle the globals mode code paths from\nthe autoboot code paths, so that these legacy features can be reviewed\nfor deprecation/removal separately.\n\nForcing the (autoboot=true, _globalsMode=false) here and running the tests\nwould reveal all the places where we are still relying on these legacy\nbehavior internally (mostly just tests).",
|
|
14830
14830
|
"itemtype": "property",
|
|
14831
14831
|
"name": "_globalsMode",
|
|
@@ -14838,7 +14838,7 @@
|
|
|
14838
14838
|
},
|
|
14839
14839
|
{
|
|
14840
14840
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14841
|
-
"line":
|
|
14841
|
+
"line": 385,
|
|
14842
14842
|
"description": "An array of application instances created by `buildInstance()`. Used\ninternally to ensure that all instances get destroyed.",
|
|
14843
14843
|
"itemtype": "property",
|
|
14844
14844
|
"name": "_applicationInstances",
|
|
@@ -14850,7 +14850,7 @@
|
|
|
14850
14850
|
},
|
|
14851
14851
|
{
|
|
14852
14852
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14853
|
-
"line":
|
|
14853
|
+
"line": 435,
|
|
14854
14854
|
"description": "Create an ApplicationInstance for this application.",
|
|
14855
14855
|
"access": "public",
|
|
14856
14856
|
"tagname": "",
|
|
@@ -14865,7 +14865,7 @@
|
|
|
14865
14865
|
},
|
|
14866
14866
|
{
|
|
14867
14867
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14868
|
-
"line":
|
|
14868
|
+
"line": 460,
|
|
14869
14869
|
"description": "Start tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is created.",
|
|
14870
14870
|
"access": "private",
|
|
14871
14871
|
"tagname": "",
|
|
@@ -14876,7 +14876,7 @@
|
|
|
14876
14876
|
},
|
|
14877
14877
|
{
|
|
14878
14878
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14879
|
-
"line":
|
|
14879
|
+
"line": 471,
|
|
14880
14880
|
"description": "Stop tracking an ApplicationInstance for this application.\nUsed when the ApplicationInstance is about to be destroyed.",
|
|
14881
14881
|
"access": "private",
|
|
14882
14882
|
"tagname": "",
|
|
@@ -14887,7 +14887,7 @@
|
|
|
14887
14887
|
},
|
|
14888
14888
|
{
|
|
14889
14889
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14890
|
-
"line":
|
|
14890
|
+
"line": 484,
|
|
14891
14891
|
"description": "Enable the legacy globals mode by allowing this application to act\nas a global namespace. See the docs on the `_globalsMode` property\nfor details.\n\nMost of these features are already deprecated in 1.x, so we can\nstop using them internally and try to remove them.",
|
|
14892
14892
|
"access": "private",
|
|
14893
14893
|
"tagname": "",
|
|
@@ -14898,7 +14898,7 @@
|
|
|
14898
14898
|
},
|
|
14899
14899
|
{
|
|
14900
14900
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14901
|
-
"line":
|
|
14901
|
+
"line": 531,
|
|
14902
14902
|
"description": "Automatically kick-off the boot process for the application once the\nDOM has become ready.\n\nThe initialization itself is scheduled on the actions queue which\nensures that code-loading finishes before booting.\n\nIf you are asynchronously loading code, you should call `deferReadiness()`\nto defer booting, and then call `advanceReadiness()` once all of your code\nhas finished loading.",
|
|
14903
14903
|
"access": "private",
|
|
14904
14904
|
"tagname": "",
|
|
@@ -14909,7 +14909,7 @@
|
|
|
14909
14909
|
},
|
|
14910
14910
|
{
|
|
14911
14911
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14912
|
-
"line":
|
|
14912
|
+
"line": 571,
|
|
14913
14913
|
"description": "This is the autoboot flow:\n\n1. Boot the app by calling `this.boot()`\n2. Create an instance (or use the `__deprecatedInstance__` in globals mode)\n3. Boot the instance by calling `instance.boot()`\n4. Invoke the `App.ready()` callback\n5. Kick-off routing on the instance\n\nIdeally, this is all we would need to do:\n\n```javascript\n_autoBoot() {\n this.boot().then(() => {\n let instance = (this._globalsMode) ? this.__deprecatedInstance__ : this.buildInstance();\n return instance.boot();\n }).then((instance) => {\n App.ready();\n instance.startRouting();\n });\n}\n```\n\nUnfortunately, we cannot actually write this because we need to participate\nin the \"synchronous\" boot process. While the code above would work fine on\nthe initial boot (i.e. DOM ready), when `App.reset()` is called, we need to\nboot a new instance synchronously (see the documentation on `_bootSync()`\nfor details).\n\nBecause of this restriction, the actual logic of this method is located\ninside `didBecomeReady()`.",
|
|
14914
14914
|
"access": "private",
|
|
14915
14915
|
"tagname": "",
|
|
@@ -14920,7 +14920,7 @@
|
|
|
14920
14920
|
},
|
|
14921
14921
|
{
|
|
14922
14922
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14923
|
-
"line":
|
|
14923
|
+
"line": 616,
|
|
14924
14924
|
"description": "Use this to defer readiness until some condition is true.\n\nExample:\n\n```javascript\nimport Application from '@ember/application';\n\nlet App = Application.create();\n\nApp.deferReadiness();\n\nfetch('/auth-token')\n.then(response => response.json())\n.then(data => {\n App.token = data.token;\n App.advanceReadiness();\n});\n```\n\nThis allows you to perform asynchronous setup logic and defer\nbooting your application until the setup has finished.\n\nHowever, if the setup requires a loading UI, it might be better\nto use the router for this purpose.",
|
|
14925
14925
|
"itemtype": "method",
|
|
14926
14926
|
"name": "deferReadiness",
|
|
@@ -14931,7 +14931,7 @@
|
|
|
14931
14931
|
},
|
|
14932
14932
|
{
|
|
14933
14933
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14934
|
-
"line":
|
|
14934
|
+
"line": 666,
|
|
14935
14935
|
"description": "Call `advanceReadiness` after any asynchronous setup logic has completed.\nEach call to `deferReadiness` must be matched by a call to `advanceReadiness`\nor the application will never become ready and routing will not begin.",
|
|
14936
14936
|
"itemtype": "method",
|
|
14937
14937
|
"name": "advanceReadiness",
|
|
@@ -14945,7 +14945,7 @@
|
|
|
14945
14945
|
},
|
|
14946
14946
|
{
|
|
14947
14947
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14948
|
-
"line":
|
|
14948
|
+
"line": 705,
|
|
14949
14949
|
"description": "Initialize the application and return a promise that resolves with the `Application`\nobject when the boot process is complete.\n\nRun any application initializers and run the application load hook. These hooks may\nchoose to defer readiness. For example, an authentication hook might want to defer\nreadiness until the auth token has been retrieved.\n\nBy default, this method is called automatically on \"DOM ready\"; however, if autoboot\nis disabled, this is automatically called when the first application instance is\ncreated via `visit`.",
|
|
14950
14950
|
"access": "public",
|
|
14951
14951
|
"tagname": "",
|
|
@@ -14960,7 +14960,7 @@
|
|
|
14960
14960
|
},
|
|
14961
14961
|
{
|
|
14962
14962
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14963
|
-
"line":
|
|
14963
|
+
"line": 747,
|
|
14964
14964
|
"description": "Unfortunately, a lot of existing code assumes the booting process is\n\"synchronous\". Specifically, a lot of tests assumes the last call to\n`app.advanceReadiness()` or `app.reset()` will result in the app being\nfully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this assumption,\nso we created the asynchronous version above that returns a promise. But until\nwe have migrated all the code, we would have to expose this method for use\n*internally* in places where we need to boot an app \"synchronously\".",
|
|
14965
14965
|
"access": "private",
|
|
14966
14966
|
"tagname": "",
|
|
@@ -14969,7 +14969,7 @@
|
|
|
14969
14969
|
},
|
|
14970
14970
|
{
|
|
14971
14971
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14972
|
-
"line":
|
|
14972
|
+
"line": 786,
|
|
14973
14973
|
"description": "Reset the application. This is typically used only in tests. It cleans up\nthe application in the following order:\n\n1. Deactivate existing routes\n2. Destroy all objects in the container\n3. Create a new application container\n4. Re-route to the existing url\n\nTypical Example:\n\n```javascript\nimport Application from '@ember/application';\nlet App;\n\nrun(function() {\n App = Application.create();\n});\n\nmodule('acceptance test', {\n setup: function() {\n App.reset();\n }\n});\n\ntest('first test', function() {\n // App is freshly reset\n});\n\ntest('second test', function() {\n // App is again freshly reset\n});\n```\n\nAdvanced Example:\n\nOccasionally you may want to prevent the app from initializing during\nsetup. This could enable extra configuration, or enable asserting prior\nto the app becoming ready.\n\n```javascript\nimport Application from '@ember/application';\nlet App;\n\nrun(function() {\n App = Application.create();\n});\n\nmodule('acceptance test', {\n setup: function() {\n run(function() {\n App.reset();\n App.deferReadiness();\n });\n }\n});\n\ntest('first test', function() {\n ok(true, 'something before app is initialized');\n\n run(function() {\n App.advanceReadiness();\n });\n\n ok(true, 'something after app is initialized');\n});\n```",
|
|
14974
14974
|
"itemtype": "method",
|
|
14975
14975
|
"name": "reset",
|
|
@@ -14980,7 +14980,7 @@
|
|
|
14980
14980
|
},
|
|
14981
14981
|
{
|
|
14982
14982
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14983
|
-
"line":
|
|
14983
|
+
"line": 890,
|
|
14984
14984
|
"access": "private",
|
|
14985
14985
|
"tagname": "",
|
|
14986
14986
|
"itemtype": "method",
|
|
@@ -14990,7 +14990,7 @@
|
|
|
14990
14990
|
},
|
|
14991
14991
|
{
|
|
14992
14992
|
"file": "packages/@ember/application/lib/application.ts",
|
|
14993
|
-
"line":
|
|
14993
|
+
"line": 943,
|
|
14994
14994
|
"description": "Called when the Application has become ready, immediately before routing\nbegins. The call will be delayed until the DOM has become ready.",
|
|
14995
14995
|
"itemtype": "event",
|
|
14996
14996
|
"name": "ready",
|
|
@@ -15001,7 +15001,7 @@
|
|
|
15001
15001
|
},
|
|
15002
15002
|
{
|
|
15003
15003
|
"file": "packages/@ember/application/lib/application.ts",
|
|
15004
|
-
"line":
|
|
15004
|
+
"line": 968,
|
|
15005
15005
|
"description": "Boot a new instance of `ApplicationInstance` for the current\napplication and navigate it to the given `url`. Returns a `Promise` that\nresolves with the instance when the initial routing and rendering is\ncomplete, or rejects with any error that occurred during the boot process.\n\nWhen `autoboot` is disabled, calling `visit` would first cause the\napplication to boot, which runs the application initializers.\n\nThis method also takes a hash of boot-time configuration options for\ncustomizing the instance's behavior. See the documentation on\n`ApplicationInstance.BootOptions` for details.\n\n`ApplicationInstance.BootOptions` is an interface class that exists\npurely to document the available options; you do not need to construct it\nmanually. Simply pass a regular JavaScript object containing of the\ndesired options:\n\n```javascript\nMyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n```\n\n### Supported Scenarios\n\nWhile the `BootOptions` class exposes a large number of knobs, not all\ncombinations of them are valid; certain incompatible combinations might\nresult in unexpected behavior.\n\nFor example, booting the instance in the full browser environment\nwhile specifying a foreign `document` object (e.g. `{ isBrowser: true,\ndocument: iframe.contentDocument }`) does not work correctly today,\nlargely due to Ember's jQuery dependency.\n\nCurrently, there are three officially supported scenarios/configurations.\nUsages outside of these scenarios are not guaranteed to work, but please\nfeel free to file bug reports documenting your experience and any issues\nyou encountered to help expand support.\n\n#### Browser Applications (Manual Boot)\n\nThe setup is largely similar to how Ember works out-of-the-box. Normally,\nEmber will boot a default instance for your Application on \"DOM ready\".\nHowever, you can customize this behavior by disabling `autoboot`.\n\nFor example, this allows you to render a miniture demo of your application\ninto a specific area on your marketing website:\n\n```javascript\nimport MyApp from 'my-app';\n\n$(function() {\n let App = MyApp.create({ autoboot: false });\n\n let options = {\n // Override the router's location adapter to prevent it from updating\n // the URL in the address bar\n location: 'none',\n\n // Override the default `rootElement` on the app to render into a\n // specific `div` on the page\n rootElement: '#demo'\n };\n\n // Start the app at the special demo URL\n App.visit('/demo', options);\n});\n```\n\nOr perhaps you might want to boot two instances of your app on the same\npage for a split-screen multiplayer experience:\n\n```javascript\nimport MyApp from 'my-app';\n\n$(function() {\n let App = MyApp.create({ autoboot: false });\n\n let sessionId = MyApp.generateSessionID();\n\n let player1 = App.visit(`/matches/join?name=Player+1&session=${sessionId}`, { rootElement: '#left', location: 'none' });\n let player2 = App.visit(`/matches/join?name=Player+2&session=${sessionId}`, { rootElement: '#right', location: 'none' });\n\n Promise.all([player1, player2]).then(() => {\n // Both apps have completed the initial render\n $('#loading').fadeOut();\n });\n});\n```\n\nDo note that each app instance maintains their own registry/container, so\nthey will run in complete isolation by default.\n\n#### Server-Side Rendering (also known as FastBoot)\n\nThis setup allows you to run your Ember app in a server environment using\nNode.js and render its content into static HTML for SEO purposes.\n\n```javascript\nconst HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);\n\nfunction renderURL(url) {\n let dom = new SimpleDOM.Document();\n let rootElement = dom.body;\n let options = { isBrowser: false, document: dom, rootElement: rootElement };\n\n return MyApp.visit(options).then(instance => {\n try {\n return HTMLSerializer.serialize(rootElement.firstChild);\n } finally {\n instance.destroy();\n }\n });\n}\n```\n\nIn this scenario, because Ember does not have access to a global `document`\nobject in the Node.js environment, you must provide one explicitly. In practice,\nin the non-browser environment, the stand-in `document` object only needs to\nimplement a limited subset of the full DOM API. The `SimpleDOM` library is known\nto work.\n\nSince there is no DOM access in the non-browser environment, you must also\nspecify a DOM `Element` object in the same `document` for the `rootElement` option\n(as opposed to a selector string like `\"body\"`).\n\nSee the documentation on the `isBrowser`, `document` and `rootElement` properties\non `ApplicationInstance.BootOptions` for details.\n\n#### Server-Side Resource Discovery\n\nThis setup allows you to run the routing layer of your Ember app in a server\nenvironment using Node.js and completely disable rendering. This allows you\nto simulate and discover the resources (i.e. AJAX requests) needed to fulfill\na given request and eagerly \"push\" these resources to the client.\n\n```app/initializers/network-service.js\nimport BrowserNetworkService from 'app/services/network/browser';\nimport NodeNetworkService from 'app/services/network/node';\n\n// Inject a (hypothetical) service for abstracting all AJAX calls and use\n// the appropriate implementation on the client/server. This also allows the\n// server to log all the AJAX calls made during a particular request and use\n// that for resource-discovery purpose.\n\nexport function initialize(application) {\n if (window) { // browser\n application.register('service:network', BrowserNetworkService);\n } else { // node\n application.register('service:network', NodeNetworkService);\n }\n};\n\nexport default {\n name: 'network-service',\n initialize: initialize\n};\n```\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\n// An example of how the (hypothetical) service is used in routes.\n\nexport default class IndexRoute extends Route {\n @service network;\n\n model(params) {\n return this.network.fetch(`/api/posts/${params.post_id}.json`);\n }\n\n afterModel(post) {\n if (post.isExternalContent) {\n return this.network.fetch(`/api/external/?url=${post.externalURL}`);\n } else {\n return post;\n }\n }\n}\n```\n\n```javascript\n// Finally, put all the pieces together\n\nfunction discoverResourcesFor(url) {\n return MyApp.visit(url, { isBrowser: false, shouldRender: false }).then(instance => {\n let networkService = instance.lookup('service:network');\n return networkService.requests; // => { \"/api/posts/123.json\": \"...\" }\n });\n}\n```",
|
|
15006
15006
|
"access": "public",
|
|
15007
15007
|
"tagname": "",
|
|
@@ -16074,6 +16074,12 @@
|
|
|
16074
16074
|
"class": "Engine",
|
|
16075
16075
|
"module": "@ember/engine"
|
|
16076
16076
|
},
|
|
16077
|
+
{
|
|
16078
|
+
"file": "packages/@ember/engine/index.ts",
|
|
16079
|
+
"line": 470,
|
|
16080
|
+
"class": "Engine",
|
|
16081
|
+
"module": "@ember/engine"
|
|
16082
|
+
},
|
|
16077
16083
|
{
|
|
16078
16084
|
"file": "packages/@ember/engine/instance.ts",
|
|
16079
16085
|
"line": 39,
|
|
@@ -17273,8 +17279,8 @@
|
|
|
17273
17279
|
"module": "@ember/object"
|
|
17274
17280
|
},
|
|
17275
17281
|
{
|
|
17276
|
-
"file": "packages/@ember/object/index.
|
|
17277
|
-
"line":
|
|
17282
|
+
"file": "packages/@ember/object/index.ts",
|
|
17283
|
+
"line": 19,
|
|
17278
17284
|
"description": "Decorator that turns the target function into an Action which can be accessed\ndirectly by reference.\n\n```js\nimport Component from '@ember/component';\nimport { action, set } from '@ember/object';\n\nexport default class Tooltip extends Component {\n @action\n toggleShowing() {\n set(this, 'isShowing', !this.isShowing);\n }\n}\n```\n```hbs\n<!-- template.hbs -->\n<button {{action this.toggleShowing}}>Show tooltip</button>\n\n{{#if isShowing}}\n <div class=\"tooltip\">\n I'm a tooltip!\n </div>\n{{/if}}\n```\n\nDecorated actions also interop with the string style template actions:\n\n```hbs\n<!-- template.hbs -->\n<button {{action \"toggleShowing\"}}>Show tooltip</button>\n\n{{#if isShowing}}\n <div class=\"tooltip\">\n I'm a tooltip!\n </div>\n{{/if}}\n```\n\nIt also binds the function directly to the instance, so it can be used in any\ncontext and will correctly refer to the class it came from:\n\n```hbs\n<!-- template.hbs -->\n<button\n {{did-insert this.toggleShowing}}\n {{on \"click\" this.toggleShowing}}\n>\n Show tooltip\n</button>\n\n{{#if isShowing}}\n <div class=\"tooltip\">\n I'm a tooltip!\n </div>\n{{/if}}\n```\n\nThis can also be used in JavaScript code directly:\n\n```js\nimport Component from '@ember/component';\nimport { action, set } from '@ember/object';\n\nexport default class Tooltip extends Component {\n constructor() {\n super(...arguments);\n\n // this.toggleShowing is still bound correctly when added to\n // the event listener\n document.addEventListener('click', this.toggleShowing);\n }\n\n @action\n toggleShowing() {\n set(this, 'isShowing', !this.isShowing);\n }\n}\n```\n\nThis is considered best practice, since it means that methods will be bound\ncorrectly no matter where they are used. By contrast, the `{{action}}` helper\nand modifier can also be used to bind context, but it will be required for\nevery usage of the method:\n\n```hbs\n<!-- template.hbs -->\n<button\n {{did-insert (action this.toggleShowing)}}\n {{on \"click\" (action this.toggleShowing)}}\n>\n Show tooltip\n</button>\n\n{{#if isShowing}}\n <div class=\"tooltip\">\n I'm a tooltip!\n </div>\n{{/if}}\n```\n\nThey also do not have equivalents in JavaScript directly, so they cannot be\nused for other situations where binding would be useful.",
|
|
17279
17285
|
"access": "public",
|
|
17280
17286
|
"tagname": "",
|
|
@@ -17996,8 +18002,8 @@
|
|
|
17996
18002
|
"module": "@ember/string"
|
|
17997
18003
|
},
|
|
17998
18004
|
{
|
|
17999
|
-
"file": "packages/ember-testing/lib/adapters/adapter.
|
|
18000
|
-
"line":
|
|
18005
|
+
"file": "packages/ember-testing/lib/adapters/adapter.ts",
|
|
18006
|
+
"line": 20,
|
|
18001
18007
|
"description": "This callback will be called whenever an async operation is about to start.\n\nOverride this to call your framework's methods that handle async\noperations.",
|
|
18002
18008
|
"access": "public",
|
|
18003
18009
|
"tagname": "",
|
|
@@ -18007,8 +18013,8 @@
|
|
|
18007
18013
|
"module": "@ember/test"
|
|
18008
18014
|
},
|
|
18009
18015
|
{
|
|
18010
|
-
"file": "packages/ember-testing/lib/adapters/adapter.
|
|
18011
|
-
"line":
|
|
18016
|
+
"file": "packages/ember-testing/lib/adapters/adapter.ts",
|
|
18017
|
+
"line": 31,
|
|
18012
18018
|
"description": "This callback will be called whenever an async operation has completed.",
|
|
18013
18019
|
"access": "public",
|
|
18014
18020
|
"tagname": "",
|
|
@@ -18018,8 +18024,8 @@
|
|
|
18018
18024
|
"module": "@ember/test"
|
|
18019
18025
|
},
|
|
18020
18026
|
{
|
|
18021
|
-
"file": "packages/ember-testing/lib/adapters/adapter.
|
|
18022
|
-
"line":
|
|
18027
|
+
"file": "packages/ember-testing/lib/adapters/adapter.ts",
|
|
18028
|
+
"line": 39,
|
|
18023
18029
|
"description": "Override this method with your testing framework's false assertion.\nThis function is called whenever an exception occurs causing the testing\npromise to fail.\n\nQUnit example:\n\n```javascript\n exception: function(error) {\n ok(false, error);\n };\n```",
|
|
18024
18030
|
"access": "public",
|
|
18025
18031
|
"tagname": "",
|
|
@@ -18036,8 +18042,8 @@
|
|
|
18036
18042
|
"module": "@ember/test"
|
|
18037
18043
|
},
|
|
18038
18044
|
{
|
|
18039
|
-
"file": "packages/ember-testing/lib/ext/application.
|
|
18040
|
-
"line":
|
|
18045
|
+
"file": "packages/ember-testing/lib/ext/application.ts",
|
|
18046
|
+
"line": 23,
|
|
18041
18047
|
"description": "This property contains the testing helpers for the current application. These\nare created once you call `injectTestHelpers` on your `Application`\ninstance. The included helpers are also available on the `window` object by\ndefault, but can be used from this object on the individual application also.",
|
|
18042
18048
|
"itemtype": "property",
|
|
18043
18049
|
"name": "testHelpers",
|
|
@@ -18050,8 +18056,8 @@
|
|
|
18050
18056
|
"namespace": "Ember.Test"
|
|
18051
18057
|
},
|
|
18052
18058
|
{
|
|
18053
|
-
"file": "packages/ember-testing/lib/ext/application.
|
|
18054
|
-
"line":
|
|
18059
|
+
"file": "packages/ember-testing/lib/ext/application.ts",
|
|
18060
|
+
"line": 36,
|
|
18055
18061
|
"description": "This property will contain the original methods that were registered\non the `helperContainer` before `injectTestHelpers` is called.\n\nWhen `removeTestHelpers` is called, these methods are restored to the\n`helperContainer`.",
|
|
18056
18062
|
"itemtype": "property",
|
|
18057
18063
|
"name": "originalMethods",
|
|
@@ -18065,8 +18071,8 @@
|
|
|
18065
18071
|
"namespace": "Ember.Test"
|
|
18066
18072
|
},
|
|
18067
18073
|
{
|
|
18068
|
-
"file": "packages/ember-testing/lib/ext/application.
|
|
18069
|
-
"line":
|
|
18074
|
+
"file": "packages/ember-testing/lib/ext/application.ts",
|
|
18075
|
+
"line": 51,
|
|
18070
18076
|
"description": "This property indicates whether or not this application is currently in\ntesting mode. This is set when `setupForTesting` is called on the current\napplication.",
|
|
18071
18077
|
"itemtype": "property",
|
|
18072
18078
|
"name": "testing",
|
|
@@ -18080,8 +18086,8 @@
|
|
|
18080
18086
|
"namespace": "Ember.Test"
|
|
18081
18087
|
},
|
|
18082
18088
|
{
|
|
18083
|
-
"file": "packages/ember-testing/lib/ext/application.
|
|
18084
|
-
"line":
|
|
18089
|
+
"file": "packages/ember-testing/lib/ext/application.ts",
|
|
18090
|
+
"line": 64,
|
|
18085
18091
|
"description": "This hook defers the readiness of the application, so that you can start\nthe app when your tests are ready to run. It also sets the router's\nlocation to 'none', so that the window's location will not be modified\n(preventing both accidental leaking of state between tests and interference\nwith your testing framework). `setupForTesting` should only be called after\nsetting a custom `router` class (for example `App.Router = Router.extend(`).\n\nExample:\n\n```\nApp.setupForTesting();\n```",
|
|
18086
18092
|
"itemtype": "method",
|
|
18087
18093
|
"name": "setupForTesting",
|
|
@@ -18092,8 +18098,8 @@
|
|
|
18092
18098
|
"namespace": "Ember.Test"
|
|
18093
18099
|
},
|
|
18094
18100
|
{
|
|
18095
|
-
"file": "packages/ember-testing/lib/ext/application.
|
|
18096
|
-
"line":
|
|
18101
|
+
"file": "packages/ember-testing/lib/ext/application.ts",
|
|
18102
|
+
"line": 91,
|
|
18097
18103
|
"description": "This will be used as the container to inject the test helpers into. By\ndefault the helpers are injected into `window`.",
|
|
18098
18104
|
"itemtype": "property",
|
|
18099
18105
|
"name": "helperContainer",
|
|
@@ -18107,8 +18113,8 @@
|
|
|
18107
18113
|
"namespace": "Ember.Test"
|
|
18108
18114
|
},
|
|
18109
18115
|
{
|
|
18110
|
-
"file": "packages/ember-testing/lib/ext/application.
|
|
18111
|
-
"line":
|
|
18116
|
+
"file": "packages/ember-testing/lib/ext/application.ts",
|
|
18117
|
+
"line": 103,
|
|
18112
18118
|
"description": "This injects the test helpers into the `helperContainer` object. If an object is provided\nit will be used as the helperContainer. If `helperContainer` is not set it will default\nto `window`. If a function of the same name has already been defined it will be cached\n(so that it can be reset if the helper is removed with `unregisterHelper` or\n`removeTestHelpers`).\n\nAny callbacks registered with `onInjectHelpers` will be called once the\nhelpers have been injected.\n\nExample:\n```\nApp.injectTestHelpers();\n```",
|
|
18113
18119
|
"itemtype": "method",
|
|
18114
18120
|
"name": "injectTestHelpers",
|
|
@@ -18119,8 +18125,8 @@
|
|
|
18119
18125
|
"namespace": "Ember.Test"
|
|
18120
18126
|
},
|
|
18121
18127
|
{
|
|
18122
|
-
"file": "packages/ember-testing/lib/ext/application.
|
|
18123
|
-
"line":
|
|
18128
|
+
"file": "packages/ember-testing/lib/ext/application.ts",
|
|
18129
|
+
"line": 148,
|
|
18124
18130
|
"description": "This removes all helpers that have been registered, and resets and functions\nthat were overridden by the helpers.\n\nExample:\n\n```javascript\nApp.removeTestHelpers();\n```",
|
|
18125
18131
|
"access": "public",
|
|
18126
18132
|
"tagname": "",
|
|
@@ -18131,8 +18137,8 @@
|
|
|
18131
18137
|
"namespace": "Ember.Test"
|
|
18132
18138
|
},
|
|
18133
18139
|
{
|
|
18134
|
-
"file": "packages/ember-testing/lib/helpers/current_path.
|
|
18135
|
-
"line":
|
|
18140
|
+
"file": "packages/ember-testing/lib/helpers/current_path.ts",
|
|
18141
|
+
"line": 9,
|
|
18136
18142
|
"description": "Returns the current path.\n\nExample:\n\n```javascript\nfunction validateURL() {\nequal(currentPath(), 'some.path.index', \"correct path was transitioned into.\");\n}\n\nclick('#some-link-id').then(validateURL);\n```",
|
|
18137
18143
|
"itemtype": "method",
|
|
18138
18144
|
"name": "currentPath",
|
|
@@ -18147,8 +18153,8 @@
|
|
|
18147
18153
|
"module": "ember"
|
|
18148
18154
|
},
|
|
18149
18155
|
{
|
|
18150
|
-
"file": "packages/ember-testing/lib/helpers/current_route_name.
|
|
18151
|
-
"line":
|
|
18156
|
+
"file": "packages/ember-testing/lib/helpers/current_route_name.ts",
|
|
18157
|
+
"line": 8,
|
|
18152
18158
|
"description": "Returns the currently active route name.\n\nExample:\n\n```javascript\nfunction validateRouteName() {\nequal(currentRouteName(), 'some.path', \"correct route was transitioned into.\");\n}\nvisit('/some/path').then(validateRouteName)\n```",
|
|
18153
18159
|
"itemtype": "method",
|
|
18154
18160
|
"name": "currentRouteName",
|
|
@@ -18163,8 +18169,8 @@
|
|
|
18163
18169
|
"module": "ember"
|
|
18164
18170
|
},
|
|
18165
18171
|
{
|
|
18166
|
-
"file": "packages/ember-testing/lib/helpers/current_url.
|
|
18167
|
-
"line":
|
|
18172
|
+
"file": "packages/ember-testing/lib/helpers/current_url.ts",
|
|
18173
|
+
"line": 9,
|
|
18168
18174
|
"description": "Returns the current URL.\n\nExample:\n\n```javascript\nfunction validateURL() {\nequal(currentURL(), '/some/path', \"correct URL was transitioned into.\");\n}\n\nclick('#some-link-id').then(validateURL);\n```",
|
|
18169
18175
|
"itemtype": "method",
|
|
18170
18176
|
"name": "currentURL",
|
|
@@ -18179,7 +18185,7 @@
|
|
|
18179
18185
|
"module": "ember"
|
|
18180
18186
|
},
|
|
18181
18187
|
{
|
|
18182
|
-
"file": "packages/ember-testing/lib/helpers/pause_test.
|
|
18188
|
+
"file": "packages/ember-testing/lib/helpers/pause_test.ts",
|
|
18183
18189
|
"line": 9,
|
|
18184
18190
|
"description": "Resumes a test paused by `pauseTest`.",
|
|
18185
18191
|
"itemtype": "method",
|
|
@@ -18194,7 +18200,7 @@
|
|
|
18194
18200
|
"module": "ember"
|
|
18195
18201
|
},
|
|
18196
18202
|
{
|
|
18197
|
-
"file": "packages/ember-testing/lib/helpers/pause_test.
|
|
18203
|
+
"file": "packages/ember-testing/lib/helpers/pause_test.ts",
|
|
18198
18204
|
"line": 22,
|
|
18199
18205
|
"description": "Pauses the current test - this is useful for debugging while testing or for test-driving.\nIt allows you to inspect the state of your application at any point.\nExample (The test will pause before clicking the button):\n\n```javascript\nvisit('/')\nreturn pauseTest();\nclick('.btn');\n```\n\nYou may want to turn off the timeout before pausing.\n\nqunit (timeout available to use as of 2.4.0):\n\n```\nvisit('/');\nassert.timeout(0);\nreturn pauseTest();\nclick('.btn');\n```\n\nmocha (timeout happens automatically as of ember-mocha v0.14.0):\n\n```\nvisit('/');\nthis.timeout(0);\nreturn pauseTest();\nclick('.btn');\n```",
|
|
18200
18206
|
"since": "1.9.0",
|
|
@@ -18210,8 +18216,8 @@
|
|
|
18210
18216
|
"module": "ember"
|
|
18211
18217
|
},
|
|
18212
18218
|
{
|
|
18213
|
-
"file": "packages/ember-testing/lib/helpers/visit.
|
|
18214
|
-
"line":
|
|
18219
|
+
"file": "packages/ember-testing/lib/helpers/visit.ts",
|
|
18220
|
+
"line": 6,
|
|
18215
18221
|
"description": "Loads a route, sets up any controllers, and renders any templates associated\nwith the route as though a real user had triggered the route change while\nusing your app.\n\nExample:\n\n```javascript\nvisit('posts/index').then(function() {\n // assert something\n});\n```",
|
|
18216
18222
|
"itemtype": "method",
|
|
18217
18223
|
"name": "visit",
|
|
@@ -18232,8 +18238,8 @@
|
|
|
18232
18238
|
"module": "ember"
|
|
18233
18239
|
},
|
|
18234
18240
|
{
|
|
18235
|
-
"file": "packages/ember-testing/lib/helpers/wait.
|
|
18236
|
-
"line":
|
|
18241
|
+
"file": "packages/ember-testing/lib/helpers/wait.ts",
|
|
18242
|
+
"line": 12,
|
|
18237
18243
|
"description": "Causes the run loop to process any pending events. This is used to ensure that\nany async operations from other helpers (or your assertions) have been processed.\n\nThis is most often used as the return value for the helper functions (see 'click',\n'fillIn','visit',etc). However, there is a method to register a test helper which\nutilizes this method without the need to actually call `wait()` in your helpers.\n\nThe `wait` helper is built into `registerAsyncHelper` by default. You will not need\nto `return app.testHelpers.wait();` - the wait behavior is provided for you.\n\nExample:\n\n```javascript\nimport { registerAsyncHelper } from '@ember/test';\n\nregisterAsyncHelper('loginUser', function(app, username, password) {\n visit('secured/path/here')\n .fillIn('#username', username)\n .fillIn('#password', password)\n .click('.submit');\n});\n```",
|
|
18238
18244
|
"itemtype": "method",
|
|
18239
18245
|
"name": "wait",
|
|
@@ -18255,8 +18261,8 @@
|
|
|
18255
18261
|
"module": "ember"
|
|
18256
18262
|
},
|
|
18257
18263
|
{
|
|
18258
|
-
"file": "packages/ember-testing/lib/test/helpers.
|
|
18259
|
-
"line":
|
|
18264
|
+
"file": "packages/ember-testing/lib/test/helpers.ts",
|
|
18265
|
+
"line": 15,
|
|
18260
18266
|
"description": "`registerHelper` is used to register a test helper that will be injected\nwhen `App.injectTestHelpers` is called.\n\nThe helper method will always be called with the current Application as\nthe first parameter.\n\nFor example:\n\n```javascript\nimport { registerHelper } from '@ember/test';\nimport { run } from '@ember/runloop';\n\nregisterHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n});\n```\n\nThis helper can later be called without arguments because it will be\ncalled with `app` as the first parameter.\n\n```javascript\nimport Application from '@ember/application';\n\nApp = Application.create();\nApp.injectTestHelpers();\nboot();\n```",
|
|
18261
18267
|
"access": "public",
|
|
18262
18268
|
"tagname": "",
|
|
@@ -18284,8 +18290,8 @@
|
|
|
18284
18290
|
"module": "@ember/test"
|
|
18285
18291
|
},
|
|
18286
18292
|
{
|
|
18287
|
-
"file": "packages/ember-testing/lib/test/helpers.
|
|
18288
|
-
"line":
|
|
18293
|
+
"file": "packages/ember-testing/lib/test/helpers.ts",
|
|
18294
|
+
"line": 59,
|
|
18289
18295
|
"description": "`registerAsyncHelper` is used to register an async test helper that will be injected\nwhen `App.injectTestHelpers` is called.\n\nThe helper method will always be called with the current Application as\nthe first parameter.\n\nFor example:\n\n```javascript\nimport { registerAsyncHelper } from '@ember/test';\nimport { run } from '@ember/runloop';\n\nregisterAsyncHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n});\n```\n\nThe advantage of an async helper is that it will not run\nuntil the last async helper has completed. All async helpers\nafter it will wait for it complete before running.\n\n\nFor example:\n\n```javascript\nimport { registerAsyncHelper } from '@ember/test';\n\nregisterAsyncHelper('deletePost', function(app, postId) {\n click('.delete-' + postId);\n});\n\n// ... in your test\nvisit('/post/2');\ndeletePost(2);\nvisit('/post/3');\ndeletePost(3);\n```",
|
|
18290
18296
|
"access": "public",
|
|
18291
18297
|
"tagname": "",
|
|
@@ -18308,8 +18314,8 @@
|
|
|
18308
18314
|
"module": "@ember/test"
|
|
18309
18315
|
},
|
|
18310
18316
|
{
|
|
18311
|
-
"file": "packages/ember-testing/lib/test/helpers.
|
|
18312
|
-
"line":
|
|
18317
|
+
"file": "packages/ember-testing/lib/test/helpers.ts",
|
|
18318
|
+
"line": 112,
|
|
18313
18319
|
"description": "Remove a previously added helper method.\n\nExample:\n\n```javascript\nimport { unregisterHelper } from '@ember/test';\n\nunregisterHelper('wait');\n```",
|
|
18314
18320
|
"access": "public",
|
|
18315
18321
|
"tagname": "",
|
|
@@ -18327,8 +18333,8 @@
|
|
|
18327
18333
|
"module": "@ember/test"
|
|
18328
18334
|
},
|
|
18329
18335
|
{
|
|
18330
|
-
"file": "packages/ember-testing/lib/test/on_inject_helpers.
|
|
18331
|
-
"line":
|
|
18336
|
+
"file": "packages/ember-testing/lib/test/on_inject_helpers.ts",
|
|
18337
|
+
"line": 5,
|
|
18332
18338
|
"description": "Used to register callbacks to be fired whenever `App.injectTestHelpers`\nis called.\n\nThe callback will receive the current application as an argument.\n\nExample:\n\n```javascript\nimport $ from 'jquery';\n\nEmber.Test.onInjectHelpers(function() {\n $(document).ajaxSend(function() {\n Test.pendingRequests++;\n });\n\n $(document).ajaxComplete(function() {\n Test.pendingRequests--;\n });\n});\n```",
|
|
18333
18339
|
"access": "public",
|
|
18334
18340
|
"tagname": "",
|
|
@@ -18345,8 +18351,8 @@
|
|
|
18345
18351
|
"module": "@ember/test"
|
|
18346
18352
|
},
|
|
18347
18353
|
{
|
|
18348
|
-
"file": "packages/ember-testing/lib/test/promise.
|
|
18349
|
-
"line":
|
|
18354
|
+
"file": "packages/ember-testing/lib/test/promise.ts",
|
|
18355
|
+
"line": 32,
|
|
18350
18356
|
"description": "This returns a thenable tailored for testing. It catches failed\n`onSuccess` callbacks and invokes the `Ember.Test.adapter.exception`\ncallback in the last chained then.\n\nThis method should be returned by async helpers such as `wait`.",
|
|
18351
18357
|
"access": "public",
|
|
18352
18358
|
"tagname": "",
|
|
@@ -18368,8 +18374,8 @@
|
|
|
18368
18374
|
"module": "@ember/test"
|
|
18369
18375
|
},
|
|
18370
18376
|
{
|
|
18371
|
-
"file": "packages/ember-testing/lib/test/promise.
|
|
18372
|
-
"line":
|
|
18377
|
+
"file": "packages/ember-testing/lib/test/promise.ts",
|
|
18378
|
+
"line": 50,
|
|
18373
18379
|
"description": "Replacement for `Ember.RSVP.resolve`\nThe only difference is this uses\nan instance of `Ember.Test.Promise`",
|
|
18374
18380
|
"access": "public",
|
|
18375
18381
|
"tagname": "",
|
|
@@ -18387,7 +18393,7 @@
|
|
|
18387
18393
|
"module": "@ember/test"
|
|
18388
18394
|
},
|
|
18389
18395
|
{
|
|
18390
|
-
"file": "packages/ember-testing/lib/test/waiters.
|
|
18396
|
+
"file": "packages/ember-testing/lib/test/waiters.ts",
|
|
18391
18397
|
"line": 7,
|
|
18392
18398
|
"description": "This allows ember-testing to play nicely with other asynchronous\nevents, such as an application that is waiting for a CSS3\ntransition or an IndexDB transaction. The waiter runs periodically\nafter each async helper (i.e. `click`, `andThen`, `visit`, etc) has executed,\nuntil the returning result is truthy. After the waiters finish, the next async helper\nis executed and the process repeats.\n\nFor example:\n\n```javascript\nimport { registerWaiter } from '@ember/test';\n\nregisterWaiter(function() {\n return myPendingTransactions() === 0;\n});\n```\nThe `context` argument allows you to optionally specify the `this`\nwith which your callback will be invoked.\n\nFor example:\n\n```javascript\nimport { registerWaiter } from '@ember/test';\n\nregisterWaiter(MyDB, MyDB.hasPendingTransactions);\n```",
|
|
18393
18399
|
"access": "public",
|
|
@@ -18412,8 +18418,8 @@
|
|
|
18412
18418
|
"module": "@ember/test"
|
|
18413
18419
|
},
|
|
18414
18420
|
{
|
|
18415
|
-
"file": "packages/ember-testing/lib/test/waiters.
|
|
18416
|
-
"line":
|
|
18421
|
+
"file": "packages/ember-testing/lib/test/waiters.ts",
|
|
18422
|
+
"line": 66,
|
|
18417
18423
|
"description": "`unregisterWaiter` is used to unregister a callback that was\nregistered with `registerWaiter`.",
|
|
18418
18424
|
"access": "public",
|
|
18419
18425
|
"tagname": "",
|
|
@@ -18437,8 +18443,8 @@
|
|
|
18437
18443
|
"module": "@ember/test"
|
|
18438
18444
|
},
|
|
18439
18445
|
{
|
|
18440
|
-
"file": "packages/ember-testing/lib/test/waiters.
|
|
18441
|
-
"line":
|
|
18446
|
+
"file": "packages/ember-testing/lib/test/waiters.ts",
|
|
18447
|
+
"line": 94,
|
|
18442
18448
|
"description": "Iterates through each registered test waiter, and invokes\nits callback. If any waiter returns false, this method will return\ntrue indicating that the waiters have not settled yet.\n\nThis is generally used internally from the acceptance/integration test\ninfrastructure.",
|
|
18443
18449
|
"access": "public",
|
|
18444
18450
|
"tagname": "",
|
|
@@ -18449,7 +18455,7 @@
|
|
|
18449
18455
|
"module": "@ember/test"
|
|
18450
18456
|
},
|
|
18451
18457
|
{
|
|
18452
|
-
"file": "packages/ember-testing/lib/setup_for_testing.
|
|
18458
|
+
"file": "packages/ember-testing/lib/setup_for_testing.ts",
|
|
18453
18459
|
"line": 8,
|
|
18454
18460
|
"description": "Sets Ember up for testing. This is useful to perform\nbasic setup steps in order to unit test.\n\nUse `App.setupForTesting` to perform integration tests (full\napplication testing).",
|
|
18455
18461
|
"itemtype": "method",
|
|
@@ -18462,7 +18468,7 @@
|
|
|
18462
18468
|
"namespace": "Ember"
|
|
18463
18469
|
},
|
|
18464
18470
|
{
|
|
18465
|
-
"file": "packages/ember-testing/lib/test.
|
|
18471
|
+
"file": "packages/ember-testing/lib/test.ts",
|
|
18466
18472
|
"line": 24,
|
|
18467
18473
|
"description": "Hash containing all known test helpers.",
|
|
18468
18474
|
"itemtype": "property",
|
|
@@ -18475,7 +18481,7 @@
|
|
|
18475
18481
|
"namespace": "Ember"
|
|
18476
18482
|
},
|
|
18477
18483
|
{
|
|
18478
|
-
"file": "packages/ember-testing/lib/test.
|
|
18484
|
+
"file": "packages/ember-testing/lib/test.ts",
|
|
18479
18485
|
"line": 45,
|
|
18480
18486
|
"description": "Used to allow ember-testing to communicate with a specific testing\nframework.\n\nYou can manually set it before calling `App.setupForTesting()`.\n\nExample:\n\n```javascript\nEmber.Test.adapter = MyCustomAdapter.create()\n```\n\nIf you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.",
|
|
18481
18487
|
"access": "public",
|
|
@@ -18836,7 +18842,7 @@
|
|
|
18836
18842
|
},
|
|
18837
18843
|
{
|
|
18838
18844
|
"message": "Missing item type",
|
|
18839
|
-
"line": " packages/@ember/-internals/metal/lib/mixin.ts:
|
|
18845
|
+
"line": " packages/@ember/-internals/metal/lib/mixin.ts:680"
|
|
18840
18846
|
},
|
|
18841
18847
|
{
|
|
18842
18848
|
"message": "Missing item type\nPrimarily used for cases where we are redefining a class, e.g. mixins/reopen\nbeing applied later. Revalidates all the observers, resetting their tags.",
|
|
@@ -18964,43 +18970,43 @@
|
|
|
18964
18970
|
},
|
|
18965
18971
|
{
|
|
18966
18972
|
"message": "Missing item type",
|
|
18967
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
18973
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:127"
|
|
18968
18974
|
},
|
|
18969
18975
|
{
|
|
18970
18976
|
"message": "Missing item type",
|
|
18971
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
18977
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:129"
|
|
18972
18978
|
},
|
|
18973
18979
|
{
|
|
18974
18980
|
"message": "Missing item type",
|
|
18975
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
18981
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:132"
|
|
18976
18982
|
},
|
|
18977
18983
|
{
|
|
18978
18984
|
"message": "Missing item type",
|
|
18979
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
18985
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:134"
|
|
18980
18986
|
},
|
|
18981
18987
|
{
|
|
18982
18988
|
"message": "Missing item type",
|
|
18983
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
18989
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:137"
|
|
18984
18990
|
},
|
|
18985
18991
|
{
|
|
18986
18992
|
"message": "Missing item type",
|
|
18987
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
18993
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:139"
|
|
18988
18994
|
},
|
|
18989
18995
|
{
|
|
18990
18996
|
"message": "Missing item type",
|
|
18991
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
18997
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:141"
|
|
18992
18998
|
},
|
|
18993
18999
|
{
|
|
18994
19000
|
"message": "Missing item type",
|
|
18995
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
19001
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:143"
|
|
18996
19002
|
},
|
|
18997
19003
|
{
|
|
18998
19004
|
"message": "Missing item type",
|
|
18999
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
19005
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:145"
|
|
19000
19006
|
},
|
|
19001
19007
|
{
|
|
19002
19008
|
"message": "Missing item type",
|
|
19003
|
-
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:
|
|
19009
|
+
"line": " packages/@ember/-internals/runtime/lib/system/array_proxy.ts:147"
|
|
19004
19010
|
},
|
|
19005
19011
|
{
|
|
19006
19012
|
"message": "Missing item type",
|
|
@@ -19024,7 +19030,7 @@
|
|
|
19024
19030
|
},
|
|
19025
19031
|
{
|
|
19026
19032
|
"message": "Missing item type\nUnfortunately, a lot of existing code assumes the booting process is\n\"synchronous\". Specifically, a lot of tests assumes the last call to\n`app.advanceReadiness()` or `app.reset()` will result in the app being\nfully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this assumption,\nso we created the asynchronous version above that returns a promise. But until\nwe have migrated all the code, we would have to expose this method for use\n*internally* in places where we need to boot an app \"synchronously\".",
|
|
19027
|
-
"line": " packages/@ember/application/lib/application.ts:
|
|
19033
|
+
"line": " packages/@ember/application/lib/application.ts:747"
|
|
19028
19034
|
},
|
|
19029
19035
|
{
|
|
19030
19036
|
"message": "Missing item type\nOverrides the base `EngineInstance._bootSync` method with concerns relevant\nto booting application (instead of engine) instances.\n\nThis method should only contain synchronous boot concerns. Asynchronous\nboot concerns should eventually be moved to the `boot` method, which\nreturns a promise.\n\nUntil all boot code has been made asynchronous, we need to continue to\nexpose this method for use *internally* in places where we need to boot an\ninstance synchronously.",
|
|
@@ -19062,6 +19068,10 @@
|
|
|
19062
19068
|
"message": "Missing item type",
|
|
19063
19069
|
"line": " packages/@ember/controller/lib/controller_mixin.ts:24"
|
|
19064
19070
|
},
|
|
19071
|
+
{
|
|
19072
|
+
"message": "Missing item type",
|
|
19073
|
+
"line": " packages/@ember/engine/index.ts:470"
|
|
19074
|
+
},
|
|
19065
19075
|
{
|
|
19066
19076
|
"message": "Missing item type\nUnfortunately, a lot of existing code assumes booting an instance is\nsynchronous – specifically, a lot of tests assume the last call to\n`app.advanceReadiness()` or `app.reset()` will result in a new instance\nbeing fully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this\nassumption, so we created the asynchronous version above that returns a\npromise. But until we have migrated all the code, we would have to expose\nthis method for use *internally* in places where we need to boot an instance\nsynchronously.",
|
|
19067
19077
|
"line": " packages/@ember/engine/instance.ts:111"
|