Skip to content

Commit

Permalink
keep registerClientReference and registerServerReference
Browse files Browse the repository at this point in the history
  • Loading branch information
alunyov committed Dec 16, 2023
1 parent 625e177 commit 5f125f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-server-dom-fb/src/ReactFlightDOMServerFB.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import {
import {setByteLengthOfChunkImplementation} from 'react-server/src/ReactServerStreamConfig';

export {
registerClientReference,
registerServerReference,
getRequestedClientReferencesKeys,
clearRequestedClientReferencesKeysSet,
setCheckIsClientReference,
Expand Down
12 changes: 12 additions & 0 deletions packages/react-server-dom-fb/src/ReactFlightReferencesFB.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export function setCheckIsClientReference(
checkIsClientReference = impl;
}

export function registerClientReference<T>(
clientReference: ClientReference<T>,
): void {}

export function isClientReference(reference: mixed): boolean {
if (checkIsClientReference == null) {
throw new Error('Expected implementation for checkIsClientReference.');
Expand All @@ -58,6 +62,14 @@ export function resolveClientReferenceMetadata<T>(
return {moduleId: clientReference.getModuleId(), exportName: 'default'};
}

export function registerServerReference<T>(
serverReference: ServerReference<T>,
id: string,
exportName: null | string,
): ServerReference<T> {
throw new Error('registerServerReference: Not Implemented.');
}

export function isServerReference<T>(reference: T): boolean {
throw new Error('isServerReference: Not Implemented.');
}
Expand Down

0 comments on commit 5f125f9

Please sign in to comment.