Skip to content

Commit

Permalink
types: Add type to compat (#4675)
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian authored Feb 16, 2025
1 parent c477550 commit 7b94f64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions compat/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,19 @@ declare namespace React {
ref?: preact.Ref<R> | undefined;
}

/**
* @deprecated Please use `ForwardRefRenderFunction` instead.
*/
export interface ForwardFn<P = {}, T = any> {
(props: P, ref: ForwardedRef<T>): preact.ComponentChild;
displayName?: string;
}

export interface ForwardRefRenderFunction<T = any, P = {}> {
(props: P, ref: ForwardedRef<T>): preact.ComponentChild;
displayName?: string;
}

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

0 comments on commit 7b94f64

Please sign in to comment.