typescript-transform-paths
Version:
Transforms module resolution paths using TypeScript path mapping and/or custom paths
5 lines (4 loc) • 354 B
TypeScript
import ts from "typescript";
import { VisitorContext } from "../types";
/** Gets proper path and calls updaterFn to get the new node if it should be updated */
export declare function resolvePathAndUpdateNode(context: VisitorContext, node: ts.Node, moduleName: string, updaterFn: (newPath: ts.StringLiteral) => ts.Node | undefined): ts.Node | undefined;