Skip to content

Commit

Permalink
rename $$$hostConfig to $$$config (facebook#26593)
Browse files Browse the repository at this point in the history
We have moved away from HostConfig since the name does not fully
describe the configs we customize per runtime like FlightClient,
FlightServer, Fizz, and Fiber. This commit generalizes $$$hostconfig to
$$$config
  • Loading branch information
gnoff authored Apr 10, 2023
1 parent b55d319 commit dd0619b
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 203 deletions.
20 changes: 10 additions & 10 deletions packages/react-client/src/forks/ReactFlightClientConfig.custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@
// So `$$$config` looks like a global variable, but it's
// really an argument to a top-level wrapping function.

declare var $$$hostConfig: any;
declare var $$$config: any;

export type Response = any;
export opaque type SSRManifest = mixed;
export opaque type ServerManifest = mixed;
export opaque type ServerReferenceId = string;
export opaque type ClientReferenceMetadata = mixed;
export opaque type ClientReference<T> = mixed; // eslint-disable-line no-unused-vars
export const resolveClientReference = $$$hostConfig.resolveClientReference;
export const resolveServerReference = $$$hostConfig.resolveServerReference;
export const preloadModule = $$$hostConfig.preloadModule;
export const requireModule = $$$hostConfig.requireModule;
export const resolveClientReference = $$$config.resolveClientReference;
export const resolveServerReference = $$$config.resolveServerReference;
export const preloadModule = $$$config.preloadModule;
export const requireModule = $$$config.requireModule;

export opaque type Source = mixed;

export type UninitializedModel = string;
export const parseModel = $$$hostConfig.parseModel;
export const parseModel = $$$config.parseModel;

export opaque type StringDecoder = mixed; // eslint-disable-line no-undef

export const supportsBinaryStreams = $$$hostConfig.supportsBinaryStreams;
export const createStringDecoder = $$$hostConfig.createStringDecoder;
export const readPartialStringChunk = $$$hostConfig.readPartialStringChunk;
export const readFinalStringChunk = $$$hostConfig.readFinalStringChunk;
export const supportsBinaryStreams = $$$config.supportsBinaryStreams;
export const createStringDecoder = $$$config.createStringDecoder;
export const readPartialStringChunk = $$$config.readPartialStringChunk;
export const readFinalStringChunk = $$$config.readFinalStringChunk;
Loading

0 comments on commit dd0619b

Please sign in to comment.