@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
12 lines (11 loc) • 657 B
TypeScript
import { Tree, ProjectConfiguration } from '@nx/devkit';
/**
* Updates imports in a project by replacing one alias with another.
*
* @param tree - The virtual file system tree.
* @param project - The project configuration.
* @param sourceImportPath - The source import path to replace.
* @param targetImportPath - The target import path to use.
* @param getProjectSourceFilesFn - Function to get project source files.
*/
export declare function updateImportsByAliasInProject(tree: Tree, project: ProjectConfiguration, sourceImportPath: string, targetImportPath: string, getProjectSourceFilesFn: (tree: Tree, projectRoot: string) => string[]): void;