Accepted baselines.

This commit is contained in:
Daniel Rosenwasser
2018-06-28 00:11:44 -07:00
parent 35e9e165b1
commit 534503a761
8 changed files with 36 additions and 38 deletions
@@ -1,4 +1,4 @@
tests/cases/conformance/jsdoc/0.js(5,3): error TS2322: Type 'number' is not assignable to type 'string | undefined'.
tests/cases/conformance/jsdoc/0.js(5,3): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsdoc/0.js(7,3): error TS2322: Type '(n1: number) => string' is not assignable to type '(arg0: number) => number'.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/jsdoc/0.js(11,3): error TS2322: Type '(n1: number) => string' is not assignable to type '(arg0: number) => number'.
@@ -16,7 +16,7 @@ tests/cases/conformance/jsdoc/0.js(22,22): error TS2345: Argument of type '"0"'
/** @type {string|undefined} */
bar: 42,
~~~~~~~
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
!!! error TS2322: Type 'number' is not assignable to type 'string'.
/** @type {function(number): number} */
method1(n1) {
~~~~~~~
@@ -39,7 +39,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectI
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts(35,29): error TS2411: Property 'a' of type '"hello"' is not assignable to string index type 'number'.
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts(39,11): error TS2430: Interface 'I20' incorrectly extends interface 'Partial<T1>'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number | undefined'.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts(40,11): error TS2430: Interface 'I21' incorrectly extends interface 'Readonly<T1>'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number'.
@@ -154,7 +154,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectI
~~~
!!! error TS2430: Interface 'I20' incorrectly extends interface 'Partial<T1>'.
!!! error TS2430: Types of property 'a' are incompatible.
!!! error TS2430: Type 'string' is not assignable to type 'number | undefined'.
!!! error TS2430: Type 'string' is not assignable to type 'number'.
interface I21 extends Readonly<T1> { a: string }
~~~
!!! error TS2430: Interface 'I21' incorrectly extends interface 'Readonly<T1>'.
@@ -12,7 +12,7 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(10
Type 'T & U' is not assignable to type 'number'.
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(11,9): error TS2322: Type 'T & U' is not assignable to type 'number | undefined'.
Type 'string | undefined' is not assignable to type 'number | undefined'.
Type 'string' is not assignable to type 'number | undefined'.
Type 'string' is not assignable to type 'number'.
Type 'T & U' is not assignable to type 'number'.
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12,9): error TS2322: Type 'T & U' is not assignable to type 'null | undefined'.
Type 'string | undefined' is not assignable to type 'null | undefined'.
@@ -50,7 +50,7 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12
~~
!!! error TS2322: Type 'T & U' is not assignable to type 'number | undefined'.
!!! error TS2322: Type 'string | undefined' is not assignable to type 'number | undefined'.
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
!!! error TS2322: Type 'T & U' is not assignable to type 'number'.
let y6: null | undefined = x; // Error
~~
@@ -39,13 +39,13 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(124,14): error TS2345:
Object literal may only specify known properties, and 'c' does not exist in type 'Pick<Foo, "a" | "b">'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(128,5): error TS2322: Type '{ a: string; }' is not assignable to type 'T2'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number | undefined'.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(129,5): error TS2322: Type '{ a: string; }' is not assignable to type 'Partial<T2>'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number | undefined'.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,5): error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: any; a?: number | undefined; }'.
Types of property 'a' are incompatible.
Type 'string' is not assignable to type 'number | undefined'.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,16): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
Type 'T' is not assignable to type 'symbol'.
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536: Type 'P' cannot be used to index type 'T'.
@@ -242,17 +242,17 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536:
~~
!!! error TS2322: Type '{ a: string; }' is not assignable to type 'T2'.
!!! error TS2322: Types of property 'a' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
let x2: Partial<T2> = { a: 'no' }; // Error
~~
!!! error TS2322: Type '{ a: string; }' is not assignable to type 'Partial<T2>'.
!!! error TS2322: Types of property 'a' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
let x3: { [P in keyof T2]: T2[P]} = { a: 'no' }; // Error
~~
!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: any; a?: number | undefined; }'.
!!! error TS2322: Types of property 'a' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
// Repro from #13044
@@ -1,10 +1,9 @@
tests/cases/compiler/nestedFreshLiteral.ts(12,21): error TS2322: Type '{ nested: { prop: { colour: string; }; }; }' is not assignable to type 'NestedCSSProps'.
Types of property 'nested' are incompatible.
Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector | undefined'.
Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
Types of property 'prop' are incompatible.
Type '{ colour: string; }' is not assignable to type 'CSSProps'.
Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
Types of property 'prop' are incompatible.
Type '{ colour: string; }' is not assignable to type 'CSSProps'.
Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
==== tests/cases/compiler/nestedFreshLiteral.ts (1 errors) ====
@@ -23,9 +22,8 @@ tests/cases/compiler/nestedFreshLiteral.ts(12,21): error TS2322: Type '{ nested:
~~~~~~~~~~~~~
!!! error TS2322: Type '{ nested: { prop: { colour: string; }; }; }' is not assignable to type 'NestedCSSProps'.
!!! error TS2322: Types of property 'nested' are incompatible.
!!! error TS2322: Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector | undefined'.
!!! error TS2322: Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
!!! error TS2322: Types of property 'prop' are incompatible.
!!! error TS2322: Type '{ colour: string; }' is not assignable to type 'CSSProps'.
!!! error TS2322: Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
!!! error TS2322: Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
!!! error TS2322: Types of property 'prop' are incompatible.
!!! error TS2322: Type '{ colour: string; }' is not assignable to type 'CSSProps'.
!!! error TS2322: Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
}
@@ -1,23 +1,23 @@
tests/cases/compiler/objectCreate-errors.ts(1,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
tests/cases/compiler/objectCreate-errors.ts(2,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
tests/cases/compiler/objectCreate-errors.ts(3,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
tests/cases/compiler/objectCreate-errors.ts(1,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
tests/cases/compiler/objectCreate-errors.ts(2,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
tests/cases/compiler/objectCreate-errors.ts(3,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
tests/cases/compiler/objectCreate-errors.ts(4,24): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.
tests/cases/compiler/objectCreate-errors.ts(7,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
tests/cases/compiler/objectCreate-errors.ts(8,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
tests/cases/compiler/objectCreate-errors.ts(9,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
tests/cases/compiler/objectCreate-errors.ts(7,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
tests/cases/compiler/objectCreate-errors.ts(8,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
tests/cases/compiler/objectCreate-errors.ts(9,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
tests/cases/compiler/objectCreate-errors.ts(10,24): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.
==== tests/cases/compiler/objectCreate-errors.ts (8 errors) ====
var e1 = Object.create(1); // Error
~
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
var e2 = Object.create("string"); // Error
~~~~~~~~
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
var e3 = Object.create(false); // Error
~~~~~
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
var e4 = Object.create(undefined); // Error
~~~~~~~~~
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.
@@ -25,13 +25,13 @@ tests/cases/compiler/objectCreate-errors.ts(10,24): error TS2345: Argument of ty
var e5 = Object.create(1, {}); // Error
~
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
var e6 = Object.create("string", {}); // Error
~~~~~~~~
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
var e7 = Object.create(false, {}); // Error
~~~~~
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
var e8 = Object.create(undefined, {}); // Error
~~~~~~~~~
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.
@@ -2,7 +2,7 @@ tests/cases/conformance/salsa/a.js(10,5): error TS7008: Member 'twices' implicit
tests/cases/conformance/salsa/a.js(14,5): error TS2322: Type '"hi"' is not assignable to type 'number'.
tests/cases/conformance/salsa/a.js(21,5): error TS2322: Type 'false' is not assignable to type 'number'.
tests/cases/conformance/salsa/a.js(24,5): error TS2322: Type 'null' is not assignable to type 'string | undefined'.
tests/cases/conformance/salsa/a.js(25,5): error TS2322: Type 'false' is not assignable to type 'string | undefined'.
tests/cases/conformance/salsa/a.js(25,5): error TS2322: Type 'false' is not assignable to type 'string'.
tests/cases/conformance/salsa/a.js(26,5): error TS2531: Object is possibly 'null'.
@@ -41,7 +41,7 @@ tests/cases/conformance/salsa/a.js(26,5): error TS2531: Object is possibly 'null
!!! error TS2322: Type 'null' is not assignable to type 'string | undefined'.
this.twice = false // error
~~~~~~~~~~
!!! error TS2322: Type 'false' is not assignable to type 'string | undefined'.
!!! error TS2322: Type 'false' is not assignable to type 'string'.
this.twices.push(1) // error: Object is possibly null
~~~~~~~~~~~
!!! error TS2531: Object is possibly 'null'.
@@ -3,7 +3,7 @@ tests/cases/conformance/salsa/a.js(4,5): error TS7008: Member 'unknowable' impli
tests/cases/conformance/salsa/a.js(5,5): error TS7008: Member 'empty' implicitly has an 'any[]' type.
tests/cases/conformance/salsa/a.js(25,12): error TS7006: Parameter 'a' implicitly has an 'any' type.
tests/cases/conformance/salsa/a.js(25,29): error TS7006: Parameter 'l' implicitly has an 'any[]' type.
tests/cases/conformance/salsa/a.js(37,5): error TS2322: Type '"error"' is not assignable to type 'number | undefined'.
tests/cases/conformance/salsa/a.js(37,5): error TS2322: Type '"error"' is not assignable to type 'number'.
==== tests/cases/conformance/salsa/a.js (6 errors) ====
@@ -55,7 +55,7 @@ tests/cases/conformance/salsa/a.js(37,5): error TS2322: Type '"error"' is not as
b = undefined
b = 'error'
~
!!! error TS2322: Type '"error"' is not assignable to type 'number | undefined'.
!!! error TS2322: Type '"error"' is not assignable to type 'number'.
// l should be any[]
l.push(1)