mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'?
|
||||
tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
|
||||
tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: (((user: IUser) => Element) | ((user: IUser) => Element))[]; }' is not assignable to type 'IFetchUserProps'.
|
||||
Types of property 'children' are incompatible.
|
||||
Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
|
||||
Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
|
||||
Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' is not assignable to type '(user: IUser) => Element'.
|
||||
Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' provides no match for the signature '(user: IUser): Element'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
|
||||
@@ -42,10 +42,10 @@ tests/cases/conformance/jsx/file.tsx(32,10): error TS2322: Type '{ children: ((u
|
||||
return (
|
||||
<FetchUser>
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'.
|
||||
!!! error TS2322: Type '{ children: (((user: IUser) => Element) | ((user: IUser) => Element))[]; }' is not assignable to type 'IFetchUserProps'.
|
||||
!!! error TS2322: Types of property 'children' are incompatible.
|
||||
!!! error TS2322: Type '((user: IUser) => Element)[]' is not assignable to type '(user: IUser) => Element'.
|
||||
!!! error TS2322: Type '((user: IUser) => Element)[]' provides no match for the signature '(user: IUser): Element'.
|
||||
!!! error TS2322: Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' is not assignable to type '(user: IUser) => Element'.
|
||||
!!! error TS2322: Type '(((user: IUser) => Element) | ((user: IUser) => Element))[]' provides no match for the signature '(user: IUser): Element'.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ class Foo extends WithLocation(Point) {
|
||||
|
||||
return super.getLocation()
|
||||
>super.getLocation() : [number, number]
|
||||
>super.getLocation : () => [number, number]
|
||||
>super.getLocation : (() => [number, number]) & (() => [number, number])
|
||||
>super : WithLocation<typeof Point>.(Anonymous class) & Point
|
||||
>getLocation : () => [number, number]
|
||||
>getLocation : (() => [number, number]) & (() => [number, number])
|
||||
}
|
||||
whereAmI() {
|
||||
>whereAmI : () => [number, number]
|
||||
|
||||
@@ -30,9 +30,9 @@ function f<T extends Cat | Dog>(a: T) {
|
||||
|
||||
a.run();
|
||||
>a.run() : void
|
||||
>a.run : () => void
|
||||
>a.run : (() => void) | (() => void)
|
||||
>a : T
|
||||
>run : () => void
|
||||
>run : (() => void) | (() => void)
|
||||
|
||||
run(a);
|
||||
>run(a) : void
|
||||
|
||||
@@ -19,9 +19,9 @@ function run(a: Cat | Dog) {
|
||||
|
||||
a.run();
|
||||
>a.run() : void
|
||||
>a.run : () => void
|
||||
>a.run : (() => void) | (() => void)
|
||||
>a : Cat | Dog
|
||||
>run : () => void
|
||||
>run : (() => void) | (() => void)
|
||||
}
|
||||
|
||||
function f<T extends Cat | Dog>(a: T) {
|
||||
@@ -30,9 +30,9 @@ function f<T extends Cat | Dog>(a: T) {
|
||||
|
||||
a.run();
|
||||
>a.run() : void
|
||||
>a.run : () => void
|
||||
>a.run : (() => void) | (() => void)
|
||||
>a : T
|
||||
>run : () => void
|
||||
>run : (() => void) | (() => void)
|
||||
|
||||
run(a);
|
||||
>run(a) : void
|
||||
|
||||
@@ -95,9 +95,9 @@ str = x.commonMethodType(str); // (a: string) => string so result should be stri
|
||||
>str = x.commonMethodType(str) : string
|
||||
>str : string
|
||||
>x.commonMethodType(str) : string
|
||||
>x.commonMethodType : (a: string) => string
|
||||
>x.commonMethodType : ((a: string) => string) | ((a: string) => string)
|
||||
>x : I1<number> | I2<number>
|
||||
>commonMethodType : (a: string) => string
|
||||
>commonMethodType : ((a: string) => string) | ((a: string) => string)
|
||||
>str : string
|
||||
|
||||
strOrNum = x.commonPropertyDifferenType;
|
||||
@@ -133,36 +133,36 @@ num = x.commonMethodWithTypeParameter(num);
|
||||
>num = x.commonMethodWithTypeParameter(num) : number
|
||||
>num : number
|
||||
>x.commonMethodWithTypeParameter(num) : number
|
||||
>x.commonMethodWithTypeParameter : (a: number) => number
|
||||
>x.commonMethodWithTypeParameter : ((a: number) => number) | ((a: number) => number)
|
||||
>x : I1<number> | I2<number>
|
||||
>commonMethodWithTypeParameter : (a: number) => number
|
||||
>commonMethodWithTypeParameter : ((a: number) => number) | ((a: number) => number)
|
||||
>num : number
|
||||
|
||||
num = x.commonMethodWithOwnTypeParameter(num);
|
||||
>num = x.commonMethodWithOwnTypeParameter(num) : number
|
||||
>num : number
|
||||
>x.commonMethodWithOwnTypeParameter(num) : number
|
||||
>x.commonMethodWithOwnTypeParameter : <U>(a: U) => U
|
||||
>x.commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
|
||||
>x : I1<number> | I2<number>
|
||||
>commonMethodWithOwnTypeParameter : <U>(a: U) => U
|
||||
>commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
|
||||
>num : number
|
||||
|
||||
str = x.commonMethodWithOwnTypeParameter(str);
|
||||
>str = x.commonMethodWithOwnTypeParameter(str) : string
|
||||
>str : string
|
||||
>x.commonMethodWithOwnTypeParameter(str) : string
|
||||
>x.commonMethodWithOwnTypeParameter : <U>(a: U) => U
|
||||
>x.commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
|
||||
>x : I1<number> | I2<number>
|
||||
>commonMethodWithOwnTypeParameter : <U>(a: U) => U
|
||||
>commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
|
||||
>str : string
|
||||
|
||||
strOrNum = x.commonMethodWithOwnTypeParameter(strOrNum);
|
||||
>strOrNum = x.commonMethodWithOwnTypeParameter(strOrNum) : string | number
|
||||
>strOrNum : string | number
|
||||
>x.commonMethodWithOwnTypeParameter(strOrNum) : string | number
|
||||
>x.commonMethodWithOwnTypeParameter : <U>(a: U) => U
|
||||
>x.commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
|
||||
>x : I1<number> | I2<number>
|
||||
>commonMethodWithOwnTypeParameter : <U>(a: U) => U
|
||||
>commonMethodWithOwnTypeParameter : (<U>(a: U) => U) | (<U>(a: U) => U)
|
||||
>strOrNum : string | number
|
||||
|
||||
x.propertyOnlyInI1; // error
|
||||
|
||||
Reference in New Issue
Block a user