Skip to content

Commit ea5c8f6

Browse files
authored
🤖 Merge PR DefinitelyTyped#74138 [Node] Fix path.normalize description to include info on empty strings. by @yCodeTech
1 parent b694df4 commit ea5c8f6

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎types/node/path.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ declare module "path" {
6767
interface PlatformPath {
6868
/**
6969
* Normalize a string path, reducing '..' and '.' parts.
70-
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
70+
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
7171
*
7272
* @param path string path to normalize.
7373
* @throws {TypeError} if `path` is not a string.

‎types/node/v20/path.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ declare module "path" {
6767
interface PlatformPath {
6868
/**
6969
* Normalize a string path, reducing '..' and '.' parts.
70-
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
70+
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
7171
*
7272
* @param path string path to normalize.
7373
* @throws {TypeError} if `path` is not a string.

‎types/node/v22/path.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ declare module "path" {
6767
interface PlatformPath {
6868
/**
6969
* Normalize a string path, reducing '..' and '.' parts.
70-
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
70+
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
7171
*
7272
* @param path string path to normalize.
7373
* @throws {TypeError} if `path` is not a string.

0 commit comments

Comments
 (0)