Skip to content

Commit

Permalink
backport #3996
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jan 24, 2024
1 parent 7ffccb7 commit a8f4d33
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions compat/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ declare namespace React {
) => boolean
): C;

export interface RefAttributes<R> extends preact.Attributes {
ref?: preact.Ref<R> | undefined;
}

export interface ForwardFn<P = {}, T = any> {
(props: P, ref: ForwardedRef<T>): preact.ComponentChild;
displayName?: string;
Expand All @@ -147,6 +151,11 @@ declare namespace React {
current: T;
}

export interface ForwardRefExoticComponent<P>
extends preact.FunctionComponent<P> {
defaultProps?: Partial<P> | undefined;
}

export type ForwardedRef<T> =
| ((instance: T | null) => void)
| MutableRefObject<T | null>
Expand Down

0 comments on commit a8f4d33

Please sign in to comment.