mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accepted baselines.
This commit is contained in:
+1
-8
@@ -1,12 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts(21,1): error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'.
|
||||
Type predicate 'x is B' is not assignable to 'x is A'.
|
||||
Type 'B' is not assignable to type 'A'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts(22,1): error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'.
|
||||
Type predicate 'x is A' is not assignable to 'x is B'.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts (2 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts (1 errors) ====
|
||||
|
||||
class A {
|
||||
private a;
|
||||
@@ -28,10 +25,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
let myIsB = isB;
|
||||
|
||||
myIsA = myIsB;
|
||||
~~~~~
|
||||
!!! error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'.
|
||||
!!! error TS2322: Type predicate 'x is B' is not assignable to 'x is A'.
|
||||
!!! error TS2322: Type 'B' is not assignable to type 'A'.
|
||||
myIsB = myIsA;
|
||||
~~~~~
|
||||
!!! error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'.
|
||||
|
||||
+2
-9
@@ -2,12 +2,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts(17,1): error TS2322: Type '(x: any) => x is any' is not assignable to type '(x: any) => x is A'.
|
||||
Type predicate 'x is any' is not assignable to 'x is A'.
|
||||
Type 'any' is not assignable to type 'A'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts(18,1): error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is any'.
|
||||
Type predicate 'x is A' is not assignable to 'x is any'.
|
||||
Type 'A' is not assignable to type 'any'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts (3 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts (2 errors) ====
|
||||
|
||||
class A {
|
||||
private a;
|
||||
@@ -31,8 +28,4 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type '(x: any) => x is any' is not assignable to type '(x: any) => x is A'.
|
||||
!!! error TS2322: Type predicate 'x is any' is not assignable to 'x is A'.
|
||||
!!! error TS2322: Type 'any' is not assignable to type 'A'.
|
||||
myIsAny = myIsA;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is any'.
|
||||
!!! error TS2322: Type predicate 'x is A' is not assignable to 'x is any'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'any'.
|
||||
myIsAny = myIsA;
|
||||
+2
-9
@@ -1,12 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts(20,1): error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'.
|
||||
Type predicate 'x is B' is not assignable to 'x is A'.
|
||||
Type 'B' is not assignable to type 'A'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts(21,1): error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'.
|
||||
Type predicate 'x is A' is not assignable to 'x is B'.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts (2 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts (1 errors) ====
|
||||
|
||||
interface A {
|
||||
a?;
|
||||
@@ -31,8 +28,4 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'.
|
||||
!!! error TS2322: Type predicate 'x is B' is not assignable to 'x is A'.
|
||||
!!! error TS2322: Type 'B' is not assignable to type 'A'.
|
||||
myIsAny = myIsA;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'.
|
||||
!!! error TS2322: Type predicate 'x is A' is not assignable to 'x is B'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
myIsAny = myIsA;
|
||||
+1
-8
@@ -1,12 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts(25,1): error TS2322: Type '(x: any) => x is E' is not assignable to type '(x: any) => x is number'.
|
||||
Type predicate 'x is E' is not assignable to 'x is number'.
|
||||
Type 'E' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts(26,1): error TS2322: Type '(x: any) => x is number' is not assignable to type '(x: any) => x is E'.
|
||||
Type predicate 'x is number' is not assignable to 'x is E'.
|
||||
Type 'number' is not assignable to type 'E'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts (2 errors) ====
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts (1 errors) ====
|
||||
|
||||
enum E {
|
||||
A = 1,
|
||||
@@ -32,10 +29,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
let myIsB = isB;
|
||||
|
||||
myIsA = myIsB;
|
||||
~~~~~
|
||||
!!! error TS2322: Type '(x: any) => x is E' is not assignable to type '(x: any) => x is number'.
|
||||
!!! error TS2322: Type predicate 'x is E' is not assignable to 'x is number'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'number'.
|
||||
myIsB = myIsA;
|
||||
~~~~~
|
||||
!!! error TS2322: Type '(x: any) => x is number' is not assignable to type '(x: any) => x is E'.
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
||||
tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(3,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
||||
tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(4,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
||||
tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(5,10): error TS2394: Overload signature is not compatible with function implementation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/functions/overloadsWithTypePredicates03.ts (4 errors) ====
|
||||
==== tests/cases/conformance/functions/overloadsWithTypePredicates03.ts (1 errors) ====
|
||||
|
||||
function is(x: any, type: "number"): x is number;
|
||||
~~
|
||||
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
||||
function is(x: any, type: "string"): x is string;
|
||||
~~
|
||||
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
||||
function is(x: any, type: "boolean"): x is boolean;
|
||||
~~
|
||||
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
|
||||
function is(x: any, type: string): x is (number | boolean | string);
|
||||
~~
|
||||
!!! error TS2394: Overload signature is not compatible with function implementation.
|
||||
|
||||
Reference in New Issue
Block a user