index.js — react Source File
Architecture documentation for index.js, a javascript file in the react codebase. 3 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR a9fa5571_b040_365c_40f4_cd5d0a8cdc2f["index.js"] 7413ab6d_5a4b_26b9_6ff5_21bf96ba027f["importFile.js"] a9fa5571_b040_365c_40f4_cd5d0a8cdc2f --> 7413ab6d_5a4b_26b9_6ff5_21bf96ba027f 51cbb66f_221d_b34b_381a_d1e86f8c7d7a["importFile.worker.js"] a9fa5571_b040_365c_40f4_cd5d0a8cdc2f --> 51cbb66f_221d_b34b_381a_d1e86f8c7d7a 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf["types.js"] a9fa5571_b040_365c_40f4_cd5d0a8cdc2f --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf 23e188b5_5b1d_e081_bafe_8ae837e2bab9["createDataResourceFromImportedFile.js"] 23e188b5_5b1d_e081_bafe_8ae837e2bab9 --> a9fa5571_b040_365c_40f4_cd5d0a8cdc2f 7413ab6d_5a4b_26b9_6ff5_21bf96ba027f["importFile.js"] 7413ab6d_5a4b_26b9_6ff5_21bf96ba027f --> a9fa5571_b040_365c_40f4_cd5d0a8cdc2f a381d443_cec6_18eb_759f_5d0878906293["timelineCache.js"] a381d443_cec6_18eb_759f_5d0878906293 --> a9fa5571_b040_365c_40f4_cd5d0a8cdc2f style a9fa5571_b040_365c_40f4_cd5d0a8cdc2f 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
*/
// This file uses workerize to load ./importFile.worker as a webworker and instanciates it,
// exposing flow typed functions that can be used on other files.
import * as importFileModule from './importFile';
import WorkerizedImportFile from './importFile.worker';
import type {TimelineData} from '../types';
type ImportFileModule = typeof importFileModule;
const workerizedImportFile: ImportFileModule = window.Worker
? WorkerizedImportFile()
: importFileModule;
export type ImportWorkerOutputData =
| {status: 'SUCCESS', processedData: TimelineData}
| {status: 'INVALID_PROFILE_ERROR', error: Error}
| {status: 'UNEXPECTED_ERROR', error: Error};
export type importFileFunction = (file: File) => ImportWorkerOutputData;
export const importFile = (file: File): Promise<ImportWorkerOutputData> =>
workerizedImportFile.importFile(file);
Domain
Subdomains
Functions
Dependencies
Imported By
Source
Frequently Asked Questions
What does index.js do?
index.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 index.js?
index.js defines 1 function(s): importFileFunction.
What does index.js depend on?
index.js imports 3 module(s): importFile.js, importFile.worker.js, types.js.
What files import index.js?
index.js is imported by 3 file(s): createDataResourceFromImportedFile.js, importFile.js, timelineCache.js.
Where is index.js in the architecture?
index.js is located at packages/react-devtools-timeline/src/import-worker/index.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-timeline/src/import-worker).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free