Skip to content

Commit a169bc5

Browse files
committed
[cached-path-relative] Add documentation to new definition
1 parent bd6515d commit a169bc5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

types/cached-path-relative/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// Definitions by: TeamworkGuy2 <https://github.com/TeamworkGuy2>
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

6+
/**
7+
* Memoize the results of the path.relative function. path.relative can be an expensive operation
8+
* if it happens a lot, and its results shouldn't change for the same arguments.
9+
* Use it just like your normal path.relative, but it's memoized.
10+
*/
611
declare function cachedPathRelative(from: string, to: string): string;
712

813
export = cachedPathRelative;

0 commit comments

Comments
 (0)