Skip to content

Commit

Permalink
Add findSourceMapURL to ReactNoopFlightClient
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jul 18, 2024
1 parent 080e36c commit aa1b23d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/react-noop-renderer/src/ReactNoopFlightClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -49,15 +51,19 @@ const {createResponse, processBinaryChunk, getRoot, close} = ReactFlightClient({
},
});

function read<T>(source: Source): Thenable<T> {
type ReadOptions = {|
findSourceMapURL?: FindSourceMapURLCallback,
|};

function read<T>(source: Source, options: ReadOptions): Thenable<T> {
const response = createResponse(
source,
null,
undefined,
undefined,
undefined,
undefined,
undefined,
options !== undefined ? options.findSourceMapURL : undefined,
true,
);
for (let i = 0; i < source.length; i++) {
Expand Down

0 comments on commit aa1b23d

Please sign in to comment.