diff --git a/compat/src/index.d.ts b/compat/src/index.d.ts index 8c1cb8d669..00f47d0def 100644 --- a/compat/src/index.d.ts +++ b/compat/src/index.d.ts @@ -128,11 +128,20 @@ declare namespace React { ) => boolean ): C; + export interface RefAttributes extends preact.Attributes { + ref?: preact.Ref | undefined; + } + export interface ForwardFn

{ (props: P, ref: ForwardedRef): preact.ComponentChild; displayName?: string; } + export interface ForwardRefExoticComponent

+ extends preact.FunctionComponent

{ + defaultProps?: Partial

| undefined; + } + export function forwardRef( fn: ForwardFn ): preact.FunctionalComponent & { ref?: preact.Ref }>;