Skip to content

Commit e87007a

Browse files
authored
Fix issue with incorrect typing for StrictReactNode (#160)
1 parent 6d224fd commit e87007a

File tree

1 file changed

+4
-1
lines changed
  • packages/@react-facet/dom-fiber/src

1 file changed

+4
-1
lines changed

packages/@react-facet/dom-fiber/src/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FacetProp, Unsubscribe } from '@react-facet/core'
22
import { FiberRoot, Reconciler } from 'react-reconciler'
3-
import { MutableRefObject, ReactNode, ReactPortal } from 'react'
3+
import { MutableRefObject, ReactElement, ReactNode, ReactPortal } from 'react'
44

55
export type FacetFiberRoot = FiberRoot
66

@@ -107,6 +107,8 @@ interface StrictReactElement<P = unknown, T extends string = string> {
107107
key: string | null
108108
}
109109

110+
export type FastTextElement = ReactElement<TextProps>
111+
110112
/**
111113
* More strict type than default React.ReactNode
112114
*
@@ -121,6 +123,7 @@ export type StrictReactNode =
121123
| boolean
122124
| null
123125
| undefined
126+
| FastTextElement
124127

125128
export type ElementProps<T> = PointerEvents &
126129
FocusEvents &

0 commit comments

Comments
 (0)