@node-red/editor-client 3.0.2 → 3.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/locales/de/editor.json +2 -0
  2. package/locales/de/infotips.json +0 -0
  3. package/locales/de/jsonata.json +0 -0
  4. package/locales/en-US/editor.json +37 -6
  5. package/locales/en-US/infotips.json +0 -0
  6. package/locales/en-US/jsonata.json +0 -0
  7. package/locales/fr/editor.json +1238 -0
  8. package/locales/fr/infotips.json +23 -0
  9. package/locales/fr/jsonata.json +274 -0
  10. package/locales/ja/editor.json +48 -9
  11. package/locales/ko/editor.json +233 -31
  12. package/locales/ko/infotips.json +0 -0
  13. package/locales/ko/jsonata.json +0 -0
  14. package/locales/pt-BR/editor.json +1208 -0
  15. package/locales/pt-BR/infotips.json +23 -0
  16. package/locales/pt-BR/jsonata.json +274 -0
  17. package/locales/ru/editor.json +2 -0
  18. package/locales/ru/infotips.json +0 -0
  19. package/locales/ru/jsonata.json +0 -0
  20. package/locales/zh-CN/editor.json +1175 -1049
  21. package/locales/zh-TW/editor.json +3 -0
  22. package/package.json +1 -1
  23. package/public/red/about +140 -0
  24. package/public/red/red.js +2699 -1397
  25. package/public/red/red.min.js +4 -3
  26. package/public/red/style.min.css +1 -1
  27. package/public/red/tours/3.0/images/context-menu.png +0 -0
  28. package/public/red/tours/3.0/welcome.js +155 -0
  29. package/public/red/tours/images/context-menu.png +0 -0
  30. package/public/red/tours/images/global-env-vars.png +0 -0
  31. package/public/red/tours/images/hiding-flows.png +0 -0
  32. package/public/red/tours/images/locking-flows.png +0 -0
  33. package/public/red/tours/images/mermaid.png +0 -0
  34. package/public/red/tours/images/node-help.png +0 -0
  35. package/public/red/tours/images/tab-changes.png +0 -0
  36. package/public/red/tours/welcome.js +111 -94
  37. package/public/types/node/assert/strict.d.ts +11 -0
  38. package/public/types/node/assert.d.ts +898 -64
  39. package/public/types/node/async_hooks.d.ts +362 -94
  40. package/public/types/node/buffer.d.ts +2158 -14
  41. package/public/types/node/child_process.d.ts +1109 -257
  42. package/public/types/node/cluster.d.ts +349 -200
  43. package/public/types/node/console.d.ts +313 -43
  44. package/public/types/node/crypto.d.ts +3329 -656
  45. package/public/types/node/dgram.d.ts +459 -58
  46. package/public/types/node/diagnostics_channel.d.ts +155 -0
  47. package/public/types/node/dns/promises.d.ts +371 -0
  48. package/public/types/node/dns.d.ts +532 -265
  49. package/public/types/node/domain.d.ts +159 -16
  50. package/public/types/node/events.d.ts +589 -30
  51. package/public/types/node/fs/promises.d.ts +1097 -0
  52. package/public/types/node/fs.d.ts +2484 -958
  53. package/public/types/node/globals.d.ts +43 -503
  54. package/public/types/node/http.d.ts +1156 -145
  55. package/public/types/node/http2.d.ts +1610 -470
  56. package/public/types/node/https.d.ts +462 -72
  57. package/public/types/node/module.d.ts +72 -13
  58. package/public/types/node/net.d.ts +663 -131
  59. package/public/types/node/os.d.ts +238 -25
  60. package/public/types/node/path.d.ts +57 -23
  61. package/public/types/node/perf_hooks.d.ts +424 -112
  62. package/public/types/node/process.d.ts +1261 -193
  63. package/public/types/node/querystring.d.ts +107 -7
  64. package/public/types/node/readline.d.ts +443 -74
  65. package/public/types/node/stream/consumers.d.ts +15 -0
  66. package/public/types/node/stream/promises.d.ts +45 -0
  67. package/public/types/node/stream/web.d.ts +395 -0
  68. package/public/types/node/stream.d.ts +1081 -177
  69. package/public/types/node/string_decoder.d.ts +57 -0
  70. package/public/types/node/test.d.ts +193 -0
  71. package/public/types/node/timers/promises.d.ts +96 -0
  72. package/public/types/node/timers.d.ts +87 -12
  73. package/public/types/node/tls.d.ts +457 -222
  74. package/public/types/node/trace_events.d.ts +107 -10
  75. package/public/types/node/tty.d.ts +158 -23
  76. package/public/types/node/url.d.ts +734 -28
  77. package/public/types/node/util.d.ts +1542 -164
  78. package/public/types/node/v8.d.ts +261 -73
  79. package/public/types/node/vm.d.ts +384 -32
  80. package/public/types/node/wasi.d.ts +92 -23
  81. package/public/types/node/worker_threads.d.ts +531 -123
  82. package/public/types/node/zlib.d.ts +216 -63
  83. package/public/types/node-red/func.d.ts +3 -0
  84. package/public/vendor/jquery/css/base/images/ui-icons_444444_256x240.png +0 -0
  85. package/public/vendor/jquery/css/base/images/ui-icons_555555_256x240.png +0 -0
  86. package/public/vendor/jquery/css/base/images/ui-icons_777620_256x240.png +0 -0
  87. package/public/vendor/jquery/css/base/images/ui-icons_777777_256x240.png +0 -0
  88. package/public/vendor/jquery/css/base/images/ui-icons_cc0000_256x240.png +0 -0
  89. package/public/vendor/jquery/css/base/images/ui-icons_ffffff_256x240.png +0 -0
  90. package/public/vendor/jquery/css/base/jquery-ui.min.css +4 -4
  91. package/public/vendor/mermaid/mermaid.min.js +1284 -0
  92. package/public/vendor/monaco/dist/{ade705761eb7e702770d.ttf → 7064e66c3890a12c47b4.ttf} +0 -0
  93. package/public/vendor/monaco/dist/css.worker.js +1 -1
  94. package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
  95. package/public/vendor/monaco/dist/editor.js +1 -1
  96. package/public/vendor/monaco/dist/editor.js.LICENSE.txt +5 -1
  97. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  98. package/public/vendor/monaco/dist/html.worker.js +1 -1
  99. package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
  100. package/public/vendor/monaco/dist/json.worker.js +1 -1
  101. package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
  102. package/public/vendor/monaco/dist/locale/cs.js +319 -71
  103. package/public/vendor/monaco/dist/locale/de.js +323 -75
  104. package/public/vendor/monaco/dist/locale/es.js +318 -70
  105. package/public/vendor/monaco/dist/locale/fr.js +327 -79
  106. package/public/vendor/monaco/dist/locale/it.js +325 -77
  107. package/public/vendor/monaco/dist/locale/ja.js +337 -89
  108. package/public/vendor/monaco/dist/locale/ko.js +324 -76
  109. package/public/vendor/monaco/dist/locale/pl.js +322 -74
  110. package/public/vendor/monaco/dist/locale/pt-br.js +321 -73
  111. package/public/vendor/monaco/dist/locale/qps-ploc.js +1580 -1332
  112. package/public/vendor/monaco/dist/locale/ru.js +324 -76
  113. package/public/vendor/monaco/dist/locale/tr.js +326 -78
  114. package/public/vendor/monaco/dist/locale/zh-hans.js +328 -80
  115. package/public/vendor/monaco/dist/locale/zh-hant.js +321 -73
  116. package/public/vendor/monaco/dist/theme/forge.json +236 -0
  117. package/public/vendor/monaco/dist/theme/github-dark.json +348 -0
  118. package/public/vendor/monaco/dist/theme/github-light.json +348 -0
  119. package/public/vendor/monaco/dist/theme/nord.json +93 -0
  120. package/public/vendor/monaco/dist/ts.worker.js +1 -1
  121. package/public/vendor/monaco/dist/ts.worker.js.LICENSE.txt +14 -6
  122. package/public/vendor/vendor.js +9 -15
  123. /package/public/red/tours/{images → 3.0/images}/continuous-search.png +0 -0
  124. /package/public/red/tours/{images → 3.0/images}/debug-path-tooltip.png +0 -0
  125. /package/public/red/tours/{images → 3.0/images}/junction-quick-add.png +0 -0
  126. /package/public/red/tours/{images → 3.0/images}/junction-slice.gif +0 -0
  127. /package/public/red/tours/{images → 3.0/images}/split-wire-with-links.gif +0 -0
@@ -1,6 +1,15 @@
1
1
 
2
2
  /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
3
3
 
4
+ /**
5
+ * The `os` module provides operating system-related utility methods and
6
+ * properties. It can be accessed using:
7
+ *
8
+ * ```js
9
+ * const os = require('os');
10
+ * ```
11
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js)
12
+ */
4
13
  declare module 'os' {
5
14
  interface CpuInfo {
6
15
  model: string;
@@ -13,7 +22,6 @@ declare module 'os' {
13
22
  irq: number;
14
23
  };
15
24
  }
16
-
17
25
  interface NetworkInterfaceBase {
18
26
  address: string;
19
27
  netmask: string;
@@ -21,16 +29,13 @@ declare module 'os' {
21
29
  internal: boolean;
22
30
  cidr: string | null;
23
31
  }
24
-
25
32
  interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
26
- family: "IPv4";
33
+ family: 'IPv4';
27
34
  }
28
-
29
35
  interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
30
- family: "IPv6";
36
+ family: 'IPv6';
31
37
  scopeid: number;
32
38
  }
33
-
34
39
  interface UserInfo<T> {
35
40
  username: T;
36
41
  uid: number;
@@ -38,26 +43,197 @@ declare module 'os' {
38
43
  shell: T;
39
44
  homedir: T;
40
45
  }
41
-
42
46
  type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
43
-
47
+ /**
48
+ * Returns the host name of the operating system as a string.
49
+ * @since v0.3.3
50
+ */
44
51
  function hostname(): string;
52
+ /**
53
+ * Returns an array containing the 1, 5, and 15 minute load averages.
54
+ *
55
+ * The load average is a measure of system activity calculated by the operating
56
+ * system and expressed as a fractional number.
57
+ *
58
+ * The load average is a Unix-specific concept. On Windows, the return value is
59
+ * always `[0, 0, 0]`.
60
+ * @since v0.3.3
61
+ */
45
62
  function loadavg(): number[];
63
+ /**
64
+ * Returns the system uptime in number of seconds.
65
+ * @since v0.3.3
66
+ */
46
67
  function uptime(): number;
68
+ /**
69
+ * Returns the amount of free system memory in bytes as an integer.
70
+ * @since v0.3.3
71
+ */
47
72
  function freemem(): number;
73
+ /**
74
+ * Returns the total amount of system memory in bytes as an integer.
75
+ * @since v0.3.3
76
+ */
48
77
  function totalmem(): number;
78
+ /**
79
+ * Returns an array of objects containing information about each logical CPU core.
80
+ *
81
+ * The properties included on each object include:
82
+ *
83
+ * ```js
84
+ * [
85
+ * {
86
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
87
+ * speed: 2926,
88
+ * times: {
89
+ * user: 252020,
90
+ * nice: 0,
91
+ * sys: 30340,
92
+ * idle: 1070356870,
93
+ * irq: 0
94
+ * }
95
+ * },
96
+ * {
97
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
98
+ * speed: 2926,
99
+ * times: {
100
+ * user: 306960,
101
+ * nice: 0,
102
+ * sys: 26980,
103
+ * idle: 1071569080,
104
+ * irq: 0
105
+ * }
106
+ * },
107
+ * {
108
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
109
+ * speed: 2926,
110
+ * times: {
111
+ * user: 248450,
112
+ * nice: 0,
113
+ * sys: 21750,
114
+ * idle: 1070919370,
115
+ * irq: 0
116
+ * }
117
+ * },
118
+ * {
119
+ * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
120
+ * speed: 2926,
121
+ * times: {
122
+ * user: 256880,
123
+ * nice: 0,
124
+ * sys: 19430,
125
+ * idle: 1070905480,
126
+ * irq: 20
127
+ * }
128
+ * },
129
+ * ]
130
+ * ```
131
+ *
132
+ * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
133
+ * are always 0.
134
+ * @since v0.3.3
135
+ */
49
136
  function cpus(): CpuInfo[];
137
+ /**
138
+ * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
139
+ * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
140
+ *
141
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
142
+ * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
143
+ * @since v0.3.3
144
+ */
50
145
  function type(): string;
146
+ /**
147
+ * Returns the operating system as a string.
148
+ *
149
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
150
+ * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
151
+ * @since v0.3.3
152
+ */
51
153
  function release(): string;
154
+ /**
155
+ * Returns an object containing network interfaces that have been assigned a
156
+ * network address.
157
+ *
158
+ * Each key on the returned object identifies a network interface. The associated
159
+ * value is an array of objects that each describe an assigned network address.
160
+ *
161
+ * The properties available on the assigned network address object include:
162
+ *
163
+ * ```js
164
+ * {
165
+ * lo: [
166
+ * {
167
+ * address: '127.0.0.1',
168
+ * netmask: '255.0.0.0',
169
+ * family: 'IPv4',
170
+ * mac: '00:00:00:00:00:00',
171
+ * internal: true,
172
+ * cidr: '127.0.0.1/8'
173
+ * },
174
+ * {
175
+ * address: '::1',
176
+ * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
177
+ * family: 'IPv6',
178
+ * mac: '00:00:00:00:00:00',
179
+ * scopeid: 0,
180
+ * internal: true,
181
+ * cidr: '::1/128'
182
+ * }
183
+ * ],
184
+ * eth0: [
185
+ * {
186
+ * address: '192.168.1.108',
187
+ * netmask: '255.255.255.0',
188
+ * family: 'IPv4',
189
+ * mac: '01:02:03:0a:0b:0c',
190
+ * internal: false,
191
+ * cidr: '192.168.1.108/24'
192
+ * },
193
+ * {
194
+ * address: 'fe80::a00:27ff:fe4e:66a1',
195
+ * netmask: 'ffff:ffff:ffff:ffff::',
196
+ * family: 'IPv6',
197
+ * mac: '01:02:03:0a:0b:0c',
198
+ * scopeid: 1,
199
+ * internal: false,
200
+ * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
201
+ * }
202
+ * ]
203
+ * }
204
+ * ```
205
+ * @since v0.6.0
206
+ */
52
207
  function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
208
+ /**
209
+ * Returns the string path of the current user's home directory.
210
+ *
211
+ * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
212
+ * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
213
+ *
214
+ * On Windows, it uses the `USERPROFILE` environment variable if defined.
215
+ * Otherwise it uses the path to the profile directory of the current user.
216
+ * @since v2.3.0
217
+ */
53
218
  function homedir(): string;
219
+ /**
220
+ * Returns information about the currently effective user. On POSIX platforms,
221
+ * this is typically a subset of the password file. The returned object includes
222
+ * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`.
223
+ *
224
+ * The value of `homedir` returned by `os.userInfo()` is provided by the operating
225
+ * system. This differs from the result of `os.homedir()`, which queries
226
+ * environment variables for the home directory before falling back to the
227
+ * operating system response.
228
+ *
229
+ * Throws a `SystemError` if a user has no `username` or `homedir`.
230
+ * @since v6.0.0
231
+ */
54
232
  function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
55
233
  function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
56
-
57
234
  type SignalConstants = {
58
235
  [key in NodeJS.Signals]: number;
59
236
  };
60
-
61
237
  namespace constants {
62
238
  const UV_UDP_REUSEADDR: number;
63
239
  namespace signals {}
@@ -210,34 +386,71 @@ declare module 'os' {
210
386
  const PRIORITY_HIGHEST: number;
211
387
  }
212
388
  }
213
-
389
+ const devNull: string;
390
+ const EOL: string;
391
+ /**
392
+ * Returns the operating system CPU architecture for which the Node.js binary was
393
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
394
+ *
395
+ * The return value is equivalent to `process.arch`.
396
+ * @since v0.5.0
397
+ */
214
398
  function arch(): string;
215
399
  /**
216
400
  * Returns a string identifying the kernel version.
217
- * On POSIX systems, the operating system release is determined by calling
218
- * [uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available,
219
- * `GetVersionExW()` will be used. See
220
- * https://en.wikipedia.org/wiki/Uname#Examples for more information.
401
+ *
402
+ * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
403
+ * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
404
+ * @since v13.11.0, v12.17.0
221
405
  */
222
406
  function version(): string;
407
+ /**
408
+ * Returns a string identifying the operating system platform. The value is set
409
+ * at compile time. Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
410
+ *
411
+ * The return value is equivalent to `process.platform`.
412
+ *
413
+ * The value `'android'` may also be returned if Node.js is built on the Android
414
+ * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
415
+ * @since v0.5.0
416
+ */
223
417
  function platform(): NodeJS.Platform;
418
+ /**
419
+ * Returns the operating system's default directory for temporary files as a
420
+ * string.
421
+ * @since v0.9.9
422
+ */
224
423
  function tmpdir(): string;
225
- const EOL: string;
226
- function endianness(): "BE" | "LE";
227
424
  /**
228
- * Gets the priority of a process.
229
- * Defaults to current process.
425
+ * Returns a string identifying the endianness of the CPU for which the Node.js
426
+ * binary was compiled.
427
+ *
428
+ * Possible values are `'BE'` for big endian and `'LE'` for little endian.
429
+ * @since v0.9.4
230
430
  */
231
- function getPriority(pid?: number): number;
431
+ function endianness(): 'BE' | 'LE';
232
432
  /**
233
- * Sets the priority of the current process.
234
- * @param priority Must be in range of -20 to 19
433
+ * Returns the scheduling priority for the process specified by `pid`. If `pid` is
434
+ * not provided or is `0`, the priority of the current process is returned.
435
+ * @since v10.10.0
436
+ * @param [pid=0] The process ID to retrieve scheduling priority for.
235
437
  */
236
- function setPriority(priority: number): void;
438
+ function getPriority(pid?: number): number;
237
439
  /**
238
- * Sets the priority of the process specified process.
239
- * @param priority Must be in range of -20 to 19
440
+ * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used.
441
+ *
442
+ * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows
443
+ * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range
444
+ * mapping may cause the return value to be slightly different on Windows. To avoid
445
+ * confusion, set `priority` to one of the priority constants.
446
+ *
447
+ * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
448
+ * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`.
449
+ * @since v10.10.0
450
+ * @param [pid=0] The process ID to set scheduling priority for.
451
+ * @param priority The scheduling priority to assign to the process.
240
452
  */
453
+ function setPriority(priority: number): void;
241
454
  function setPriority(pid: number, priority: number): void;
242
455
  }
243
456
  declare module 'node:os' {
@@ -1,6 +1,23 @@
1
1
 
2
2
  /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
3
3
 
4
+ declare module 'path/posix' {
5
+ import path = require('path');
6
+ export = path;
7
+ }
8
+ declare module 'path/win32' {
9
+ import path = require('path');
10
+ export = path;
11
+ }
12
+ /**
13
+ * The `path` module provides utilities for working with file and directory paths.
14
+ * It can be accessed using:
15
+ *
16
+ * ```js
17
+ * const path = require('path');
18
+ * ```
19
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js)
20
+ */
4
21
  declare module 'path' {
5
22
  namespace path {
6
23
  /**
@@ -28,7 +45,6 @@ declare module 'path' {
28
45
  */
29
46
  name: string;
30
47
  }
31
-
32
48
  interface FormatInputPathObject {
33
49
  /**
34
50
  * The root of the path such as '/' or 'c:\'
@@ -51,24 +67,24 @@ declare module 'path' {
51
67
  */
52
68
  name?: string | undefined;
53
69
  }
54
-
55
70
  interface PlatformPath {
56
71
  /**
57
72
  * Normalize a string path, reducing '..' and '.' parts.
58
73
  * 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.
59
74
  *
60
- * @param p string path to normalize.
75
+ * @param path string path to normalize.
76
+ * @throws {TypeError} if `path` is not a string.
61
77
  */
62
- normalize(p: string): string;
78
+ normalize(path: string): string;
63
79
  /**
64
80
  * Join all arguments together and normalize the resulting path.
65
- * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
66
81
  *
67
82
  * @param paths paths to join.
83
+ * @throws {TypeError} if any of the path segments is not a string.
68
84
  */
69
85
  join(...paths: string[]): string;
70
86
  /**
71
- * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
87
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
72
88
  *
73
89
  * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
74
90
  *
@@ -77,61 +93,71 @@ declare module 'path' {
77
93
  * the current working directory is used as well. The resulting path is normalized,
78
94
  * and trailing slashes are removed unless the path gets resolved to the root directory.
79
95
  *
80
- * @param pathSegments string paths to join. Non-string arguments are ignored.
96
+ * @param paths string paths to join.
97
+ * @throws {TypeError} if any of the arguments is not a string.
81
98
  */
82
- resolve(...pathSegments: string[]): string;
99
+ resolve(...paths: string[]): string;
83
100
  /**
84
101
  * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
85
102
  *
103
+ * If the given {path} is a zero-length string, `false` will be returned.
104
+ *
86
105
  * @param path path to test.
106
+ * @throws {TypeError} if `path` is not a string.
87
107
  */
88
- isAbsolute(p: string): boolean;
108
+ isAbsolute(path: string): boolean;
89
109
  /**
90
- * Solve the relative path from {from} to {to}.
110
+ * Solve the relative path from {from} to {to} based on the current working directory.
91
111
  * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
112
+ *
113
+ * @throws {TypeError} if either `from` or `to` is not a string.
92
114
  */
93
115
  relative(from: string, to: string): string;
94
116
  /**
95
117
  * Return the directory name of a path. Similar to the Unix dirname command.
96
118
  *
97
- * @param p the path to evaluate.
119
+ * @param path the path to evaluate.
120
+ * @throws {TypeError} if `path` is not a string.
98
121
  */
99
- dirname(p: string): string;
122
+ dirname(path: string): string;
100
123
  /**
101
124
  * Return the last portion of a path. Similar to the Unix basename command.
102
125
  * Often used to extract the file name from a fully qualified path.
103
126
  *
104
- * @param p the path to evaluate.
127
+ * @param path the path to evaluate.
105
128
  * @param ext optionally, an extension to remove from the result.
129
+ * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
106
130
  */
107
- basename(p: string, ext?: string): string;
131
+ basename(path: string, ext?: string): string;
108
132
  /**
109
133
  * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
110
- * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
134
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
111
135
  *
112
- * @param p the path to evaluate.
136
+ * @param path the path to evaluate.
137
+ * @throws {TypeError} if `path` is not a string.
113
138
  */
114
- extname(p: string): string;
139
+ extname(path: string): string;
115
140
  /**
116
141
  * The platform-specific file separator. '\\' or '/'.
117
142
  */
118
- readonly sep: string;
143
+ readonly sep: '\\' | '/';
119
144
  /**
120
145
  * The platform-specific file delimiter. ';' or ':'.
121
146
  */
122
- readonly delimiter: string;
147
+ readonly delimiter: ';' | ':';
123
148
  /**
124
149
  * Returns an object from a path string - the opposite of format().
125
150
  *
126
- * @param pathString path to evaluate.
151
+ * @param path path to evaluate.
152
+ * @throws {TypeError} if `path` is not a string.
127
153
  */
128
- parse(p: string): ParsedPath;
154
+ parse(path: string): ParsedPath;
129
155
  /**
130
156
  * Returns a path string from an object - the opposite of parse().
131
157
  *
132
- * @param pathString path to evaluate.
158
+ * @param pathObject path to evaluate.
133
159
  */
134
- format(pP: FormatInputPathObject): string;
160
+ format(pathObject: FormatInputPathObject): string;
135
161
  /**
136
162
  * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
137
163
  * If path is not a string, path will be returned without modifications.
@@ -158,3 +184,11 @@ declare module 'node:path' {
158
184
  import path = require('path');
159
185
  export = path;
160
186
  }
187
+ declare module 'node:path/posix' {
188
+ import path = require('path/posix');
189
+ export = path;
190
+ }
191
+ declare module 'node:path/win32' {
192
+ import path = require('path/win32');
193
+ export = path;
194
+ }