MCPcopy Index your code
hub / github.com/angular/angular / relativePathBetween

Function relativePathBetween

packages/compiler-cli/src/ngtsc/util/src/path.ts:12–15  ·  view source on GitHub ↗
(from: string, to: string)

Source from the content-addressed store, hash-verified

10import ts from 'typescript';
11
12export function relativePathBetween(from: string, to: string): string | null {
13 const relativePath = stripExtension(relative(dirname(resolve(from)), resolve(to)));
14 return relativePath !== '' ? toRelativeImport(relativePath) : null;
15}
16
17export function normalizeSeparators(path: string): string {
18 // TODO: normalize path only for OS that need it.

Callers 2

rewriteSpecifierMethod · 0.90
makeTopLevelShimMethod · 0.90

Calls 5

stripExtensionFunction · 0.90
relativeFunction · 0.90
dirnameFunction · 0.90
resolveFunction · 0.90
toRelativeImportFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…