Commit Graph

53 Commits

Author SHA1 Message Date
Daniel Rosenwasser
d86ac40c98
Merge pull request #23684 from chriskrycho/fix-computed-lookups
Ember: make `get` unwrap module computed properties.
2018-02-16 19:40:48 -08:00
Tabeth Nkangoh
0b9cb255b9
Update index.d.ts
There appears to be a discrepancy between the description in the comments as well as [the documentation](https://www.emberjs.com/api/ember/3.0/classes/MutableArray/methods/removeAt?anchor=removeAt) and the typing itself. Since we can pass either a single index **or** a start and length, `len` should be an optional parameter (to handle the scenario where you just pass a single index).
2018-02-16 10:29:38 -05:00
Chris Krycho
7be938ddc6
Ember: make get unwrap module computed properties. 2018-02-15 15:39:25 -07:00
Daniel Rosenwasser
b949172739
Merge pull request #23653 from chriskrycho/ember-controller-registry
Ember: actually use Controller registry in `controllerFor`.
2018-02-15 13:23:18 -08:00
Daniel Rosenwasser
5d88510ee1
Merge pull request #23629 from chriskrycho/ember-mixin
Ember: make `Mixin` exported in namespaced modules a `class`.
2018-02-15 10:58:39 -08:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Chris Krycho
eb8cdf016c
Ember: actually use Controller registry in controllerFor. 2018-02-14 10:50:23 -07:00
Chris Krycho
9c8c32349e
Ember: make Mixin exported in namespaced modules a class. 2018-02-13 17:28:12 -07:00
Ron Buckton
60f5ee3a3c
Merge pull request #23413 from chriskrycho/ember-type-registries
Ember and Ember Data: use type registries
2018-02-10 11:55:41 -08:00
Chris Krycho
7523afa3b9
Fix 2-blank-line problem in Ember. 2018-02-08 09:33:34 -07:00
Chris Krycho
4d8e8d1920
Ember, Ember Data: type registry improvements. 2018-02-08 08:44:07 -07:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Chris Krycho
031e2ad65c
Ember: use type registry from service, controller lookups. 2018-02-04 20:37:13 -07:00
vlascik
ed1e090ecf Name default exports to help with auto-imports (#23287) 2018-01-30 11:50:19 -08:00
Chris Krycho
fa958d3475 Ember: delegate Enumerable method types to Array. (#23130)
* Ember: delegate `Enumerable` method types to `Array`.

* Ember: drop `NativeArray` overrides.
2018-01-24 10:31:27 -08:00
Derek Wickern
c4e9518121 ember: allow get/set with dynamic key (#22905) 2018-01-17 09:59:14 -08:00
Chris Krycho
8b902e076f Add ember-data error types; Ember.ViewUtils.isSimpleClick. (#22924) 2018-01-17 09:52:29 -08:00
Martin Feckie
6be899ad46 Improve typings for Enumerable (#22523)
* Fix typo Enumberable -> Enumerable

* Set return type to Enumerable of filter, reject etc to support chaining

* findBy value type should be any, not string

* Convert return type for Enumerable to NativeArray<T>
2018-01-03 16:06:45 -08:00
Chris Krycho
99b908fdb8 Revert Prettier-induced spacing, comma changes. 2017-12-28 15:20:20 -07:00
Chris Krycho
572137414c
Update Ember, Ember Data, Ember QUnit types. 2017-12-19 16:10:50 -07:00
Bowden Kelly
e745c897a7
Merge pull request #21911 from dwickern/ember-route-mount-options
[ember] route mount options
2017-12-06 11:08:25 -08:00
Chris Krycho
ad4f0a18d9
Ember: make lookup options optional 2017-12-05 20:10:13 -07:00
Ignacio Bona Piedrabuena
a946202e81 Fixing route mount and adding tests 2017-12-02 09:10:41 -08:00
Ignacio Bona Piedrabuena
a10336e48d Adding mount options 2017-12-02 09:10:24 -08:00
Derek Wickern
d17a9bb823 update ember typings 2017-11-19 09:46:14 -08:00
Andy
ce6f98d353
ember: Fix lint (#21123) 2017-10-30 10:59:00 -07:00
Andy
19f89399e4 Ensure every package has a tslint.json (#21009)
* Ensure every package has a tslint.json

* Fixes
2017-10-25 11:13:50 -07:00
Andy
7c7d40373f ember: Fix lint (#20827) 2017-10-23 07:35:35 -07:00
Chris Krycho
dfa4555106 Update Ember, RSVP, and Ember testing helpers. (#20301)
* Update RSVP to 4.0, to implement PromiseLike<T>.

- RSVP Promises can now be used with `async` and `await`.
- RSVP types now match what is in RSVP 4.0.

* Update ember-testing-helpers for fixed RSVP.

* Ember.js: correctly represent most of the framework.

- Capture the actual behavior of most of the framework, including computed
  properties, custom getters and setters and the custom Object model more
  generally, prototype extension via `.extend`, and the mixin pattern.
- Support the new modules API alongside the global API.
- Add extensive tests.
- Update inline documentation.
- Use the new, async/await compatible RSVP definitions.

* Ember/RSVP: drop .prettierrc files.

* Drop types/rsvp/assert.ts -- stick to just rsvp-test.ts.

* Fix ember-testing-helpers-tests on top of module itself.

* Fix RSVP import in ember-testing-helpers.

* Fix 'typeRoots', set ember-testing-helpers to use TS 2.4.

* Fix missing 'types' compiler option.

* Fix errors caught by dtslint.

* A few more tslint tweaks.

* Fix account link in ember-testing-helpers authorship.

* Disable strictFunctionTypes for Ember, RSVP.

* fix array.reduce signature conflict in ts@next
2017-10-13 03:13:17 -07:00
Per Lundberg
d817d67556 Added Ember.computed methods (#20227)
This PR adds some of the missing definitions from here: https://www.emberjs.com/api/ember/2.15/namespaces/Ember.computed/methods/union?anchor=union

Note: the documentation there suggests that propertyKey is a single parameter, which is incorrect/unclear per the discussion in https://github.com/emberjs/ember.js/pull/14904. Hence, I added them as ... arguments instead.
2017-10-09 16:17:38 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Nathan Jacobson
172dd79c16 Increase allowed mixin params to Ember.Component.extend (#19594) 2017-09-25 14:36:15 -07:00
Andy
b00a552bdd Don't allowSyntheticDefaultImports (#19609) 2017-09-13 07:16:41 -07:00
Nathan Shively-Sanders
e4e502a846 Merge pull request #18872 from chriskrycho/fix-exports-for-RSVP
RSVP: switch to `export =` with `allowSyntheticDefaultExports`.
2017-09-05 16:06:54 -07:00
Andy
cb2dbfbb50 Add ignores for new lint rules (#19504) 2017-09-01 07:47:52 -07:00
Chris Krycho
4ad5e86ffe Revert "Remove --allowSyntheticDefaultImports" (from ember)
This reverts commit 43a1348b91.
2017-08-24 09:02:49 -04:00
Andy
924fafffc0 Fix remaining lint errors (#19166) 2017-08-20 15:37:53 -07:00
Andy
5d6c651a1a Apply stricter lint rules (#19063) 2017-08-17 14:53:41 -07:00
Mohamed Hegazy
43a1348b91 Remove --allowSyntheticDefaultImports 2017-08-14 14:06:48 -07:00
Chris Krycho
0196f2468e Update RSVP dependencies to allow synthetic imports. 2017-08-11 09:18:16 -04:00
Chris Krycho
9b53cc27cf Update RSVP and its Ember dependents. (#18383)
- Add default export and test code to RSVP, including sample code from
  the RSVP library.
- Use imported RSVP types in Ember and ember-testing-helpers definitions.
- Set minimum TS version in RSVP, Ember, and ember-testing-helpers.
- Fix ember-testing-helpers header.
- Make RSVP a two-type-parameter type; update Ember typedefs accordingly.
- Update authors, definitions link in RSVP header.
2017-07-31 14:47:19 -07:00
Chris Krycho
382602b16a Fix some Ember definitions. (#18379)
- Add definitions for `computed.filter` and `computed.filterBy` methods.
- Add definitions for `getProperties` on Ember base object.
- Fix the `computed.map` definition to actually include the callback
- Fix the `run` method’s callback type.
2017-07-31 13:56:22 -07:00
Chris Krycho
5f081bc7b4 Add onerror and runInDebug to Ember typings. 2017-07-03 17:42:47 -04:00
Leonard Thieu
1c3565933c :( 2017-06-13 13:00:42 -04:00
Adnan Chowdhury
46eb9a8bfe Ember - Add additional type defs for RSVP namespace (#16359)
* add additional type defs for RSVP

* satisfy linting
2017-05-05 16:23:05 -07:00
Mohamed Hegazy
e564537f7f Fix lint failures (#16329)
* fix lint failures

* Fix more lint failures

* Fix some more lint errors
2017-05-04 15:31:42 -07:00
Robin Ward
b0a3133229 Ember: Missing optional parameter for Ember.Helper.helper function (#16250)
Currently, the second `hash` parameter to the closure is not supported,
even though it's used in the Ember Documentation for the method:

https://github.com/emberjs/ember.js/blob/v2.12.0/packages/ember-glimmer/lib/helper.js#L110-L114

I confirmed in the latest version of Ember.js that this `hash`
parameter works, so I believe the types should be updated to
support it.
2017-05-01 15:43:32 -07:00
Ryan Cavanaugh
2facc3f57b Merge pull request #15792 from ltegman/ember-isBlank
Add Ember isBlank and isPresent
2017-04-17 11:59:33 -07:00
Andy
bbc61fbf93 Extend "dtslint/dt.json" directly instead of "../tslint.json". (#15822)
* Extend "dtslint/dt.json" directly instead of "../tslint.json".

* Convert more "../tslint.json" to "dtslint/dt.json"

* no-redundant-modifiers -> strict-export-declare-modifiers
2017-04-14 08:04:05 -07:00
Logan Tegman
1bcc9e1dd7 Add Ember isBlank and isPresent 2017-04-11 14:24:09 -07:00