@types/node 22.3.0 → 22.4.0

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 (5) hide show
  1. node/README.md +1 -1
  2. node/globals.d.ts +78 -0
  3. node/package.json +3 -3
  4. node/tls.d.ts +3 -0
  5. node/util.d.ts +6 -0
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 14 Aug 2024 07:35:57 GMT
11
+ * Last updated: Fri, 16 Aug 2024 18:09:07 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/globals.d.ts CHANGED
@@ -103,6 +103,84 @@ declare global {
103
103
  };
104
104
  // #endregion borrowed
105
105
 
106
+ // #region Storage
107
+ /**
108
+ * This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items.
109
+ *
110
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage)
111
+ */
112
+ interface Storage {
113
+ /**
114
+ * Returns the number of key/value pairs.
115
+ *
116
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/length)
117
+ */
118
+ readonly length: number;
119
+ /**
120
+ * Removes all key/value pairs, if there are any.
121
+ *
122
+ * Dispatches a storage event on Window objects holding an equivalent Storage object.
123
+ *
124
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/clear)
125
+ */
126
+ clear(): void;
127
+ /**
128
+ * Returns the current value associated with the given key, or null if the given key does not exist.
129
+ *
130
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/getItem)
131
+ */
132
+ getItem(key: string): string | null;
133
+ /**
134
+ * Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.
135
+ *
136
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/key)
137
+ */
138
+ key(index: number): string | null;
139
+ /**
140
+ * Removes the key/value pair with the given key, if a key/value pair with the given key exists.
141
+ *
142
+ * Dispatches a storage event on Window objects holding an equivalent Storage object.
143
+ *
144
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/removeItem)
145
+ */
146
+ removeItem(key: string): void;
147
+ /**
148
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
149
+ *
150
+ * Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
151
+ *
152
+ * Dispatches a storage event on Window objects holding an equivalent Storage object.
153
+ *
154
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Storage/setItem)
155
+ */
156
+ setItem(key: string, value: string): void;
157
+ }
158
+
159
+ var Storage: typeof globalThis extends { onmessage: any; Storage: infer T } ? T
160
+ : {
161
+ prototype: Storage;
162
+ new(): Storage;
163
+ };
164
+
165
+ /**
166
+ * A browser-compatible implementation of [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage).
167
+ * Data is stored unencrypted in the file specified by the `--localstorage-file` CLI flag.
168
+ * Any modification of this data outside of the Web Storage API is not supported.
169
+ * Enable this API with the `--experimental-webstorage` CLI flag.
170
+ * @since v22.4.0
171
+ */
172
+ var localStorage: Storage;
173
+
174
+ /**
175
+ * A browser-compatible implementation of [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage).
176
+ * Data is stored in memory, with a storage quota of 10 MB.
177
+ * Any modification of this data outside of the Web Storage API is not supported.
178
+ * Enable this API with the `--experimental-webstorage` CLI flag.
179
+ * @since v22.4.0
180
+ */
181
+ var sessionStorage: Storage;
182
+ // #endregion Storage
183
+
106
184
  // #region Disposable
107
185
  interface SymbolConstructor {
108
186
  /**
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.3.0",
3
+ "version": "22.4.0",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -210,8 +210,8 @@
210
210
  },
211
211
  "scripts": {},
212
212
  "dependencies": {
213
- "undici-types": "~6.18.2"
213
+ "undici-types": "~6.19.2"
214
214
  },
215
- "typesPublisherContentHash": "620b8a407d4118e9931ab6e01ed7af87ce13d63daa46a4098fca6d43eaf853db",
215
+ "typesPublisherContentHash": "f22f2e87b11a05781ab2a2c4b7812aa834cf70e01e9db42c5288e6cc3f15fd47",
216
216
  "typeScriptVersion": "4.8"
217
217
  }
node/tls.d.ts CHANGED
@@ -843,6 +843,7 @@ declare module "tls" {
843
843
  ciphers?: string | undefined;
844
844
  /**
845
845
  * Name of an OpenSSL engine which can provide the client certificate.
846
+ * @deprecated
846
847
  */
847
848
  clientCertEngine?: string | undefined;
848
849
  /**
@@ -885,12 +886,14 @@ declare module "tls" {
885
886
  /**
886
887
  * Name of an OpenSSL engine to get private key from. Should be used
887
888
  * together with privateKeyIdentifier.
889
+ * @deprecated
888
890
  */
889
891
  privateKeyEngine?: string | undefined;
890
892
  /**
891
893
  * Identifier of a private key managed by an OpenSSL engine. Should be
892
894
  * used together with privateKeyEngine. Should not be set together with
893
895
  * key, because both options define a private key in different ways.
896
+ * @deprecated
894
897
  */
895
898
  privateKeyIdentifier?: string | undefined;
896
899
  /**
node/util.d.ts CHANGED
@@ -1480,6 +1480,12 @@ declare module "util" {
1480
1480
  * Whether this command accepts positional arguments.
1481
1481
  */
1482
1482
  allowPositionals?: boolean | undefined;
1483
+ /**
1484
+ * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`.
1485
+ * @default false
1486
+ * @since v22.4.0
1487
+ */
1488
+ allowNegative?: boolean | undefined;
1483
1489
  /**
1484
1490
  * Return the parsed tokens. This is useful for extending the built-in behavior,
1485
1491
  * from adding additional checks through to reprocessing the tokens in different ways.