Skip to main content
Module

x/ts_morph/mod.ts>Directory#getRelativePathAsModuleSpecifierTo

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method Directory.prototype.getRelativePathAsModuleSpecifierTo
import { Directory } from "https://deno.land/x/ts_morph@15.1.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