/** * 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<> * * This file was translated from Flow by scripts/generateTypeScriptDefinitions.js * Original file: packages/metro/src/lib/modulePath.js * To regenerate, run: * js1 build metro-ts-defs (internal) OR * yarn run build-ts-defs (OSS) */ /** * The URL search parameter that marks a virtual module. A virtual module's URL * is the one a file at its virtual path would have, plus this parameter. */ export declare const VIRTUAL_MODULE_URL_PARAM: 'virtual'; export declare type VIRTUAL_MODULE_URL_PARAM = typeof VIRTUAL_MODULE_URL_PARAM; /** * The graph path of the virtual module at `virtualPath`. A virtual path names * exactly one module: the same virtual path with different source is a * modification of that module, as an edit to a file is. */ export declare function deriveVirtualModulePath(virtualPath: string): string; export declare function isVirtualModulePath(modulePath: string): boolean; /** * The path a module is resolved from, transformed as, and addressed by in * URLs. For a virtual module this is its virtual path, so imports inside it * resolve from that path's directory and path-based transform configuration, * extension checks included, behaves as for a file at that path. Otherwise it * is the module path itself. */ export declare function getModuleSourcePath(modulePath: string): string; /** * A module path for display, as in development module names: relative to * `rootDir` with POSIX separators, and namespaced if the module is virtual. */ export declare function getModuleDisplayPath(modulePath: string, rootDir: string): string; /** * Whether a URL addresses a virtual module. Its path is the module's virtual * path, which may also be a real file's, so such a URL must never be served as * that file. */ export declare function isVirtualModuleUrl(searchParams: URLSearchParams): boolean;