@types/node 22.8.2 → 22.8.4

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.
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: Mon, 28 Oct 2024 20:34:09 GMT
11
+ * Last updated: Tue, 29 Oct 2024 17:02:26 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/crypto.d.ts CHANGED
@@ -609,11 +609,6 @@ declare module "crypto" {
609
609
  * @since v11.6.0
610
610
  */
611
611
  asymmetricKeyType?: KeyType | undefined;
612
- /**
613
- * For asymmetric keys, this property represents the size of the embedded key in
614
- * bytes. This property is `undefined` for symmetric keys.
615
- */
616
- asymmetricKeySize?: number | undefined;
617
612
  /**
618
613
  * This property exists only on asymmetric keys. Depending on the type of the key,
619
614
  * this object contains information about the key. None of the information obtained
@@ -2139,7 +2134,10 @@ declare module "crypto" {
2139
2134
  * be passed instead of a public key.
2140
2135
  * @since v0.11.14
2141
2136
  */
2142
- function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
2137
+ function publicEncrypt(
2138
+ key: RsaPublicKey | RsaPrivateKey | KeyLike,
2139
+ buffer: NodeJS.ArrayBufferView | string,
2140
+ ): Buffer;
2143
2141
  /**
2144
2142
  * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
2145
2143
  * the corresponding private key, for example using {@link privateEncrypt}.
@@ -2151,7 +2149,10 @@ declare module "crypto" {
2151
2149
  * be passed instead of a public key.
2152
2150
  * @since v1.1.0
2153
2151
  */
2154
- function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
2152
+ function publicDecrypt(
2153
+ key: RsaPublicKey | RsaPrivateKey | KeyLike,
2154
+ buffer: NodeJS.ArrayBufferView | string,
2155
+ ): Buffer;
2155
2156
  /**
2156
2157
  * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
2157
2158
  * the corresponding public key, for example using {@link publicEncrypt}.
@@ -2160,7 +2161,7 @@ declare module "crypto" {
2160
2161
  * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
2161
2162
  * @since v0.11.14
2162
2163
  */
2163
- function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
2164
+ function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer;
2164
2165
  /**
2165
2166
  * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
2166
2167
  * the corresponding public key, for example using {@link publicDecrypt}.
@@ -2169,7 +2170,7 @@ declare module "crypto" {
2169
2170
  * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
2170
2171
  * @since v1.1.0
2171
2172
  */
2172
- function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
2173
+ function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer;
2173
2174
  /**
2174
2175
  * ```js
2175
2176
  * const {
node/fs/promises.d.ts CHANGED
@@ -238,6 +238,10 @@ declare module "fs/promises" {
238
238
  length?: number | null,
239
239
  position?: number | null,
240
240
  ): Promise<FileReadResult<T>>;
241
+ read<T extends NodeJS.ArrayBufferView = Buffer>(
242
+ buffer: T,
243
+ options?: FileReadOptions<T>,
244
+ ): Promise<FileReadResult<T>>;
241
245
  read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
242
246
  /**
243
247
  * Returns a `ReadableStream` that may be used to read the files data.
@@ -429,6 +433,13 @@ declare module "fs/promises" {
429
433
  bytesWritten: number;
430
434
  buffer: TBuffer;
431
435
  }>;
436
+ write<TBuffer extends Uint8Array>(
437
+ buffer: TBuffer,
438
+ options?: { offset?: number; length?: number; position?: number },
439
+ ): Promise<{
440
+ bytesWritten: number;
441
+ buffer: TBuffer;
442
+ }>;
432
443
  write(
433
444
  data: string,
434
445
  position?: number | null,
node/http.d.ts CHANGED
@@ -141,6 +141,7 @@ declare module "http" {
141
141
  "content-range"?: string | undefined;
142
142
  "content-security-policy"?: string | undefined;
143
143
  "content-security-policy-report-only"?: string | undefined;
144
+ "content-type"?: string | undefined;
144
145
  cookie?: string | string[] | undefined;
145
146
  dav?: string | string[] | undefined;
146
147
  dnt?: string | undefined;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.8.2",
3
+ "version": "22.8.4",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~6.19.8"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "cd80254255e433e4854a55c5aae4bfaa5e327e06832bf06cc80cb4140a43b754",
223
+ "typesPublisherContentHash": "b5e95f7873a1811a61b3409c809ee30655d0268d76d767dbe9efc27cb421459f",
224
224
  "typeScriptVersion": "4.8"
225
225
  }