mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Update Ember tests to treat 'string & number' and 'never' the same (#36095)
* Update tests to treat 'string & number' and 'never' the same * Remove $ExpectType since both 'string & number' or 'never' are ok
This commit is contained in:
@@ -76,7 +76,7 @@ const co6 = Ember.CoreObject.extend({
|
||||
this.init; // $ExpectType () => void
|
||||
// this includes stuff from this extend-arg
|
||||
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
this.foo; // $ExpectType string & number
|
||||
this.foo;
|
||||
// this includes stuff from earlier extend-args
|
||||
this.bar; // $ExpectType number
|
||||
}
|
||||
@@ -110,7 +110,7 @@ const co7 = Ember.CoreObject.extend({
|
||||
this.init; // $ExpectType () => void
|
||||
// this includes stuff from this extend-arg
|
||||
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
this.foo; // $ExpectType string & number
|
||||
this.foo;
|
||||
// this includes stuff from earlier extend-args
|
||||
this.bar; // $ExpectType number
|
||||
}
|
||||
@@ -156,7 +156,7 @@ const co8 = Ember.CoreObject.extend({
|
||||
this.init; // $ExpectType () => void
|
||||
// this includes stuff from this extend-arg
|
||||
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
this.foo; // $ExpectType string & number
|
||||
this.foo;
|
||||
// this includes stuff from earlier extend-args
|
||||
this.bar; // $ExpectType number
|
||||
// this does not include stuff from later extend args
|
||||
|
||||
@@ -9,7 +9,7 @@ class ES6Class extends Ember.Object {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
const testObject = null;
|
||||
const testObject: any = null;
|
||||
|
||||
if (ExtendClass.detectInstance(testObject)) {
|
||||
assertType<string>(testObject.foo);
|
||||
|
||||
@@ -9,7 +9,7 @@ class ES6Class extends Ember.Object {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
let testObject = null;
|
||||
let testObject: any = null;
|
||||
|
||||
if (ExtendClass.detectInstance(testObject)) {
|
||||
assertType<string>(testObject.foo);
|
||||
|
||||
@@ -78,7 +78,7 @@ const co6 = CoreObject.extend(
|
||||
this.init; // $ExpectType () => void
|
||||
// this includes stuff from this extend-arg
|
||||
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
this.foo; // $ExpectType string & number
|
||||
this.foo;
|
||||
// this includes stuff from earlier extend-args
|
||||
this.bar; // $ExpectType number
|
||||
}
|
||||
@@ -115,7 +115,7 @@ const co7 = CoreObject.extend(
|
||||
this.init; // $ExpectType () => void
|
||||
// this includes stuff from this extend-arg
|
||||
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
this.foo; // $ExpectType string & number
|
||||
this.foo;
|
||||
// this includes stuff from earlier extend-args
|
||||
this.bar; // $ExpectType number
|
||||
}
|
||||
@@ -165,7 +165,7 @@ const co8 = CoreObject.extend(
|
||||
this.init; // $ExpectType () => void
|
||||
// this includes stuff from this extend-arg
|
||||
// TODO: switch to "$ExpectType number" in TS 3.0 see: https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
this.foo; // $ExpectType string & number
|
||||
this.foo;
|
||||
// this includes stuff from earlier extend-args
|
||||
this.bar; // $ExpectType number
|
||||
// this does not include stuff from later extend args
|
||||
|
||||
@@ -9,7 +9,7 @@ class ES6Class extends EmberObject {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
const testObject = null;
|
||||
const testObject: any = null;
|
||||
|
||||
if (ExtendClass.detectInstance(testObject)) {
|
||||
assertType<string>(testObject.foo);
|
||||
|
||||
Reference in New Issue
Block a user