Accept new baselines
This commit is contained in:
parent
a01df0f20b
commit
d669771462
2 changed files with 7 additions and 9 deletions
|
@ -1,6 +1,5 @@
|
|||
tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts(13,17): error TS2345: Argument of type 'A<T> | B<T>' is not assignable to parameter of type 'A<T>'.
|
||||
Type 'B<T>' is not assignable to type 'A<T>'.
|
||||
Property 'a' is missing in type 'B<T>'.
|
||||
tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts(13,17): error TS2345: Argument of type 'B<T>' is not assignable to parameter of type 'A<{}>'.
|
||||
Property 'a' is missing in type 'B<T>'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts (1 errors) ====
|
||||
|
@ -18,9 +17,8 @@ tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeF
|
|||
if (x instanceof B) {
|
||||
acceptA(x);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'A<T> | B<T>' is not assignable to parameter of type 'A<T>'.
|
||||
!!! error TS2345: Type 'B<T>' is not assignable to type 'A<T>'.
|
||||
!!! error TS2345: Property 'a' is missing in type 'B<T>'.
|
||||
!!! error TS2345: Argument of type 'B<T>' is not assignable to parameter of type 'A<{}>'.
|
||||
!!! error TS2345: Property 'a' is missing in type 'B<T>'.
|
||||
}
|
||||
|
||||
if (x instanceof A) {
|
||||
|
|
|
@ -43,7 +43,7 @@ function test<T>(x: A<T> | B<T>) {
|
|||
acceptA(x);
|
||||
>acceptA(x) : any
|
||||
>acceptA : <T>(a: A<T>) => void
|
||||
>x : A<T> | B<T>
|
||||
>x : B<T>
|
||||
}
|
||||
|
||||
if (x instanceof A) {
|
||||
|
@ -65,7 +65,7 @@ function test<T>(x: A<T> | B<T>) {
|
|||
acceptB(x);
|
||||
>acceptB(x) : void
|
||||
>acceptB : <T>(b: B<T>) => void
|
||||
>x : A<T> | B<T>
|
||||
>x : B<T>
|
||||
}
|
||||
|
||||
if (x instanceof B) {
|
||||
|
@ -76,6 +76,6 @@ function test<T>(x: A<T> | B<T>) {
|
|||
acceptB(x);
|
||||
>acceptB(x) : void
|
||||
>acceptB : <T>(b: B<T>) => void
|
||||
>x : A<T> | B<T>
|
||||
>x : B<T>
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue