Constrain the container type of createPortal (#24496)

We already constrained the type of createRoot (can't take document) and hydrateRoot (can't take fragments).
This commit is contained in:
Sebastian Markbåge
2022-05-04 23:05:37 -04:00
committed by GitHub
parent 3dc9a8af05
commit 024a7274fb
+1 -1
View File
@@ -107,7 +107,7 @@ setBatchingImplementation(
function createPortal(
children: ReactNodeList,
container: Container,
container: Element | DocumentFragment,
key: ?string = null,
): React$Portal {
if (!isValidContainer(container)) {