Skip to main content
Module

x/ts_morph/ts_morph.d.ts>Directory#getRelativePathTo

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
method Directory.prototype.getRelativePathTo
import { Directory } from "https://deno.land/x/ts_morph@22.0.0/ts_morph.d.ts";

Gets the relative path to the specified path.

Parameters

fileOrDirPath: string
  • The file or directory path.

Returns

string

Gets the relative path to another source file.

Parameters

sourceFile: SourceFile
  • Source file.

Returns

string

Gets the relative path to another directory.

Parameters

directory: Directory
  • Directory.

Returns

string