Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ declare namespace React {
/**
* **NOTE**: Exotic components are not callable.
*/
(props: P): (ReactElement|null);
(props: PropsWithChildren<P>): ReactElement | null;
readonly $$typeof: symbol;
}

Expand Down
4 changes: 4 additions & 0 deletions types/react/test/tsx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ const Memoized6 = React.memo(props => null);
// $ExpectError
<Memoized6 foo/>;

const BeforeMemoized7: React.FC = ({ children }) => null;
const Memoized7 = React.memo(BeforeMemoized7);
<Memoized7>foo</Memoized7>;

// NOTE: this test _requires_ TypeScript 3.1
// It is passing, for what it's worth.
// const Memoized7 = React.memo((() => {
Expand Down