forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsxDeclarationsWithEsModuleInteropNoCrash.types
More file actions
95 lines (80 loc) · 2.58 KB
/
jsxDeclarationsWithEsModuleInteropNoCrash.types
File metadata and controls
95 lines (80 loc) · 2.58 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
85
86
87
88
89
90
91
92
93
94
95
//// [tests/cases/compiler/jsxDeclarationsWithEsModuleInteropNoCrash.tsx] ////
=== Performance Stats ===
Assignability cache: 2,500
Type Count: 10,000
Instantiation count: 100,000
Symbol count: 50,000
=== jsxDeclarationsWithEsModuleInteropNoCrash.jsx ===
/// <reference path="react16.d.ts" preserve="true" />
import PropTypes from 'prop-types';
>PropTypes : typeof PropTypes
> : ^^^^^^^^^^^^^^^^
import React from 'react';
>React : typeof React
> : ^^^^^^^^^^^^
const propTypes = {
>propTypes : { bar: PropTypes.Requireable<boolean>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>{ bar: PropTypes.bool,} : { bar: PropTypes.Requireable<boolean>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bar: PropTypes.bool,
>bar : PropTypes.Requireable<boolean>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>PropTypes.bool : PropTypes.Requireable<boolean>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>PropTypes : typeof PropTypes
> : ^^^^^^^^^^^^^^^^
>bool : PropTypes.Requireable<boolean>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
};
const defaultProps = {
>defaultProps : { bar: boolean; }
> : ^^^^^^^^^^^^^^^^^
>{ bar: false,} : { bar: boolean; }
> : ^^^^^^^^^^^^^^^^^
bar: false,
>bar : boolean
> : ^^^^^^^
>false : false
> : ^^^^^
};
function Foo({ bar }) {
>Foo : typeof Foo
> : ^^^^^^^^^^
>bar : any
> : ^^^
return <div>{bar}</div>;
><div>{bar}</div> : JSX.Element
> : ^^^^^^^^^^^
>div : any
> : ^^^
>bar : any
> : ^^^
>div : any
> : ^^^
}
Foo.propTypes = propTypes;
>Foo.propTypes = propTypes : { bar: PropTypes.Requireable<boolean>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Foo.propTypes : { bar: PropTypes.Requireable<boolean>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Foo : typeof Foo
> : ^^^^^^^^^^
>propTypes : { bar: PropTypes.Requireable<boolean>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>propTypes : { bar: PropTypes.Requireable<boolean>; }
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Foo.defaultProps = defaultProps;
>Foo.defaultProps = defaultProps : { bar: boolean; }
> : ^^^^^^^^^^^^^^^^^
>Foo.defaultProps : { bar: boolean; }
> : ^^^^^^^^^^^^^^^^^
>Foo : typeof Foo
> : ^^^^^^^^^^
>defaultProps : { bar: boolean; }
> : ^^^^^^^^^^^^^^^^^
>defaultProps : { bar: boolean; }
> : ^^^^^^^^^^^^^^^^^
export default Foo;
>Foo : typeof Foo
> : ^^^^^^^^^^