Reference
@reckona/mreact-compat/flight
31 public exports.
Function
FunctioncreateFetchServerReferenceCaller
function createFetchServerReferenceCaller(endpoint: string, options: FetchServerReferenceCallerOptions): (reference: FlightServerReference, args: unknown[]): unknownCreates a server reference caller that POSTs encoded action invocations to an endpoint.FunctiondecodeFlightResponsefunction decodeFlightResponse(response: FlightResponse, options: DecodeFlightOptions): ReactCompatNodeDecodes the root model from a parsed Flight response.FunctiongetReactFlightProtocolCoveragefunction getReactFlightProtocolCoverage(): ReactFlightProtocolCoverageReturns the React Flight protocol markers currently covered by the decoder.FunctionhydrateFlightResponsefunction hydrateFlightResponse(container: Element, response: FlightResponse, options: HydrateFlightOptions): RootDecodes a Flight response and hydrates the resulting tree into a container.FunctionparseFlightResponsefunction parseFlightResponse(payload: string | ArrayBuffer | Uint8Array<ArrayBufferLike>): FlightResponseParses a serialized Flight payload into a Flight response object.FunctionreadFlightResponsefunction readFlightResponse(root: ParentNode | Document, id?: string): FlightResponseReads and parses a Flight response script from a document or parent node.Interface
InterfaceDecodeFlightOptions
interface DecodeFlightOptionsOptions used when resolving client and server references while decoding Flight models.InterfaceFetchServerReferenceCallerOptionsinterface FetchServerReferenceCallerOptionsOptions for creating a fetch-based server reference caller.InterfaceFlightArrayBufferModelinterface FlightArrayBufferModelFlight model record for an ArrayBuffer value.InterfaceFlightBigIntModelinterface FlightBigIntModelFlight model record for a bigint value.InterfaceFlightClientReferenceinterface FlightClientReferenceClient module reference carried by a Flight response.InterfaceFlightClientReferenceModelinterface FlightClientReferenceModelFlight model record that points at a client reference table entry.InterfaceFlightDataViewModelinterface FlightDataViewModelFlight model record for a DataView value.InterfaceFlightDateModelinterface FlightDateModelFlight model record for a Date value.InterfaceFlightElementModelinterface FlightElementModelFlight model record for a rendered element.InterfaceFlightErrorModelinterface FlightErrorModelFlight model record for an error thrown while decoding.InterfaceFlightFormDataModelinterface FlightFormDataModelFlight model record for a FormData value.InterfaceFlightIterableModelinterface FlightIterableModelFlight model record for an iterable value encoded as an array.InterfaceFlightMapModelinterface FlightMapModelFlight model record for a Map value.InterfaceFlightNumberModelinterface FlightNumberModelFlight model record for non-finite or negative-zero numbers.InterfaceFlightPromiseModelinterface FlightPromiseModelFlight model record for a pending promise chunk.InterfaceFlightResponseinterface FlightResponseParsed React Flight response with root model and reference tables.InterfaceFlightServerReferenceinterface FlightServerReferenceServer action reference carried by a Flight response.InterfaceFlightServerReferenceModelinterface FlightServerReferenceModelFlight model record that points at a server reference table entry.InterfaceFlightSetModelinterface FlightSetModelFlight model record for a Set value.InterfaceFlightSymbolModelinterface FlightSymbolModelFlight model record for a global symbol.InterfaceFlightTypedArrayModelinterface FlightTypedArrayModelFlight model record for a typed array value.InterfaceHydrateFlightOptionsinterface HydrateFlightOptionsOptions for decoding a Flight response and hydrating it into a DOM container.InterfaceReactFlightProtocolCoverageinterface ReactFlightProtocolCoverageLists the React Flight row tags and model tokens recognized by this package.Type Alias
Type AliasFlightModel
type FlightModel = null | string | number | boolean | FlightModel[] | FlightObjectModel | FlightElementModel | FlightClientReferenceModel | FlightServerReferenceModel | FlightDateModel | FlightBigIntModel | FlightNumberModel | FlightSymbolModel | FlightMapModel | FlightSetModel | FlightFormDataModel | FlightIterableModel | FlightErrorModel | FlightPromiseModel | FlightArrayBufferModel | FlightTypedArrayModel | FlightDataViewModel | { kind: "undefined" }Serializable model value supported by the mreact Flight decoder.Type AliasFlightTypedArrayNametype FlightTypedArrayName = "Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt64Array" | "BigUint64Array"Typed array constructor names supported by the Flight decoder.