Skip to content

Commit 7936faa

Browse files
committed
Rename ServerReferenceMetadata type to ServerReferenceId
1 parent 6448839 commit 7936faa

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

packages/react-server-dom-relay/src/ReactFlightDOMRelayServerHostConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import isArray from 'shared/isArray';
1919

2020
export type ClientReference<T> = JSResourceReference<T>;
2121
export type ServerReference<T> = T;
22-
export type ServerReferenceMetadata = {};
22+
export type ServerReferenceId = {};
2323

2424
import type {
2525
Destination,
@@ -69,7 +69,7 @@ export function resolveClientReferenceMetadata<T>(
6969
export function resolveServerReferenceMetadata<T>(
7070
config: BundlerConfig,
7171
resource: ServerReference<T>,
72-
): {id: ServerReferenceMetadata, bound: Promise<Array<any>>} {
72+
): {id: ServerReferenceId, bound: Promise<Array<any>>} {
7373
throw new Error('Not implemented.');
7474
}
7575

packages/react-server-dom-webpack/src/ReactFlightServerWebpackBundlerConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type ServerReference<T: Function> = T & {
2121
$$bound: Array<ReactModel>,
2222
};
2323

24-
export type ServerReferenceMetadata = string;
24+
export type ServerReferenceId = string;
2525

2626
// eslint-disable-next-line no-unused-vars
2727
export type ClientReference<T> = {
@@ -76,7 +76,7 @@ export function resolveClientReferenceMetadata<T>(
7676
export function resolveServerReferenceMetadata<T>(
7777
config: BundlerConfig,
7878
serverReference: ServerReference<T>,
79-
): {id: ServerReferenceMetadata, bound: Promise<Array<any>>} {
79+
): {id: ServerReferenceId, bound: Promise<Array<any>>} {
8080
return {
8181
id: serverReference.$$id,
8282
bound: Promise.resolve(serverReference.$$bound),

packages/react-server-native-relay/src/ReactFlightNativeRelayServerHostConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import JSResourceReferenceImpl from 'JSResourceReferenceImpl';
1616

1717
export type ClientReference<T> = JSResourceReference<T>;
1818
export type ServerReference<T> = T;
19-
export type ServerReferenceMetadata = {};
19+
export type ServerReferenceId = {};
2020

2121
import type {
2222
Destination,
@@ -66,7 +66,7 @@ export function resolveClientReferenceMetadata<T>(
6666
export function resolveServerReferenceMetadata<T>(
6767
config: BundlerConfig,
6868
resource: ServerReference<T>,
69-
): {id: ServerReferenceMetadata, bound: Promise<Array<any>>} {
69+
): {id: ServerReferenceId, bound: Promise<Array<any>>} {
7070
throw new Error('Not implemented.');
7171
}
7272

packages/react-server/src/ReactFlightServer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {
1515
ClientReference,
1616
ClientReferenceKey,
1717
ServerReference,
18-
ServerReferenceMetadata,
18+
ServerReferenceId,
1919
} from './ReactFlightServerConfig';
2020
import type {ContextSnapshot} from './ReactFlightNewContext';
2121
import type {ThenableState} from './ReactFlightThenable';
@@ -591,7 +591,7 @@ function serializeServerReference(
591591
return serializeServerReferenceID(existingId);
592592
}
593593
const serverReferenceMetadata: {
594-
id: ServerReferenceMetadata,
594+
id: ServerReferenceId,
595595
bound: Promise<Array<any>>,
596596
} = resolveServerReferenceMetadata(request.bundlerConfig, serverReference);
597597
request.pendingChunks++;

packages/react-server/src/ReactFlightServerBundlerConfigCustom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export opaque type BundlerConfig = mixed;
1313
export opaque type ClientReference<T> = mixed; // eslint-disable-line no-unused-vars
1414
export opaque type ServerReference<T> = mixed; // eslint-disable-line no-unused-vars
1515
export opaque type ClientReferenceMetadata: any = mixed;
16-
export opaque type ServerReferenceMetadata: any = mixed;
16+
export opaque type ServerReferenceId: any = mixed;
1717
export opaque type ClientReferenceKey: any = mixed;
1818
export const isClientReference = $$$hostConfig.isClientReference;
1919
export const isServerReference = $$$hostConfig.isServerReference;

0 commit comments

Comments
 (0)