Skip to content

Commit 84a37d2

Browse files
authored
chore(gatsby): properly typed return types of replaceHydrateFunction (#22854)
* feat: properly typed return types of replaceHydrateFunction * refactor: use renderer type in react-dom instead of manually define
1 parent ed2762f commit 84a37d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/gatsby/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from "react"
2+
import { Renderer } from "react-dom"
23
import { EventEmitter } from "events"
34
import { WindowLocation, NavigateFn } from "@reach/router"
45
import { createContentDigest } from "gatsby-core-utils"
@@ -537,7 +538,7 @@ export interface GatsbyBrowser {
537538
args: ReplaceComponentRendererArgs,
538539
options: PluginOptions
539540
): any
540-
replaceHydrateFunction?(args: BrowserPluginArgs, options: PluginOptions): any
541+
replaceHydrateFunction?(args: BrowserPluginArgs, options: PluginOptions): Renderer
541542
shouldUpdateScroll?(args: ShouldUpdateScrollArgs, options: PluginOptions): any
542543
wrapPageElement?(
543544
args: WrapPageElementBrowserArgs,

0 commit comments

Comments
 (0)