@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
11 lines (10 loc) • 521 B
TypeScript
import { Tree } from '@nx/devkit';
import type { MoveContext } from '../types/move-context';
/**
* Updates relative imports within the moved file to use alias imports to the source project.
*
* @param tree - The virtual file system tree.
* @param ctx - Resolved move context.
* @param cachedTreeExistsFn - Function to check if a file exists (with caching).
*/
export declare function updateMovedFileImportsIfNeeded(tree: Tree, ctx: MoveContext, cachedTreeExistsFn: (tree: Tree, filePath: string) => boolean): void;