diff --git a/packages/react-noop-renderer/src/ReactNoopFlightClient.js b/packages/react-noop-renderer/src/ReactNoopFlightClient.js index 4065bd4957..81709754df 100644 --- a/packages/react-noop-renderer/src/ReactNoopFlightClient.js +++ b/packages/react-noop-renderer/src/ReactNoopFlightClient.js @@ -14,6 +14,8 @@ * environment. */ +import type {FindSourceMapURLCallback} from 'react-client/flight'; + import {readModule} from 'react-noop-renderer/flight-modules'; import ReactFlightClient from 'react-client/flight'; @@ -49,7 +51,11 @@ const {createResponse, processBinaryChunk, getRoot, close} = ReactFlightClient({ }, }); -function read(source: Source): Thenable { +type ReadOptions = {| + findSourceMapURL?: FindSourceMapURLCallback, +|}; + +function read(source: Source, options: ReadOptions): Thenable { const response = createResponse( source, null, @@ -57,7 +63,7 @@ function read(source: Source): Thenable { undefined, undefined, undefined, - undefined, + options !== undefined ? options.findSourceMapURL : undefined, true, ); for (let i = 0; i < source.length; i++) {