Skip to content

Commit 7488b00

Browse files
imatveevaddaleax
authored andcommitted
doc: added types to path docs
PR-URL: #9514 Reviewed-By: Roman Reiss <[email protected]>
1 parent 549b6f2 commit 7488b00

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

doc/api/path.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ added: v0.1.25
6161

6262
* `path` {String}
6363
* `ext` {String} An optional file extension
64+
* Return: {String}
6465

6566
The `path.basename()` methods returns the last portion of a `path`, similar to
6667
the Unix `basename` command.
@@ -83,6 +84,8 @@ and is not a string.
8384
added: v0.9.3
8485
-->
8586

87+
* {String}
88+
8689
Provides the platform-specific path delimiter:
8790

8891
* `;` for Windows
@@ -114,6 +117,7 @@ added: v0.1.16
114117
-->
115118

116119
* `path` {String}
120+
* Return: {String}
117121

118122
The `path.dirname()` method returns the directory name of a `path`, similar to
119123
the Unix `dirname` command.
@@ -133,6 +137,7 @@ added: v0.1.25
133137
-->
134138

135139
* `path` {String}
140+
* Return: {String}
136141

137142
The `path.extname()` method returns the extension of the `path`, from the last
138143
occurrence of the `.` (period) character to end of string in the last portion of
@@ -168,10 +173,11 @@ added: v0.11.15
168173

169174
* `pathObject` {Object}
170175
* `dir` {String}
171-
* `root` {String}
176+
* `root` {String}
172177
* `base` {String}
173178
* `name` {String}
174179
* `ext` {String}
180+
* Return: {String}
175181

176182
The `path.format()` method returns a path string from an object. This is the
177183
opposite of [`path.parse()`][].
@@ -244,6 +250,7 @@ added: v0.11.2
244250
-->
245251

246252
* `path` {String}
253+
* Return: {Boolean}
247254

248255
The `path.isAbsolute()` method determines if `path` is an absolute path.
249256

@@ -278,6 +285,7 @@ added: v0.1.16
278285
-->
279286

280287
* `...paths` {String} A sequence of path segments
288+
* Return: {String}
281289

282290
The `path.join()` method joins all given `path` segments together using the
283291
platform specific separator as a delimiter, then normalizes the resulting path.
@@ -304,6 +312,7 @@ added: v0.1.23
304312
-->
305313

306314
* `path` {String}
315+
* Return: {String}
307316

308317
The `path.normalize()` method normalizes the given `path`, resolving `'..'` and
309318
`'.'` segments.
@@ -337,6 +346,7 @@ added: v0.11.15
337346
-->
338347

339348
* `path` {String}
349+
* Return: {Object}
340350

341351
The `path.parse()` method returns an object whose properties represent
342352
significant elements of the `path`.
@@ -404,6 +414,8 @@ A [`TypeError`][] is thrown if `path` is not a string.
404414
added: v0.11.15
405415
-->
406416

417+
* {Object}
418+
407419
The `path.posix` property provides access to POSIX specific implementations
408420
of the `path` methods.
409421

@@ -414,6 +426,7 @@ added: v0.5.0
414426

415427
* `from` {String}
416428
* `to` {String}
429+
* Return: {String}
417430

418431
The `path.relative()` method returns the relative path from `from` to `to`.
419432
If `from` and `to` each resolve to the same path (after calling `path.resolve()`
@@ -444,6 +457,7 @@ added: v0.3.4
444457
-->
445458

446459
* `...paths` {String} A sequence of paths or path segments
460+
* Return: {String}
447461

448462
The `path.resolve()` method resolves a sequence of paths or path segments into
449463
an absolute path.
@@ -485,6 +499,8 @@ A [`TypeError`][] is thrown if any of the arguments is not a string.
485499
added: v0.7.9
486500
-->
487501

502+
* {String}
503+
488504
Provides the platform-specific path segment separator:
489505

490506
* `\` on Windows
@@ -509,6 +525,8 @@ On Windows:
509525
added: v0.11.15
510526
-->
511527

528+
* {Object}
529+
512530
The `path.win32` property provides access to Windows-specific implementations
513531
of the `path` methods.
514532

0 commit comments

Comments
 (0)