forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcheckJsxChildrenProperty16.types
More file actions
84 lines (66 loc) · 2.7 KB
/
checkJsxChildrenProperty16.types
File metadata and controls
84 lines (66 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty16.tsx] ////
=== Performance Stats ===
Assignability cache: 2,200 / 2,200 (nearest 100)
Type Count: 7,600 / 7,600 (nearest 100)
Instantiation count: 89,500 / 89,500 (nearest 500)
Symbol count: 66,000 / 66,000 (nearest 500)
=== checkJsxChildrenProperty16.tsx ===
/// <reference path="react16.d.ts" />
// repro from #53493
import React = require('react');
>React : typeof React
export type Props =
>Props : { renderNumber?: false | undefined; children: (arg: string) => void; } | { renderNumber: true; children: (arg: number) => void; }
| { renderNumber?: false; children: (arg: string) => void }
>renderNumber : false | undefined
>false : false
>children : (arg: string) => void
>arg : string
| {
renderNumber: true;
>renderNumber : true
>true : true
children: (arg: number) => void;
>children : (arg: number) => void
>arg : number
};
export declare function Foo(props: Props): JSX.Element;
>Foo : (props: Props) => JSX.Element
>props : Props
>JSX : any
export const Test = () => {
>Test : () => JSX.Element
>() => { return ( <> <Foo>{(value) => {}}</Foo> <Foo renderNumber>{(value) => {}}</Foo> <Foo children={(value) => {}} /> <Foo renderNumber children={(value) => {}} /> </> );} : () => JSX.Element
return (
>( <> <Foo>{(value) => {}}</Foo> <Foo renderNumber>{(value) => {}}</Foo> <Foo children={(value) => {}} /> <Foo renderNumber children={(value) => {}} /> </> ) : JSX.Element
<>
><> <Foo>{(value) => {}}</Foo> <Foo renderNumber>{(value) => {}}</Foo> <Foo children={(value) => {}} /> <Foo renderNumber children={(value) => {}} /> </> : JSX.Element
<Foo>{(value) => {}}</Foo>
><Foo>{(value) => {}}</Foo> : JSX.Element
>Foo : (props: Props) => JSX.Element
>(value) => {} : (value: string) => void
>value : string
>Foo : (props: Props) => JSX.Element
<Foo renderNumber>{(value) => {}}</Foo>
><Foo renderNumber>{(value) => {}}</Foo> : JSX.Element
>Foo : (props: Props) => JSX.Element
>renderNumber : true
>(value) => {} : (value: number) => void
>value : number
>Foo : (props: Props) => JSX.Element
<Foo children={(value) => {}} />
><Foo children={(value) => {}} /> : JSX.Element
>Foo : (props: Props) => JSX.Element
>children : (value: string) => void
>(value) => {} : (value: string) => void
>value : string
<Foo renderNumber children={(value) => {}} />
><Foo renderNumber children={(value) => {}} /> : JSX.Element
>Foo : (props: Props) => JSX.Element
>renderNumber : true
>children : (value: number) => void
>(value) => {} : (value: number) => void
>value : number
</>
);
};