Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[react] Port ElementRef utility type from Flow #43201

Merged
merged 10 commits into from Mar 20, 2020
4 changes: 2 additions & 2 deletions types/react/index.d.ts
Expand Up @@ -82,8 +82,6 @@ declare namespace React {
| ((props: P) => ReactElement | null)
| (new (props: P) => Component<P, any>);

type Key = string | number;

interface RefObject<T> {
readonly current: T | null;
}
Expand Down Expand Up @@ -129,6 +127,8 @@ declare namespace React {

type ComponentState = any;

type Key = string | number;

alloy marked this conversation as resolved.
Show resolved Hide resolved
/**
* @internal You shouldn't need to use this type since you never see these attributes
* inside your component or have to validate them.
Expand Down