Files
react/packages/react-server-dom-relay/src/ReactFlightDOMRelayProtocol.js
T
Josh Story efc6a08e98 [Flight] Implement error digests for Flight runtime and expose errorInfo in getDerivedStateFromError (#25302)
Similar to Fizz, Flight now supports a return value from the user provided onError option. If a value is returned from onError it will be serialized and provided to the client.

The digest is stashed on the constructed Error on the client as .digest
2022-09-23 13:19:29 -07:00

35 lines
690 B
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
*/
import type {ModuleMetaData} from 'ReactFlightDOMRelayServerIntegration';
export type JSONValue =
| string
| number
| boolean
| null
| {+[key: string]: JSONValue}
| $ReadOnlyArray<JSONValue>;
export type RowEncoding =
| ['J', number, JSONValue]
| ['M', number, ModuleMetaData]
| ['P', number, string]
| ['S', number, string]
| [
'E',
number,
{
digest: string,
message?: string,
stack?: string,
...
},
];