typescript-transform-paths
Version:
Transforms module resolution paths using TypeScript path mapping and/or custom paths
10 lines (9 loc) • 711 B
TypeScript
import type ts from "typescript";
import type { GetCanonicalFileName, SourceFile } from "typescript";
import type { VisitorContext } from "../types.ts";
/** Determine output file path for source file */
export declare function getOutputDirForSourceFile(context: VisitorContext, sourceFile: SourceFile): string;
/** Determine if moduleName matches config in paths */
export declare function isModulePathsMatch(context: VisitorContext, moduleName: string): boolean;
/** Create barebones EmitHost (for no-Program transform) */
export declare function createSyntheticEmitHost(compilerOptions: ts.CompilerOptions, tsInstance: typeof ts, getCanonicalFileName: GetCanonicalFileName, fileNames: string[]): ts.EmitHost;