@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,83 @@
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 `trace_events` module provides a mechanism to centralize tracing information
6
+ * generated by V8, Node.js core, and userspace code.
7
+ *
8
+ * Tracing can be enabled with the `--trace-event-categories` command-line flag
9
+ * or by using the `trace_events` module. The `--trace-event-categories` flag
10
+ * accepts a list of comma-separated category names.
11
+ *
12
+ * The available categories are:
13
+ *
14
+ * * `node`: An empty placeholder.
15
+ * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data.
16
+ * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
17
+ * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
18
+ * * `node.console`: Enables capture of `console.time()` and `console.count()`output.
19
+ * * `node.dns.native`: Enables capture of trace data for DNS queries.
20
+ * * `node.environment`: Enables capture of Node.js Environment milestones.
21
+ * * `node.fs.sync`: Enables capture of trace data for file system sync methods.
22
+ * * `node.perf`: Enables capture of `Performance API` measurements.
23
+ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing
24
+ * measures and marks.
25
+ * * `node.perf.timerify`: Enables capture of only Performance API timerify
26
+ * measurements.
27
+ * * `node.promises.rejections`: Enables capture of trace data tracking the number
28
+ * of unhandled Promise rejections and handled-after-rejections.
29
+ * * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
30
+ * * `v8`: The `V8` events are GC, compiling, and execution related.
31
+ *
32
+ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
33
+ *
34
+ * ```bash
35
+ * node --trace-event-categories v8,node,node.async_hooks server.js
36
+ * ```
37
+ *
38
+ * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be
39
+ * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default.
40
+ *
41
+ * ```bash
42
+ * node --trace-events-enabled
43
+ *
44
+ * # is equivalent to
45
+ *
46
+ * node --trace-event-categories v8,node,node.async_hooks
47
+ * ```
48
+ *
49
+ * Alternatively, trace events may be enabled using the `trace_events` module:
50
+ *
51
+ * ```js
52
+ * const trace_events = require('trace_events');
53
+ * const tracing = trace_events.createTracing({ categories: ['node.perf'] });
54
+ * tracing.enable(); // Enable trace event capture for the 'node.perf' category
55
+ *
56
+ * // do work
57
+ *
58
+ * tracing.disable(); // Disable trace event capture for the 'node.perf' category
59
+ * ```
60
+ *
61
+ * Running Node.js with tracing enabled will produce log files that can be opened
62
+ * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
63
+ *
64
+ * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
65
+ * be specified with `--trace-event-file-pattern` that accepts a template
66
+ * string that supports `${rotation}` and `${pid}`:
67
+ *
68
+ * ```bash
69
+ * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
70
+ * ```
71
+ *
72
+ * The tracing system uses the same time source
73
+ * as the one used by `process.hrtime()`.
74
+ * However the trace-event timestamps are expressed in microseconds,
75
+ * unlike `process.hrtime()` which returns nanoseconds.
76
+ *
77
+ * The features from this module are not available in `Worker` threads.
78
+ * @experimental
79
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/trace_events.js)
80
+ */
4
81
  declare module 'trace_events' {
5
82
  /**
6
83
  * The `Tracing` object is used to enable or disable tracing for sets of
@@ -18,7 +95,6 @@ declare module 'trace_events' {
18
95
  * `Tracing` object.
19
96
  */
20
97
  readonly categories: string;
21
-
22
98
  /**
23
99
  * Disables this `Tracing` object.
24
100
  *
@@ -27,19 +103,16 @@ declare module 'trace_events' {
27
103
  * will be disabled.
28
104
  */
29
105
  disable(): void;
30
-
31
106
  /**
32
107
  * Enables this `Tracing` object for the set of categories covered by
33
108
  * the `Tracing` object.
34
109
  */
35
110
  enable(): void;
36
-
37
111
  /**
38
112
  * `true` only if the `Tracing` object has been enabled.
39
113
  */
40
114
  readonly enabled: boolean;
41
115
  }
42
-
43
116
  interface CreateTracingOptions {
44
117
  /**
45
118
  * An array of trace category names. Values included in the array are
@@ -48,17 +121,41 @@ declare module 'trace_events' {
48
121
  */
49
122
  categories: string[];
50
123
  }
51
-
52
124
  /**
53
- * Creates and returns a Tracing object for the given set of categories.
125
+ * Creates and returns a `Tracing` object for the given set of `categories`.
126
+ *
127
+ * ```js
128
+ * const trace_events = require('trace_events');
129
+ * const categories = ['node.perf', 'node.async_hooks'];
130
+ * const tracing = trace_events.createTracing({ categories });
131
+ * tracing.enable();
132
+ * // do stuff
133
+ * tracing.disable();
134
+ * ```
135
+ * @since v10.0.0
136
+ * @return .
54
137
  */
55
138
  function createTracing(options: CreateTracingOptions): Tracing;
56
-
57
139
  /**
58
140
  * Returns a comma-separated list of all currently-enabled trace event
59
- * categories. The current set of enabled trace event categories is
60
- * determined by the union of all currently-enabled `Tracing` objects and
61
- * any categories enabled using the `--trace-event-categories` flag.
141
+ * categories. The current set of enabled trace event categories is determined
142
+ * by the _union_ of all currently-enabled `Tracing` objects and any categories
143
+ * enabled using the `--trace-event-categories` flag.
144
+ *
145
+ * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console.
146
+ *
147
+ * ```js
148
+ * const trace_events = require('trace_events');
149
+ * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
150
+ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });
151
+ * const t3 = trace_events.createTracing({ categories: ['v8'] });
152
+ *
153
+ * t1.enable();
154
+ * t2.enable();
155
+ *
156
+ * console.log(trace_events.getEnabledCategories());
157
+ * ```
158
+ * @since v10.0.0
62
159
  */
63
160
  function getEnabledCategories(): string | undefined;
64
161
  }
@@ -1,14 +1,71 @@
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 `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.
6
+ * In most cases, it will not be necessary or possible to use this module directly.
7
+ * However, it can be accessed using:
8
+ *
9
+ * ```js
10
+ * const tty = require('tty');
11
+ * ```
12
+ *
13
+ * When Node.js detects that it is being run with a text terminal ("TTY")
14
+ * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
15
+ * default, be instances of `tty.WriteStream`. The preferred method of determining
16
+ * whether Node.js is being run within a TTY context is to check that the value of
17
+ * the `process.stdout.isTTY` property is `true`:
18
+ *
19
+ * ```console
20
+ * $ node -p -e "Boolean(process.stdout.isTTY)"
21
+ * true
22
+ * $ node -p -e "Boolean(process.stdout.isTTY)" | cat
23
+ * false
24
+ * ```
25
+ *
26
+ * In most cases, there should be little to no reason for an application to
27
+ * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
28
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tty.js)
29
+ */
4
30
  declare module 'tty' {
5
- import * as net from 'net';
6
-
31
+ import * as net from 'node:net';
32
+ /**
33
+ * The `tty.isatty()` method returns `true` if the given `fd` is associated with
34
+ * a TTY and `false` if it is not, including whenever `fd` is not a non-negative
35
+ * integer.
36
+ * @since v0.5.8
37
+ * @param fd A numeric file descriptor
38
+ */
7
39
  function isatty(fd: number): boolean;
40
+ /**
41
+ * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js
42
+ * process and there should be no reason to create additional instances.
43
+ * @since v0.5.8
44
+ */
8
45
  class ReadStream extends net.Socket {
9
46
  constructor(fd: number, options?: net.SocketConstructorOpts);
47
+ /**
48
+ * A `boolean` that is `true` if the TTY is currently configured to operate as a
49
+ * raw device. Defaults to `false`.
50
+ * @since v0.7.7
51
+ */
10
52
  isRaw: boolean;
53
+ /**
54
+ * Allows configuration of `tty.ReadStream` so that it operates as a raw device.
55
+ *
56
+ * When in raw mode, input is always available character-by-character, not
57
+ * including modifiers. Additionally, all special processing of characters by the
58
+ * terminal is disabled, including echoing input characters.Ctrl+C will no longer cause a `SIGINT` when in this mode.
59
+ * @since v0.7.7
60
+ * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw`
61
+ * property will be set to the resulting mode.
62
+ * @return The read stream instance.
63
+ */
11
64
  setRawMode(mode: boolean): this;
65
+ /**
66
+ * A `boolean` that is always `true` for `tty.ReadStream` instances.
67
+ * @since v0.5.8
68
+ */
12
69
  isTTY: boolean;
13
70
  }
14
71
  /**
@@ -17,53 +74,131 @@ declare module 'tty' {
17
74
  * 1 - to the right from cursor
18
75
  */
19
76
  type Direction = -1 | 0 | 1;
77
+ /**
78
+ * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
79
+ * should be no reason to create additional instances.
80
+ * @since v0.5.8
81
+ */
20
82
  class WriteStream extends net.Socket {
21
83
  constructor(fd: number);
22
84
  addListener(event: string, listener: (...args: any[]) => void): this;
23
- addListener(event: "resize", listener: () => void): this;
24
-
85
+ addListener(event: 'resize', listener: () => void): this;
25
86
  emit(event: string | symbol, ...args: any[]): boolean;
26
- emit(event: "resize"): boolean;
27
-
87
+ emit(event: 'resize'): boolean;
28
88
  on(event: string, listener: (...args: any[]) => void): this;
29
- on(event: "resize", listener: () => void): this;
30
-
89
+ on(event: 'resize', listener: () => void): this;
31
90
  once(event: string, listener: (...args: any[]) => void): this;
32
- once(event: "resize", listener: () => void): this;
33
-
91
+ once(event: 'resize', listener: () => void): this;
34
92
  prependListener(event: string, listener: (...args: any[]) => void): this;
35
- prependListener(event: "resize", listener: () => void): this;
36
-
93
+ prependListener(event: 'resize', listener: () => void): this;
37
94
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
38
- prependOnceListener(event: "resize", listener: () => void): this;
39
-
95
+ prependOnceListener(event: 'resize', listener: () => void): this;
40
96
  /**
41
- * Clears the current line of this WriteStream in a direction identified by `dir`.
97
+ * `writeStream.clearLine()` clears the current line of this `WriteStream` in a
98
+ * direction identified by `dir`.
99
+ * @since v0.7.7
100
+ * @param callback Invoked once the operation completes.
101
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
42
102
  */
43
103
  clearLine(dir: Direction, callback?: () => void): boolean;
44
104
  /**
45
- * Clears this `WriteStream` from the current cursor down.
105
+ * `writeStream.clearScreenDown()` clears this `WriteStream` from the current
106
+ * cursor down.
107
+ * @since v0.7.7
108
+ * @param callback Invoked once the operation completes.
109
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
46
110
  */
47
111
  clearScreenDown(callback?: () => void): boolean;
48
112
  /**
49
- * Moves this WriteStream's cursor to the specified position.
113
+ * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified
114
+ * position.
115
+ * @since v0.7.7
116
+ * @param callback Invoked once the operation completes.
117
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
50
118
  */
51
119
  cursorTo(x: number, y?: number, callback?: () => void): boolean;
52
120
  cursorTo(x: number, callback: () => void): boolean;
53
121
  /**
54
- * Moves this WriteStream's cursor relative to its current position.
122
+ * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its
123
+ * current position.
124
+ * @since v0.7.7
125
+ * @param callback Invoked once the operation completes.
126
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
55
127
  */
56
128
  moveCursor(dx: number, dy: number, callback?: () => void): boolean;
57
129
  /**
58
- * @default `process.env`
130
+ * Returns:
131
+ *
132
+ * * `1` for 2,
133
+ * * `4` for 16,
134
+ * * `8` for 256,
135
+ * * `24` for 16,777,216 colors supported.
136
+ *
137
+ * Use this to determine what colors the terminal supports. Due to the nature of
138
+ * colors in terminals it is possible to either have false positives or false
139
+ * negatives. It depends on process information and the environment variables that
140
+ * may lie about what terminal is used.
141
+ * It is possible to pass in an `env` object to simulate the usage of a specific
142
+ * terminal. This can be useful to check how specific environment settings behave.
143
+ *
144
+ * To enforce a specific color support, use one of the below environment settings.
145
+ *
146
+ * * 2 colors: `FORCE_COLOR = 0` (Disables colors)
147
+ * * 16 colors: `FORCE_COLOR = 1`
148
+ * * 256 colors: `FORCE_COLOR = 2`
149
+ * * 16,777,216 colors: `FORCE_COLOR = 3`
150
+ *
151
+ * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
152
+ * @since v9.9.0
153
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
154
+ */
155
+ getColorDepth(env?: object): number;
156
+ /**
157
+ * Returns `true` if the `writeStream` supports at least as many colors as provided
158
+ * in `count`. Minimum support is 2 (black and white).
159
+ *
160
+ * This has the same false positives and negatives as described in `writeStream.getColorDepth()`.
161
+ *
162
+ * ```js
163
+ * process.stdout.hasColors();
164
+ * // Returns true or false depending on if `stdout` supports at least 16 colors.
165
+ * process.stdout.hasColors(256);
166
+ * // Returns true or false depending on if `stdout` supports at least 256 colors.
167
+ * process.stdout.hasColors({ TMUX: '1' });
168
+ * // Returns true.
169
+ * process.stdout.hasColors(2 ** 24, { TMUX: '1' });
170
+ * // Returns false (the environment setting pretends to support 2 ** 8 colors).
171
+ * ```
172
+ * @since v11.13.0, v10.16.0
173
+ * @param [count=16] The number of colors that are requested (minimum 2).
174
+ * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
175
+ */
176
+ hasColors(count?: number): boolean;
177
+ hasColors(env?: object): boolean;
178
+ hasColors(count: number, env?: object): boolean;
179
+ /**
180
+ * `writeStream.getWindowSize()` returns the size of the TTY
181
+ * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
182
+ * of columns and rows in the corresponding TTY.
183
+ * @since v0.7.7
59
184
  */
60
- getColorDepth(env?: {}): number;
61
- hasColors(depth?: number): boolean;
62
- hasColors(env?: {}): boolean;
63
- hasColors(depth: number, env?: {}): boolean;
64
185
  getWindowSize(): [number, number];
186
+ /**
187
+ * A `number` specifying the number of columns the TTY currently has. This property
188
+ * is updated whenever the `'resize'` event is emitted.
189
+ * @since v0.7.7
190
+ */
65
191
  columns: number;
192
+ /**
193
+ * A `number` specifying the number of rows the TTY currently has. This property
194
+ * is updated whenever the `'resize'` event is emitted.
195
+ * @since v0.7.7
196
+ */
66
197
  rows: number;
198
+ /**
199
+ * A `boolean` that is always `true`.
200
+ * @since v0.5.8
201
+ */
67
202
  isTTY: boolean;
68
203
  }
69
204
  }