mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
[ember] enable tests that were waiting for other changes to be merged (#28899)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
559078d30d
commit
da9c280be5
@@ -6,13 +6,10 @@ import { assign, merge } from '@ember/polyfills';
|
||||
assign({ a: 6 }, { a: 'b'}).a; // $ExpectType string
|
||||
assign({ a: 6 }, {}).a; // $ExpectType number
|
||||
assign({ b: 6 }, {}).a; // $ExpectError
|
||||
// TODO enable after https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
// assign({}, { b: 6 }, {}).b; // $ExpectType number
|
||||
assign({}, { b: 6 }, {}).b; // $ExpectType number
|
||||
assign({ a: 'hello' }, { b: 6 }, {}).a; // $ExpectType string
|
||||
// TODO enable after https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
// assign({ a: 'hello' }, { b: 6 }, { a: true }).a; // $ExpectType boolean
|
||||
// TODO enable after https://github.com/typed-ember/ember-cli-typescript/issues/291
|
||||
// assign({ a: 'hello' }, '', { a: true }).a; // $ExpectError
|
||||
assign({ a: 'hello' }, { b: 6 }, { a: true }).a; // $ExpectType boolean
|
||||
assign({ a: 'hello' }, '', { a: true }).a; // $ExpectError
|
||||
assign({ d: ['gobias industries'] }, { a: 'hello' }, { b: 6 }, { a: true }).d; // $ExpectType string[]
|
||||
})();
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@ import EmberObject from '@ember/object';
|
||||
return;
|
||||
}
|
||||
const anotherString = maybeUndefined + 'another string';
|
||||
// TODO fix upstream in @types/ember https://github.com/typed-ember/ember-cli-typescript/issues/256
|
||||
// isNone(); // $ExpectType boolean
|
||||
isNone(); // $ExpectType boolean
|
||||
isNone(null); // $ExpectType boolean
|
||||
isNone(undefined); // $ExpectType boolean
|
||||
isNone(''); // $ExpectType boolean
|
||||
@@ -30,10 +29,9 @@ import EmberObject from '@ember/object';
|
||||
/** tryInvoke */
|
||||
let d = new Date('03/15/2013');
|
||||
|
||||
// TODO fix enhance in @types/ember https://github.com/typed-ember/ember-cli-typescript/issues/257
|
||||
// tryInvoke(d, 'getTime'); // $ExpectType number
|
||||
// tryInvoke(d, 'setFullYear', [2014]); // $ExpectType number
|
||||
// tryInvoke(d, 'noSuchMethod', [2014]); // $ExpectType undefined
|
||||
tryInvoke(d, 'getTime'); // $ExpectType number
|
||||
tryInvoke(d, 'setFullYear', [2014]); // $ExpectType number
|
||||
tryInvoke(d, 'noSuchMethod', [2014]); // $ExpectType undefined
|
||||
tryInvoke(d, 'getTime');
|
||||
tryInvoke(d, 'setFullYear', [2014]);
|
||||
tryInvoke(d, 'noSuchMethod', [2014]);
|
||||
@@ -41,8 +39,7 @@ import EmberObject from '@ember/object';
|
||||
|
||||
(function() {
|
||||
/** isPresent */
|
||||
// TODO fix upstream in @types/ember https://github.com/typed-ember/ember-cli-typescript/issues/258
|
||||
// isPresent(); // $ExpectType boolean
|
||||
isPresent(); // $ExpectType boolean
|
||||
isPresent(null); // $ExpectType boolean
|
||||
isPresent(undefined); // $ExpectType boolean
|
||||
isPresent(''); // $ExpectType boolean
|
||||
@@ -63,29 +60,27 @@ import EmberObject from '@ember/object';
|
||||
|
||||
(function() {
|
||||
/** typeOf */
|
||||
// TODO: more specific return type in @types/ember https://github.com/typed-ember/ember-cli-typescript/issues/259
|
||||
// typeOf(null); // $ExpectType 'null'
|
||||
// typeOf(undefined); // $ExpectType 'undefined'
|
||||
// typeOf('michael'); // $ExpectType 'string'
|
||||
// // tslint:disable-next-line:no-construct
|
||||
// typeOf(new String('michael')); // $ExpectType 'string'
|
||||
// typeOf(101); // $ExpectType 'number'
|
||||
// // tslint:disable-next-line:no-construct
|
||||
// typeOf(new Number(101)); // $ExpectType 'number'
|
||||
// typeOf(true); // $ExpectType 'boolean'
|
||||
// // tslint:disable-next-line:no-construct
|
||||
// typeOf(new Boolean(true)); // $ExpectType 'boolean'
|
||||
// typeOf(() => 4); // $ExpectType 'function'
|
||||
// typeOf([1, 2, 90]); // $ExpectType 'array'
|
||||
// typeOf(/abc/); // $ExpectType 'regexp'
|
||||
// typeOf(new Date()); // $ExpectType 'date'
|
||||
// typeOf(FileList); // $ExpectType 'filelist'
|
||||
// // typeOf(EmberObject.extend()); // $ExpectType 'class'
|
||||
// // typeOf(EmberObject.create()); // $ExpectType 'instance'
|
||||
// typeOf(new Error('teamocil')); // $ExpectType 'error'
|
||||
typeOf(null); // $ExpectType "null"
|
||||
typeOf(undefined); // $ExpectType "undefined"
|
||||
typeOf('michael'); // $ExpectType "string"
|
||||
// tslint:disable-next-line:no-construct
|
||||
typeOf(new String('michael')); // $ExpectType "string"
|
||||
typeOf(101); // $ExpectType "number"
|
||||
// tslint:disable-next-line:no-construct
|
||||
typeOf(new Number(101)); // $ExpectType "number"
|
||||
typeOf(true); // $ExpectType "boolean"
|
||||
// tslint:disable-next-line:no-construct
|
||||
typeOf(new Boolean(true)); // $ExpectType "boolean"
|
||||
typeOf(() => 4); // $ExpectType "function"
|
||||
typeOf([1, 2, 90]); // $ExpectType "array"
|
||||
typeOf(/abc/); // $ExpectType "regexp"
|
||||
typeOf(new Date()); // $ExpectType "date"
|
||||
typeOf(new FileList()); // $ExpectType "filelist"
|
||||
typeOf(EmberObject.extend()); // $ExpectType "class"
|
||||
typeOf(EmberObject.create()); // $ExpectType "instance"
|
||||
typeOf(new Error('teamocil')); // $ExpectType "error"
|
||||
|
||||
// TODO fix upstream in @types/ember https://github.com/typed-ember/ember-cli-typescript/issues/260
|
||||
// typeOf();
|
||||
typeOf();
|
||||
typeOf(null);
|
||||
typeOf(undefined);
|
||||
typeOf('michael');
|
||||
@@ -130,8 +125,7 @@ import EmberObject from '@ember/object';
|
||||
(function() {
|
||||
/** isBlank */
|
||||
|
||||
// TODO fix upstream in @types/ember https://github.com/typed-ember/ember-cli-typescript/issues/254
|
||||
// isBlank(); // $ExpectType boolean
|
||||
isBlank(); // $ExpectType boolean
|
||||
isBlank(null); // $ExpectType boolean
|
||||
isBlank(undefined); // $ExpectType boolean
|
||||
isBlank(''); // $ExpectType boolean
|
||||
@@ -147,8 +141,7 @@ import EmberObject from '@ember/object';
|
||||
(function() {
|
||||
/** isEmpty */
|
||||
|
||||
// TODO fix upstream in @types/ember https://github.com/typed-ember/ember-cli-typescript/issues/255
|
||||
// isEmpty(); // $ExpectType boolean
|
||||
isEmpty(); // $ExpectType boolean
|
||||
isEmpty(null); // $ExpectType boolean
|
||||
isEmpty(undefined); // $ExpectType boolean
|
||||
isEmpty(''); // $ExpectType boolean
|
||||
|
||||
Reference in New Issue
Block a user