Commit Graph

25 Commits

Author SHA1 Message Date
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
Andy
e69b58e400 Apply new lint rules to ever more packages (#15551) 2017-03-31 12:19:34 -07:00
Andy
5f3ba45136 Use dtslint (#15482) 2017-03-29 13:07:39 -07:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00