Skip to main content
Go to Latest
method SourceFile.prototype.getRelativePathAsModuleSpecifierTo
import { SourceFile } from "https://deno.land/x/deno2node@v1.7.1/src/deps.deno.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