mirror of
https://github.com/facebook/react.git
synced 2026-02-25 05:03:03 +00:00
* Resolve Server-side Blocks instead of Components React elements should no longer be used to extract arbitrary data but only for prerendering trees. Blocks are used to create asynchronous behavior. * Resolve Blocks in the Client * Tests * Bug fix relay JSON traversal It's supposed to pass the original object and not the new one. * Lint * Move Noop Module Test Helpers to top level entry points This module has shared state. It needs to be external from builds. This lets us test the built versions of the Noop renderer.
53 lines
1.4 KiB
JavaScript
53 lines
1.4 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
type JSONValue =
|
|
| string
|
|
| boolean
|
|
| number
|
|
| null
|
|
| {+[key: string]: JSONValue}
|
|
| $ReadOnlyArray<JSONValue>;
|
|
|
|
declare module 'ReactFlightDOMRelayServerIntegration' {
|
|
declare export opaque type Destination;
|
|
declare export function emitModel(
|
|
destination: Destination,
|
|
id: number,
|
|
json: JSONValue,
|
|
): void;
|
|
declare export function emitError(
|
|
destination: Destination,
|
|
id: number,
|
|
message: string,
|
|
stack: string,
|
|
): void;
|
|
declare export function close(destination: Destination): void;
|
|
|
|
declare export opaque type ModuleReference;
|
|
declare export type ModuleMetaData = JSONValue;
|
|
declare export function resolveModuleMetaData(
|
|
resourceReference: ModuleReference,
|
|
): ModuleMetaData;
|
|
}
|
|
|
|
declare module 'ReactFlightDOMRelayClientIntegration' {
|
|
declare export opaque type ModuleReference<T>;
|
|
declare export opaque type ModuleMetaData;
|
|
declare export function resolveModuleReference<T>(
|
|
moduleData: ModuleMetaData,
|
|
): ModuleReference<T>;
|
|
declare export function preloadModule<T>(
|
|
moduleReference: ModuleReference<T>,
|
|
): void;
|
|
declare export function requireModule<T>(
|
|
moduleReference: ModuleReference<T>,
|
|
): T;
|
|
}
|