Socket
Socket
Sign inDemoInstall

@types/node

Package Overview
Dependencies
1
Maintainers
1
Versions
1818
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 18.19.30 to 18.19.31

112

node v18.19/console.d.ts
/**
* The `console` module provides a simple debugging console that is similar to the
* JavaScript console mechanism provided by web browsers.
* The `node:console` module provides a simple debugging console that is similar to
* the JavaScript console mechanism provided by web browsers.
*
* The module exports two specific components:
*
* * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
* * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v18.x/api/process.html#processstdout) and
* [`process.stderr`](https://nodejs.org/docs/latest-v18.x/api/process.html#processstderr). The global `console` can be used without calling `require('node:console')`.
*
* _**Warning**_: The global console object's methods are neither consistently
* synchronous like the browser APIs they resemble, nor are they consistently
* asynchronous like all other Node.js streams. See the `note on process I/O` for
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v18.x/api/process.html#a-note-on-process-io) for
* more information.

@@ -56,3 +57,3 @@ *

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v18.20.1/lib/console.js)
*/

@@ -72,3 +73,4 @@ declare module "console" {

* writes a message and does not otherwise affect execution. The output always
* starts with `"Assertion failed"`. If provided, `message` is formatted using `util.format()`.
* starts with `"Assertion failed"`. If provided, `message` is formatted using
* [`util.format()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilformatformat-args).
*

@@ -96,3 +98,3 @@ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.

* The specific operation of `console.clear()` can vary across operating systems
* and terminal types. For most Linux operating systems, `console.clear()`operates similarly to the `clear` shell command. On Windows, `console.clear()`will clear only the output in the
* and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the
* current terminal viewport for the Node.js

@@ -129,3 +131,3 @@ * binary.

* @since v8.3.0
* @param label The display label for the counter.
* @param [label='default'] The display label for the counter.
*/

@@ -148,3 +150,3 @@ count(label?: string): void;

* @since v8.3.0
* @param label The display label for the counter.
* @param [label='default'] The display label for the counter.
*/

@@ -158,3 +160,3 @@ countReset(label?: string): void;

/**
* Uses `util.inspect()` on `obj` and prints the resulting string to `stdout`.
* Uses [`util.inspect()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
* This function bypasses any custom `inspect()` function defined on `obj`.

@@ -173,3 +175,4 @@ * @since v0.1.101

* first used as the primary message and all additional used as substitution
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilformatformat-args)).
*

@@ -184,4 +187,6 @@ * ```js

*
* If formatting elements (e.g. `%d`) are not found in the first string then `util.inspect()` is called on each argument and the resulting string
* values are concatenated. See `util.format()` for more information.
* If formatting elements (e.g. `%d`) are not found in the first string then
* [`util.inspect()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilinspectobject-options) is called on each argument and the
* resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilformatformat-args)
* for more information.
* @since v0.1.100

@@ -191,3 +196,3 @@ */

/**
* Increases indentation of subsequent lines by spaces for `groupIndentation`length.
* Increases indentation of subsequent lines by spaces for `groupIndentation` length.
*

@@ -205,3 +210,3 @@ * If one or more `label`s are provided, those are printed first without the

/**
* Decreases indentation of subsequent lines by spaces for `groupIndentation`length.
* Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
* @since v8.5.0

@@ -218,3 +223,4 @@ */

* first used as the primary message and all additional used as substitution
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to `util.format()`).
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilformatformat-args)).
*

@@ -229,3 +235,3 @@ * ```js

*
* See `util.format()` for more information.
* See [`util.format()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilformatformat-args) for more information.
* @since v0.1.100

@@ -235,4 +241,4 @@ */

/**
* Try to construct a table with the columns of the properties of `tabularData`(or use `properties`) and rows of `tabularData` and log it. Falls back to just
* logging the argument if it can’t be parsed as tabular.
* Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just
* logging the argument if it can't be parsed as tabular.
*

@@ -273,2 +279,3 @@ * ```js

* @since v0.1.104
* @param [label='default']
*/

@@ -281,8 +288,9 @@ time(label?: string): void;

* ```js
* console.time('100-elements');
* for (let i = 0; i < 100; i++) {}
* console.timeEnd('100-elements');
* // prints 100-elements: 225.438ms
* console.time('bunch-of-stuff');
* // Do a bunch of stuff.
* console.timeEnd('bunch-of-stuff');
* // Prints: bunch-of-stuff: 225.438ms
* ```
* @since v0.1.104
* @param [label='default']
*/

@@ -303,6 +311,8 @@ timeEnd(label?: string): void;

* @since v10.7.0
* @param [label='default']
*/
timeLog(label?: string, ...data: any[]): void;
/**
* Prints to `stderr` the string `'Trace: '`, followed by the `util.format()` formatted message and stack trace to the current position in the code.
* Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilformatformat-args)
* formatted message and stack trace to the current position in the code.
*

@@ -334,14 +344,28 @@ * ```js

/**
* This method does not display anything unless used in the inspector.
* Starts a JavaScript CPU profile with an optional label.
* This method does not display anything unless used in the inspector. The `console.profile()`
* method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
* is called. The profile is then added to the Profile panel of the inspector.
*
* ```js
* console.profile('MyLabel');
* // Some code
* console.profileEnd('MyLabel');
* // Adds the profile 'MyLabel' to the Profiles panel of the inspector.
* ```
* @since v8.0.0
*/
profile(label?: string): void;
/**
* This method does not display anything unless used in the inspector.
* Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
* This method does not display anything unless used in the inspector. Stops the current
* JavaScript CPU profiling session if one has been started and prints the report to the
* Profiles panel of the inspector. See {@link profile} for an example.
*
* If this method is called without a label, the most recently started profile is stopped.
* @since v8.0.0
*/
profileEnd(label?: string): void;
/**
* This method does not display anything unless used in the inspector.
* Adds an event with the label `label` to the Timeline panel of the inspector.
* This method does not display anything unless used in the inspector. The `console.timeStamp()`
* method adds an event with the label `'label'` to the Timeline panel of the inspector.
* @since v8.0.0
*/

@@ -356,8 +380,9 @@ timeStamp(label?: string): void;

*
* * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
* * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v18.x/api/process.html#processstdout) and
* [`process.stderr`](https://nodejs.org/docs/latest-v18.x/api/process.html#processstderr). The global `console` can be used without calling `require('console')`.
*
* _**Warning**_: The global console object's methods are neither consistently
* synchronous like the browser APIs they resemble, nor are they consistently
* asynchronous like all other Node.js streams. See the `note on process I/O` for
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v18.x/api/process.html#a-note-on-process-io) for
* more information.

@@ -406,3 +431,3 @@ *

* ```
* @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v18.19.1/lib/console.js)
*/

@@ -413,7 +438,22 @@ namespace console {

stderr?: NodeJS.WritableStream | undefined;
/**
* Ignore errors when writing to the underlying streams.
* @default true
*/
ignoreErrors?: boolean | undefined;
/**
* Set color support for this `Console` instance. Setting to true enables coloring while inspecting
* values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
* support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
* respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
* @default auto
*/
colorMode?: boolean | "auto" | undefined;
/**
* Specifies options that are passed along to
* [`util.inspect()`](https://nodejs.org/docs/latest-v18.x/api/util.html#utilinspectobject-options).
*/
inspectOptions?: InspectOptions | undefined;
/**
* Set group indentation
* Set group indentation.
* @default 2

@@ -420,0 +460,0 @@ */

{
"name": "@types/node",
"version": "18.19.30",
"version": "18.19.31",
"description": "TypeScript definitions for node",

@@ -220,4 +220,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

},
"typesPublisherContentHash": "c814508c051e35d752235a5b671ed0e9c23de0639b150e92293ffd4f11deb16a",
"typesPublisherContentHash": "7348694678b514716d29b96928bb8211a9ac6af108f4217c3e3b06aa1d1cfc57",
"typeScriptVersion": "4.7"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 05 Apr 2024 22:07:19 GMT
* Last updated: Tue, 09 Apr 2024 04:08:23 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

@@ -14,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc