@types/node
Advanced tools
+56
-2
@@ -292,2 +292,11 @@ /** | ||
| } | ||
| export interface TlsaRecord { | ||
| certUsage: number; | ||
| selector: number; | ||
| match: number; | ||
| data: ArrayBuffer; | ||
| } | ||
| export interface AnyTlsaRecord extends TlsaRecord { | ||
| type: "TLSA"; | ||
| } | ||
| export interface AnyTxtRecord { | ||
@@ -319,2 +328,3 @@ type: "TXT"; | ||
| | AnySrvRecord | ||
| | AnyTlsaRecord | ||
| | AnyTxtRecord; | ||
@@ -390,2 +400,7 @@ /** | ||
| hostname: string, | ||
| rrtype: "TLSA", | ||
| callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, | ||
| ): void; | ||
| export function resolve( | ||
| hostname: string, | ||
| rrtype: "TXT", | ||
@@ -399,3 +414,11 @@ callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, | ||
| err: NodeJS.ErrnoException | null, | ||
| addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[], | ||
| addresses: | ||
| | string[] | ||
| | MxRecord[] | ||
| | NaptrRecord[] | ||
| | SoaRecord | ||
| | SrvRecord[] | ||
| | TlsaRecord[] | ||
| | string[][] | ||
| | AnyRecord[], | ||
| ) => void, | ||
@@ -410,2 +433,3 @@ ): void; | ||
| function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>; | ||
| function __promisify__(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>; | ||
| function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>; | ||
@@ -415,3 +439,5 @@ function __promisify__( | ||
| rrtype: string, | ||
| ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>; | ||
| ): Promise< | ||
| string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | TlsaRecord[] | string[][] | AnyRecord[] | ||
| >; | ||
| } | ||
@@ -619,2 +645,29 @@ /** | ||
| /** | ||
| * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for | ||
| * the `hostname`. The `records` argument passed to the `callback` function is an | ||
| * array of objects with these properties: | ||
| * | ||
| * * `certUsage` | ||
| * * `selector` | ||
| * * `match` | ||
| * * `data` | ||
| * | ||
| * ```js | ||
| * { | ||
| * certUsage: 3, | ||
| * selector: 1, | ||
| * match: 1, | ||
| * data: [ArrayBuffer] | ||
| * } | ||
| * ``` | ||
| * @since v22.15.0 | ||
| */ | ||
| export function resolveTlsa( | ||
| hostname: string, | ||
| callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, | ||
| ): void; | ||
| export namespace resolveTlsa { | ||
| function __promisify__(hostname: string): Promise<TlsaRecord[]>; | ||
| } | ||
| /** | ||
| * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a | ||
@@ -848,2 +901,3 @@ * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of | ||
| resolveSrv: typeof resolveSrv; | ||
| resolveTlsa: typeof resolveTlsa; | ||
| resolveTxt: typeof resolveTxt; | ||
@@ -850,0 +904,0 @@ reverse: typeof reverse; |
@@ -23,2 +23,3 @@ /** | ||
| SrvRecord, | ||
| TlsaRecord, | ||
| } from "node:dns"; | ||
@@ -141,2 +142,3 @@ /** | ||
| function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>; | ||
| function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>; | ||
| function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>; | ||
@@ -146,3 +148,5 @@ function resolve( | ||
| rrtype: string, | ||
| ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>; | ||
| ): Promise< | ||
| string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | TlsaRecord[] | string[][] | AnyRecord[] | ||
| >; | ||
| /** | ||
@@ -299,2 +303,23 @@ * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 | ||
| /** | ||
| * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for | ||
| * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions | ||
| * with these properties: | ||
| * | ||
| * * `certUsage` | ||
| * * `selector` | ||
| * * `match` | ||
| * * `data` | ||
| * | ||
| * ```js | ||
| * { | ||
| * certUsage: 3, | ||
| * selector: 1, | ||
| * match: 1, | ||
| * data: [ArrayBuffer] | ||
| * } | ||
| * ``` | ||
| * @since v22.15.0 | ||
| */ | ||
| function resolveTlsa(hostname: string): Promise<TlsaRecord[]>; | ||
| /** | ||
| * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array | ||
@@ -457,2 +482,3 @@ * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of | ||
| resolveSrv: typeof resolveSrv; | ||
| resolveTlsa: typeof resolveTlsa; | ||
| resolveTxt: typeof resolveTxt; | ||
@@ -459,0 +485,0 @@ reverse: typeof reverse; |
@@ -487,3 +487,23 @@ /** | ||
| ) => LoadFnOutput; | ||
| interface SourceMapsSupport { | ||
| /** | ||
| * If the source maps support is enabled | ||
| */ | ||
| enabled: boolean; | ||
| /** | ||
| * If the support is enabled for files in `node_modules`. | ||
| */ | ||
| nodeModules: boolean; | ||
| /** | ||
| * If the support is enabled for generated code from `eval` or `new Function`. | ||
| */ | ||
| generatedCode: boolean; | ||
| } | ||
| /** | ||
| * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack | ||
| * traces is enabled. | ||
| * @since v22.14.0 | ||
| */ | ||
| function getSourceMapsSupport(): SourceMapsSupport; | ||
| /** | ||
| * `path` is the resolved path for the file for which a corresponding source map | ||
@@ -495,2 +515,29 @@ * should be fetched. | ||
| function findSourceMap(path: string): SourceMap | undefined; | ||
| interface SetSourceMapsSupportOptions { | ||
| /** | ||
| * If enabling the support for files in `node_modules`. | ||
| * @default false | ||
| */ | ||
| nodeModules?: boolean | undefined; | ||
| /** | ||
| * If enabling the support for generated code from `eval` or `new Function`. | ||
| * @default false | ||
| */ | ||
| generatedCode?: boolean | undefined; | ||
| } | ||
| /** | ||
| * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for | ||
| * stack traces. | ||
| * | ||
| * It provides same features as launching Node.js process with commandline options | ||
| * `--enable-source-maps`, with additional options to alter the support for files | ||
| * in `node_modules` or generated codes. | ||
| * | ||
| * Only source maps in JavaScript files that are loaded after source maps has been | ||
| * enabled will be parsed and loaded. Preferably, use the commandline options | ||
| * `--enable-source-maps` to avoid losing track of source maps of modules loaded | ||
| * before this API call. | ||
| * @since v22.14.0 | ||
| */ | ||
| function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void; | ||
| interface SourceMapConstructorOptions { | ||
@@ -497,0 +544,0 @@ /** |
| { | ||
| "name": "@types/node", | ||
| "version": "22.15.32", | ||
| "version": "22.15.33", | ||
| "description": "TypeScript definitions for node", | ||
@@ -223,4 +223,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", | ||
| "peerDependencies": {}, | ||
| "typesPublisherContentHash": "300227c67dac92738a25452841e8b61a4c5712b3a6db1330930fc402d7dea27e", | ||
| "typesPublisherContentHash": "ec7d5c92435a8b94feeea3ed5a038a05e2b42d1f6228e6e6e4eca430ed93fd94", | ||
| "typeScriptVersion": "5.1" | ||
| } |
@@ -11,3 +11,3 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Mon, 16 Jun 2025 08:40:15 GMT | ||
| * Last updated: Tue, 24 Jun 2025 16:39:29 GMT | ||
| * Dependencies: [undici-types](https://npmjs.com/package/undici-types) | ||
@@ -14,0 +14,0 @@ |
+33
-0
@@ -404,2 +404,35 @@ /** | ||
| /** | ||
| * V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string. | ||
| * If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true; | ||
| * otherwise, it returns false. | ||
| * | ||
| * If this method returns false, that does not mean that the string contains some characters not in `Latin-1/ISO-8859-1`. | ||
| * Sometimes a `Latin-1` string may also be represented as `UTF16`. | ||
| * | ||
| * ```js | ||
| * const { isStringOneByteRepresentation } = require('node:v8'); | ||
| * | ||
| * const Encoding = { | ||
| * latin1: 1, | ||
| * utf16le: 2, | ||
| * }; | ||
| * const buffer = Buffer.alloc(100); | ||
| * function writeString(input) { | ||
| * if (isStringOneByteRepresentation(input)) { | ||
| * buffer.writeUint8(Encoding.latin1); | ||
| * buffer.writeUint32LE(input.length, 1); | ||
| * buffer.write(input, 5, 'latin1'); | ||
| * } else { | ||
| * buffer.writeUint8(Encoding.utf16le); | ||
| * buffer.writeUint32LE(input.length * 2, 1); | ||
| * buffer.write(input, 5, 'utf16le'); | ||
| * } | ||
| * } | ||
| * writeString('hello'); | ||
| * writeString('你好'); | ||
| * ``` | ||
| * @since v22.15.0 | ||
| */ | ||
| function isStringOneByteRepresentation(content: string): boolean; | ||
| /** | ||
| * @since v8.0.0 | ||
@@ -406,0 +439,0 @@ */ |
Network access
Supply chain riskThis module accesses the network.
Found 9 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 11 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 7 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 9 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 11 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 7 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2363871
0.23%52417
0.31%331
0.61%