/** * 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. * * @noformat * @oncall react_native * @generated SignedSource<<0ec72971869a882d97b381e3f1baa922>> * * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js * Original file: packages/metro/src/IncrementalBundler.js * To regenerate, run: * js1 build metro-ts-defs (internal) OR * yarn run build-ts-defs (OSS) */ import type {DeltaResult, Graph, Module} from './DeltaBundler'; import type { Options as DeltaBundlerOptions, ReadOnlyDependencies, TransformInputOptions, } from './DeltaBundler/types'; import type {GraphId} from './lib/getGraphId'; import type {ResolverInputOptions} from './shared/types'; import type {ConfigT} from 'metro-config'; import Bundler from './Bundler'; import DeltaBundler from './DeltaBundler'; export declare type RevisionId = string; export type OutputGraph = Graph; type OtherOptions = Readonly<{ onProgress: DeltaBundlerOptions['onProgress']; shallow: boolean; lazy: boolean; }>; export type GraphRevision = { readonly id: RevisionId; readonly date: Date; readonly graphId: GraphId; readonly graph: OutputGraph; readonly prepend: ReadonlyArray; }; export type IncrementalBundlerOptions = Readonly<{ hasReducedPerformance?: boolean; watch?: boolean; }>; declare class IncrementalBundler { _config: ConfigT; _bundler: Bundler; _deltaBundler: DeltaBundler; _revisionsById: Map>; _revisionsByGraphId: Map>; static revisionIdFromString: (str: string) => RevisionId; constructor(config: ConfigT, options?: IncrementalBundlerOptions); end(): Promise; getBundler(): Bundler; getDeltaBundler(): DeltaBundler; getRevision( revisionId: RevisionId, ): null | undefined | Promise; getRevisionByGraphId( graphId: GraphId, ): null | undefined | Promise; buildGraphForEntries( entryFiles: ReadonlyArray, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions, ): Promise; getDependencies( entryFiles: ReadonlyArray, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions, ): Promise; buildGraph( entryFile: string, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions, ): Promise<{ readonly graph: OutputGraph; readonly prepend: ReadonlyArray; }>; initializeGraph( entryFile: string, transformOptions: TransformInputOptions, resolverOptions: ResolverInputOptions, otherOptions?: OtherOptions, ): Promise<{delta: DeltaResult; revision: GraphRevision}>; updateGraph( revision: GraphRevision, reset: boolean, ): Promise<{delta: DeltaResult; revision: GraphRevision}>; endGraph(graphId: GraphId): Promise; _getAbsoluteEntryFiles( entryFiles: ReadonlyArray, ): Promise>; ready(): Promise; } export default IncrementalBundler;