@types/node 22.8.1 → 22.8.3
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 +1 -1
- node/crypto.d.ts +10 -4
- node/http.d.ts +1 -0
- node/package.json +2 -2
- node/util.d.ts +11 -6
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:
|
11
|
+
* Last updated: Tue, 29 Oct 2024 16:37:49 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node/crypto.d.ts
CHANGED
@@ -2139,7 +2139,10 @@ declare module "crypto" {
|
|
2139
2139
|
* be passed instead of a public key.
|
2140
2140
|
* @since v0.11.14
|
2141
2141
|
*/
|
2142
|
-
function publicEncrypt(
|
2142
|
+
function publicEncrypt(
|
2143
|
+
key: RsaPublicKey | RsaPrivateKey | KeyLike,
|
2144
|
+
buffer: NodeJS.ArrayBufferView | string,
|
2145
|
+
): Buffer;
|
2143
2146
|
/**
|
2144
2147
|
* Decrypts `buffer` with `key`.`buffer` was previously encrypted using
|
2145
2148
|
* the corresponding private key, for example using {@link privateEncrypt}.
|
@@ -2151,7 +2154,10 @@ declare module "crypto" {
|
|
2151
2154
|
* be passed instead of a public key.
|
2152
2155
|
* @since v1.1.0
|
2153
2156
|
*/
|
2154
|
-
function publicDecrypt(
|
2157
|
+
function publicDecrypt(
|
2158
|
+
key: RsaPublicKey | RsaPrivateKey | KeyLike,
|
2159
|
+
buffer: NodeJS.ArrayBufferView | string,
|
2160
|
+
): Buffer;
|
2155
2161
|
/**
|
2156
2162
|
* Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
|
2157
2163
|
* the corresponding public key, for example using {@link publicEncrypt}.
|
@@ -2160,7 +2166,7 @@ declare module "crypto" {
|
|
2160
2166
|
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
|
2161
2167
|
* @since v0.11.14
|
2162
2168
|
*/
|
2163
|
-
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
2169
|
+
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer;
|
2164
2170
|
/**
|
2165
2171
|
* Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
|
2166
2172
|
* the corresponding public key, for example using {@link publicDecrypt}.
|
@@ -2169,7 +2175,7 @@ declare module "crypto" {
|
|
2169
2175
|
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
|
2170
2176
|
* @since v1.1.0
|
2171
2177
|
*/
|
2172
|
-
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
2178
|
+
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer;
|
2173
2179
|
/**
|
2174
2180
|
* ```js
|
2175
2181
|
* const {
|
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.
|
3
|
+
"version": "22.8.3",
|
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": "
|
223
|
+
"typesPublisherContentHash": "6b7a7784efb1c6113c415dfcf3e3245db72fc539a8db3355c58d6d06306606a2",
|
224
224
|
"typeScriptVersion": "4.8"
|
225
225
|
}
|
node/util.d.ts
CHANGED
@@ -1517,18 +1517,23 @@ declare module "util" {
|
|
1517
1517
|
string | boolean
|
1518
1518
|
>;
|
1519
1519
|
|
1520
|
+
type ApplyOptionalModifiers<O extends ParseArgsOptionsConfig, V extends Record<keyof O, unknown>> = (
|
1521
|
+
& { -readonly [LongOption in keyof O]?: V[LongOption] }
|
1522
|
+
& { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] }
|
1523
|
+
) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object
|
1524
|
+
|
1520
1525
|
type ParsedValues<T extends ParseArgsConfig> =
|
1521
1526
|
& IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
|
1522
|
-
& (T["options"] extends ParseArgsOptionsConfig ?
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
| IfDefaultsFalse<
|
1527
|
+
& (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers<
|
1528
|
+
T["options"],
|
1529
|
+
{
|
1530
|
+
[LongOption in keyof T["options"]]: IfDefaultsFalse<
|
1527
1531
|
T["options"][LongOption]["multiple"],
|
1528
1532
|
Array<ExtractOptionValue<T, T["options"][LongOption]>>,
|
1529
1533
|
ExtractOptionValue<T, T["options"][LongOption]>
|
1530
1534
|
>;
|
1531
|
-
|
1535
|
+
}
|
1536
|
+
>
|
1532
1537
|
: {});
|
1533
1538
|
|
1534
1539
|
type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
|