From a56c0aa6ae5d0c28bcdad2b717ff85d7bdd4b3c9 Mon Sep 17 00:00:00 2001 From: Mike North Date: Tue, 18 Sep 2018 23:44:03 -0700 Subject: [PATCH] [ember] consume Observable interface from @ember --- types/ember/test/private/computed-tests.ts | 24 +++++++++++++------- types/ember/test/private/observable-tests.ts | 3 ++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/types/ember/test/private/computed-tests.ts b/types/ember/test/private/computed-tests.ts index 8877bf62b2..38bf1088df 100644 --- a/types/ember/test/private/computed-tests.ts +++ b/types/ember/test/private/computed-tests.ts @@ -77,27 +77,35 @@ ex2.firstName; // $ExpectType string type UnwStringSet = UnwrapComputedPropertySetter; // $ExpectType string type UnwStringGet = UnwrapComputedPropertyGetter; // $ExpectType string +// $ExpectType string type UnwCpStringSet1 = UnwrapComputedPropertySetter< Ember.ComputedProperty ->; // $ExpectType string +>; +// $ExpectType string type UnwCpStringGet1 = UnwrapComputedPropertyGetter< Ember.ComputedProperty ->; // $ExpectType string +>; +// $ExpectType string type UnwCpStringSet2 = UnwrapComputedPropertySetter< Ember.ComputedProperty ->; // $ExpectType string +>; +// $ExpectType string type UnwCpStringGet2 = UnwrapComputedPropertyGetter< Ember.ComputedProperty ->; // $ExpectType string +>; +// $ExpectType string type UnwCpStringSet3 = UnwrapComputedPropertySetter< Ember.ComputedProperty ->; // $ExpectType string +>; +// $ExpectType number type UnwCpStringGet3 = UnwrapComputedPropertyGetter< Ember.ComputedProperty ->; // $ExpectType number +>; +// $ExpectType number type UnwCpStringSet4 = UnwrapComputedPropertySetter< Ember.ComputedProperty ->; // $ExpectType number +>; +// $ExpectType string type UnwCpStringGet4 = UnwrapComputedPropertyGetter< Ember.ComputedProperty ->; // $ExpectType string +>; diff --git a/types/ember/test/private/observable-tests.ts b/types/ember/test/private/observable-tests.ts index 4ef17fda3c..cde17b04ab 100644 --- a/types/ember/test/private/observable-tests.ts +++ b/types/ember/test/private/observable-tests.ts @@ -7,12 +7,13 @@ import { UnwrapComputedPropertyGetters, UnwrapComputedPropertySetters } from '@ember/object/-private/types'; +import Observable from "@ember/object/observable"; class OtherThing { observerOfDemo(target: DemoObservable, key: 'foo') {} } -class DemoObservable implements Ember.Observable { +class DemoObservable implements Observable { foo: string; isFoo = true; bar: [boolean, boolean];