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,12 +1,8 @@
|
||||
tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,18): error TS2769: No overload matches this call.
|
||||
tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(20,3): error TS2769: No overload matches this call.
|
||||
Overload 1 of 2, '(props: Readonly<ResizablePanelProps>): ResizablePanel', gave the following error.
|
||||
Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
|
||||
The types of 'children.length' are incompatible between these types.
|
||||
Type '3' is not assignable to type '2'.
|
||||
Type 'Element' is not assignable to type 'undefined'.
|
||||
Overload 2 of 2, '(props: ResizablePanelProps, context?: any): ResizablePanel', gave the following error.
|
||||
Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
|
||||
Types of property 'children' are incompatible.
|
||||
Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'.
|
||||
Type 'Element' is not assignable to type 'undefined'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx (1 errors) ====
|
||||
@@ -27,17 +23,13 @@ tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,18): error TS2
|
||||
</ResizablePanel>
|
||||
|
||||
const testErr = <ResizablePanel>
|
||||
~~~~~~~~~~~~~~
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
~~~~~~~
|
||||
!!! error TS2769: No overload matches this call.
|
||||
!!! error TS2769: Overload 1 of 2, '(props: Readonly<ResizablePanelProps>): ResizablePanel', gave the following error.
|
||||
!!! error TS2769: Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
|
||||
!!! error TS2769: The types of 'children.length' are incompatible between these types.
|
||||
!!! error TS2769: Type '3' is not assignable to type '2'.
|
||||
!!! error TS2769: Type 'Element' is not assignable to type 'undefined'.
|
||||
!!! error TS2769: Overload 2 of 2, '(props: ResizablePanelProps, context?: any): ResizablePanel', gave the following error.
|
||||
!!! error TS2769: Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
|
||||
!!! error TS2769: Types of property 'children' are incompatible.
|
||||
!!! error TS2769: Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'.
|
||||
<div />
|
||||
<div />
|
||||
<div />
|
||||
!!! error TS2769: Type 'Element' is not assignable to type 'undefined'.
|
||||
</ResizablePanel>
|
||||
@@ -31,11 +31,11 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
|
||||
|
||||
? this.props.children(this.state.result)
|
||||
>this.props.children(this.state.result) : JSX.Element
|
||||
>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>this.props.children : (user: IUser) => JSX.Element
|
||||
>this.props : IFetchUserProps & { children?: React.ReactNode; }
|
||||
>this : this
|
||||
>props : IFetchUserProps & { children?: React.ReactNode; }
|
||||
>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>children : (user: IUser) => JSX.Element
|
||||
>this.state.result : any
|
||||
>this.state : any
|
||||
>this : this
|
||||
|
||||
@@ -1,11 +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(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement<any>'.
|
||||
Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
|
||||
tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement<any>'.
|
||||
Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
|
||||
tests/cases/conformance/jsx/file.tsx(32,10): error TS2746: This JSX tag's 'children' prop expects a single child of type '(user: IUser) => Element', but multiple children were provided.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
|
||||
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
|
||||
import React = require('react');
|
||||
|
||||
interface IUser {
|
||||
@@ -41,27 +38,17 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) =
|
||||
function UserName1() {
|
||||
return (
|
||||
<FetchUser>
|
||||
~~~~~~~~~
|
||||
!!! error TS2746: This JSX tag's 'children' prop expects a single child of type '(user: IUser) => Element', but multiple children were provided.
|
||||
|
||||
|
||||
|
||||
{ user => (
|
||||
~~~~~~~~~
|
||||
<h1>{ user.Name }</h1>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
) }
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement<any>'.
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
|
||||
!!! related TS6212 tests/cases/conformance/jsx/file.tsx:36:15: Did you mean to call this expression?
|
||||
{ user => (
|
||||
~~~~~~~~~
|
||||
<h1>{ user.Name }</h1>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
) }
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'string | number | boolean | any[] | ReactElement<any>'.
|
||||
!!! error TS2322: Type '(user: IUser) => Element' is missing the following properties from type 'ReactElement<any>': type, props
|
||||
!!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression?
|
||||
</FetchUser>
|
||||
);
|
||||
}
|
||||
@@ -31,11 +31,11 @@ class FetchUser extends React.Component<IFetchUserProps, any> {
|
||||
|
||||
? this.props.children(this.state.result)
|
||||
>this.props.children(this.state.result) : JSX.Element
|
||||
>this.props.children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>this.props.children : (user: IUser) => JSX.Element
|
||||
>this.props : IFetchUserProps & { children?: React.ReactNode; }
|
||||
>this : this
|
||||
>props : IFetchUserProps & { children?: React.ReactNode; }
|
||||
>children : ((user: IUser) => JSX.Element) | (((user: IUser) => JSX.Element) & string) | (((user: IUser) => JSX.Element) & number) | (((user: IUser) => JSX.Element) & false) | (((user: IUser) => JSX.Element) & true) | (((user: IUser) => JSX.Element) & React.ReactElement<any>) | (((user: IUser) => JSX.Element) & (string | number | boolean | any[] | React.ReactElement<any>)[])
|
||||
>children : (user: IUser) => JSX.Element
|
||||
>this.state.result : any
|
||||
>this.state : any
|
||||
>this : this
|
||||
|
||||
@@ -104,7 +104,7 @@ function c<T>(data: string | T): T {
|
||||
>JSON.parse : (text: string, reviver?: (this: any, key: string, value: any) => any) => any
|
||||
>JSON : JSON
|
||||
>parse : (text: string, reviver?: (this: any, key: string, value: any) => any) => any
|
||||
>data : string | (T & string)
|
||||
>data : string
|
||||
}
|
||||
else {
|
||||
return data;
|
||||
|
||||
@@ -484,9 +484,9 @@ function exhaustiveChecksGenerics<T extends L | R | number | string>(x: T): stri
|
||||
case 'number': return x.toString(2);
|
||||
>'number' : "number"
|
||||
>x.toString(2) : string
|
||||
>x.toString : ((radix?: number | undefined) => string) | ((() => string) & ((radix?: number | undefined) => string)) | ((() => string) & ((radix?: number | undefined) => string)) | ((() => string) & ((radix?: number | undefined) => string))
|
||||
>x.toString : (radix?: number | undefined) => string
|
||||
>x : T & number
|
||||
>toString : ((radix?: number | undefined) => string) | ((() => string) & ((radix?: number | undefined) => string)) | ((() => string) & ((radix?: number | undefined) => string)) | ((() => string) & ((radix?: number | undefined) => string))
|
||||
>toString : (radix?: number | undefined) => string
|
||||
>2 : 2
|
||||
|
||||
case 'string': return x;
|
||||
|
||||
@@ -687,27 +687,27 @@ function genericSpread<T, U>(t: T, u: U, v: T | U, w: T | { s: string }, obj: {
|
||||
>obj : { x: number; }
|
||||
|
||||
let x15 = { ...t, ...v };
|
||||
>x15 : T | (T & U)
|
||||
>{ ...t, ...v } : T | (T & U)
|
||||
>x15 : T
|
||||
>{ ...t, ...v } : T
|
||||
>t : T
|
||||
>v : T | U
|
||||
|
||||
let x16 = { ...t, ...w };
|
||||
>x16 : T | (T & { s: string; })
|
||||
>{ ...t, ...w } : T | (T & { s: string; })
|
||||
>x16 : T
|
||||
>{ ...t, ...w } : T
|
||||
>t : T
|
||||
>w : T | { s: string; }
|
||||
|
||||
let x17 = { ...t, ...w, ...obj };
|
||||
>x17 : (T & { x: number; }) | (T & { x: number; s: string; })
|
||||
>{ ...t, ...w, ...obj } : (T & { x: number; }) | (T & { x: number; s: string; })
|
||||
>x17 : T & { x: number; }
|
||||
>{ ...t, ...w, ...obj } : T & { x: number; }
|
||||
>t : T
|
||||
>w : T | { s: string; }
|
||||
>obj : { x: number; }
|
||||
|
||||
let x18 = { ...t, ...v, ...w };
|
||||
>x18 : T | (T & U) | (T & { s: string; }) | (T & U & { s: string; })
|
||||
>{ ...t, ...v, ...w } : T | (T & U) | (T & { s: string; }) | (T & U & { s: string; })
|
||||
>x18 : T
|
||||
>{ ...t, ...v, ...w } : T
|
||||
>t : T
|
||||
>v : T | U
|
||||
>w : T | { s: string; }
|
||||
|
||||
Reference in New Issue
Block a user