ReactFlightImportMetadata.js — react Source File
Architecture documentation for ReactFlightImportMetadata.js, a javascript file in the react codebase. 0 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 2396266a_5487_f53e_5c02_e8f8112f09c9["ReactFlightImportMetadata.js"] 71392b96_14d7_d4ad_f997_79e184462aec["ReactFlightClientConfigBundlerNode.js"] 71392b96_14d7_d4ad_f997_79e184462aec --> 2396266a_5487_f53e_5c02_e8f8112f09c9 800b57fe_64a5_c6f9_986f_d9edff1b0aef["ReactFlightServerConfigUnbundledBundler.js"] 800b57fe_64a5_c6f9_986f_d9edff1b0aef --> 2396266a_5487_f53e_5c02_e8f8112f09c9 style 2396266a_5487_f53e_5c02_e8f8112f09c9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
export type ImportManifestEntry = {
id: string,
// chunks is a double indexed array of chunkId / chunkFilename pairs
chunks: Array<string>,
name: string,
async?: boolean,
};
// This is the parsed shape of the wire format which is why it is
// condensed to only the essentialy information
export type ImportMetadata =
| [
/* id */ string,
/* chunks id/filename pairs, double indexed */ Array<string>,
/* name */ string,
/* async */ 1,
]
| [
/* id */ string,
/* chunks id/filename pairs, double indexed */ Array<string>,
/* name */ string,
];
export const ID = 0;
export const CHUNKS = 1;
export const NAME = 2;
// export const ASYNC = 3;
// This logic is correct because currently only include the 4th tuple member
// when the module is async. If that changes we will need to actually assert
// the value is true. We don't index into the 4th slot because flow does not
// like the potential out of bounds access
export function isAsyncImport(metadata: ImportMetadata): boolean {
return metadata.length === 4;
}
Domain
Subdomains
Functions
Imported By
Source
Frequently Asked Questions
What does ReactFlightImportMetadata.js do?
ReactFlightImportMetadata.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ReactFlightImportMetadata.js?
ReactFlightImportMetadata.js defines 1 function(s): isAsyncImport.
What files import ReactFlightImportMetadata.js?
ReactFlightImportMetadata.js is imported by 2 file(s): ReactFlightClientConfigBundlerNode.js, ReactFlightServerConfigUnbundledBundler.js.
Where is ReactFlightImportMetadata.js in the architecture?
ReactFlightImportMetadata.js is located at packages/react-server-dom-unbundled/src/shared/ReactFlightImportMetadata.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server-dom-unbundled/src/shared).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free