UNPKG

@nxworker/workspace

Version:

Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports

21 lines (20 loc) 895 B
import type { Tree } from '@nx/devkit'; import type { ProjectConfiguration } from '@nx/devkit'; /** * Checks if a file is exported from the project's entrypoint. * * This function scans project entrypoint files (index.ts, index.tsx, etc.) * and checks for export statements matching the given file. * * Supported export patterns: * - export * from "path" * - export { Something } from "path" * - export Something from "path" * * @param tree - The virtual file system tree. * @param project - Project configuration. * @param file - Relative file path within project (e.g., "lib/utils.ts"). * @param cachedTreeExists - Cached tree.exists() function. * @returns True if the file is exported from any entrypoint. */ export declare function isFileExported(tree: Tree, project: ProjectConfiguration, file: string, cachedTreeExists: (tree: Tree, filePath: string) => boolean): boolean;