mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-30 09:24:27 +00:00
1. Ember-data tests had the wrong return type in a couple of places. TS 3.4 catches this error, and this PR fixes it. 2. Ember-data's Model class became invariant in 3.4 because of its use of the `this` type. This PR uses a `this` parameter with a method-local type parameter to avoid using Model's `this` type. 3. Ember v2's tests were broken by TS 3.4's more complete return-type inference, which caused a variable declaration's type annotation to break inference through contextual typing. This PR converts the type annotation to type parameters on the call, which short-circuits inference entirely. It's also shorter.