Module

x/ts_morph/mod.ts>SourceFile#getRelativePathAsModuleSpecifierTo

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
method SourceFile.prototype.getRelativePathAsModuleSpecifierTo
import { SourceFile } from "https://dotland.deno.dev/x/ts_morph@22.0.0/mod.ts";

Gets the relative path to the specified file path as a module specifier.

Parameters

filePath: string
  • File path.

Returns

string

Gets the relative path to the specified source file as a module specifier.

Parameters

sourceFile: SourceFile
  • Source file.

Returns

string

Gets the relative path to the specified directory as a module specifier.

Parameters

directory: Directory
  • Directory.

Returns

string