diff --git a/packages/react-dom/src/server/ReactDOMFizzServerNode.js b/packages/react-dom/src/server/ReactDOMFizzServerNode.js index 306724c448b0f..efc6cd817b057 100644 --- a/packages/react-dom/src/server/ReactDOMFizzServerNode.js +++ b/packages/react-dom/src/server/ReactDOMFizzServerNode.js @@ -46,7 +46,7 @@ type Options = {| onError?: (error: mixed) => void, |}; -type Controls = {| +type PipeableStream = {| // Cancel any pending I/O and put anything remaining into // client rendered mode. abort(): void, @@ -76,7 +76,7 @@ function createRequestImpl(children: ReactNodeList, options: void | Options) { function renderToPipeableStream( children: ReactNodeList, options?: Options, -): Controls { +): PipeableStream { const request = createRequestImpl(children, options); let hasStartedFlowing = false; startWork(request); diff --git a/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js b/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js index c088725f25909..76952b6d54258 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js +++ b/packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js @@ -26,7 +26,7 @@ type Options = { onError?: (error: mixed) => void, }; -type Controls = {| +type PipeableStream = {| pipe(destination: T): T, |}; @@ -35,7 +35,7 @@ function renderToPipeableStream( webpackMap: BundlerConfig, options?: Options, context?: Array<[string, ServerContextJSONValue]>, -): Controls { +): PipeableStream { const request = createRequest( model, webpackMap,