We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0597299 commit 8273cf8Copy full SHA for 8273cf8
src/index.tsx
@@ -222,8 +222,10 @@ class OutPortal<C extends Component<any>> extends React.PureComponent<OutPortalP
222
}
223
224
225
-const createHtmlPortalNode = createPortalNode.bind(null, ELEMENT_TYPE_HTML) as () => HtmlPortalNode;
226
-const createSvgPortalNode = createPortalNode.bind(null, ELEMENT_TYPE_SVG) as () => SvgPortalNode;
+const createHtmlPortalNode = createPortalNode.bind(null, ELEMENT_TYPE_HTML) as
+ <C extends Component<any> = Component<any>>() => HtmlPortalNode<C>;
227
+const createSvgPortalNode = createPortalNode.bind(null, ELEMENT_TYPE_SVG) as
228
+ <C extends Component<any> = Component<any>>() => SvgPortalNode<C>;
229
230
export {
231
createHtmlPortalNode,
0 commit comments