Skip to content

Commit 718bf10

Browse files
committed
Adjusted 56.5
1 parent 25c22cd commit 718bf10

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed
Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
type types = [
2-
React.ElementType,
3-
React.ComponentType,
4-
React.JSXElementConstructor<{
5-
prop1: string;
6-
}>
7-
];
1+
type types = [React.ElementType, React.ComponentType];
82

93
/**
104
* ElementType
@@ -20,13 +14,13 @@ export type Example = React.ElementType<{
2014
}>;
2115

2216
/**
23-
* JSXElementConstructor
17+
* ComponentType
2418
*/
25-
const Example1 = (props: { prop1: string }) => {
19+
const FuncComponent = (props: { prop1: string }) => {
2620
return null;
2721
};
2822

29-
class Example2 extends React.Component<{
23+
class ClassComponent extends React.Component<{
3024
prop1: string;
3125
}> {
3226
render(): React.ReactNode {
@@ -35,13 +29,7 @@ class Example2 extends React.Component<{
3529
}
3630
}
3731

38-
const tests: Array<
39-
React.JSXElementConstructor<{
40-
prop1: string;
41-
}>
42-
> = [Example1, Example2];
43-
4432
const tests2: Array<React.ComponentType<{ prop1: string }>> = [
45-
Example1,
46-
Example2,
33+
FuncComponent,
34+
ClassComponent,
4735
];

0 commit comments

Comments
 (0)