mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Fix RefForwardingComponent argument type. (#30373)
This commit is contained in:
parent
31fc92ecd3
commit
0d49c9a4c6
@ -6,7 +6,7 @@ import * as ReactIs from 'react-is';
|
||||
// Determining if a Component is Valid
|
||||
|
||||
interface CompProps {
|
||||
forwardedRef?: React.Ref<any>;
|
||||
forwardedRef: React.Ref<any> | null;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
|
||||
2
types/react/index.d.ts
vendored
2
types/react/index.d.ts
vendored
@ -463,7 +463,7 @@ declare namespace React {
|
||||
}
|
||||
|
||||
interface RefForwardingComponent<T, P = {}> {
|
||||
(props: P & { children?: ReactNode }, ref?: Ref<T>): ReactElement<any> | null;
|
||||
(props: P & { children?: ReactNode }, ref: Ref<T> | null): ReactElement<any> | null;
|
||||
propTypes?: ValidationMap<P>;
|
||||
contextTypes?: ValidationMap<any>;
|
||||
defaultProps?: Partial<P>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user