dts-paths
Version:
Replace alias paths with relative paths after typescript compilation.
22 lines (21 loc) • 618 B
text/typescript
/**
* @module index
*/
import { ProjectOptions } from 'ts-morph';
type TsMorphConfigKeys = 'tsConfigFilePath' | 'compilerOptions';
export interface Options extends Pick<ProjectOptions, TsMorphConfigKeys> {
exclude?: string[];
extensions?: `.${string}`[];
}
/**
* @function resolvePaths
* @description Resolve dts import paths.
* @param root The root directory of dts.
* @param options The options of resolve.
* @return {Promise<Set<string>>}
*/
export declare function resolvePaths(
root: string,
{ compilerOptions, exclude, tsConfigFilePath, extensions }?: Options
): Promise<Set<string>>;
export {};