@types/node 16.18.102 → 16.18.104

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 v16.18/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/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 16 Jul 2024 20:07:33 GMT
11
+ * Last updated: Tue, 23 Jul 2024 18:09:25 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
node v16.18/buffer.d.ts CHANGED
@@ -2114,31 +2114,6 @@ declare module "buffer" {
2114
2114
  * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
2115
2115
  */
2116
2116
  lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
2117
- /**
2118
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
2119
- * of `buf`.
2120
- *
2121
- * ```js
2122
- * import { Buffer } from 'node:buffer';
2123
- *
2124
- * // Log the entire contents of a `Buffer`.
2125
- *
2126
- * const buf = Buffer.from('buffer');
2127
- *
2128
- * for (const pair of buf.entries()) {
2129
- * console.log(pair);
2130
- * }
2131
- * // Prints:
2132
- * // [0, 98]
2133
- * // [1, 117]
2134
- * // [2, 102]
2135
- * // [3, 102]
2136
- * // [4, 101]
2137
- * // [5, 114]
2138
- * ```
2139
- * @since v1.1.0
2140
- */
2141
- entries(): IterableIterator<[number, number]>;
2142
2117
  /**
2143
2118
  * Equivalent to `buf.indexOf() !== -1`.
2144
2119
  *
@@ -2169,62 +2144,6 @@ declare module "buffer" {
2169
2144
  * @return `true` if `value` was found in `buf`, `false` otherwise.
2170
2145
  */
2171
2146
  includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
2172
- /**
2173
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
2174
- *
2175
- * ```js
2176
- * import { Buffer } from 'node:buffer';
2177
- *
2178
- * const buf = Buffer.from('buffer');
2179
- *
2180
- * for (const key of buf.keys()) {
2181
- * console.log(key);
2182
- * }
2183
- * // Prints:
2184
- * // 0
2185
- * // 1
2186
- * // 2
2187
- * // 3
2188
- * // 4
2189
- * // 5
2190
- * ```
2191
- * @since v1.1.0
2192
- */
2193
- keys(): IterableIterator<number>;
2194
- /**
2195
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
2196
- * called automatically when a `Buffer` is used in a `for..of` statement.
2197
- *
2198
- * ```js
2199
- * import { Buffer } from 'node:buffer';
2200
- *
2201
- * const buf = Buffer.from('buffer');
2202
- *
2203
- * for (const value of buf.values()) {
2204
- * console.log(value);
2205
- * }
2206
- * // Prints:
2207
- * // 98
2208
- * // 117
2209
- * // 102
2210
- * // 102
2211
- * // 101
2212
- * // 114
2213
- *
2214
- * for (const value of buf) {
2215
- * console.log(value);
2216
- * }
2217
- * // Prints:
2218
- * // 98
2219
- * // 117
2220
- * // 102
2221
- * // 102
2222
- * // 101
2223
- * // 114
2224
- * ```
2225
- * @since v1.1.0
2226
- */
2227
- values(): IterableIterator<number>;
2228
2147
  }
2229
2148
  var Buffer: BufferConstructor;
2230
2149
  /**
node v16.18/module.d.ts CHANGED
@@ -195,22 +195,15 @@ declare module "module" {
195
195
  static Module: typeof Module;
196
196
  constructor(id: string, parent?: Module);
197
197
  }
198
+ type ImportMetaDOMCompat = typeof globalThis extends { onmessage: any } ? {
199
+ resolve(specifier: string): string;
200
+ }
201
+ : {
202
+ resolve?(specifier: string, parent?: string | URL): Promise<string>;
203
+ };
198
204
  global {
199
- interface ImportMeta {
205
+ interface ImportMeta extends ImportMetaDOMCompat {
200
206
  url: string;
201
- /**
202
- * @experimental
203
- * This feature is only available with the `--experimental-import-meta-resolve`
204
- * command flag enabled.
205
- *
206
- * Provides a module-relative resolution function scoped to each module, returning
207
- * the URL string.
208
- *
209
- * @param specified The module specifier to resolve relative to `parent`.
210
- * @param parent The absolute parent module URL to resolve from. If none
211
- * is specified, the value of `import.meta.url` is used as the default.
212
- */
213
- resolve?(specified: string, parent?: string | URL): Promise<string>;
214
207
  }
215
208
  }
216
209
  export = Module;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.18.102",
3
+ "version": "16.18.104",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -210,6 +210,6 @@
210
210
  },
211
211
  "scripts": {},
212
212
  "dependencies": {},
213
- "typesPublisherContentHash": "a27ff62c2cecf5a12bb841df4f1a3c2a6fe58740d28d73d02e914cabd80e3e00",
213
+ "typesPublisherContentHash": "be6668745a24f2ee975b4b0f63e316c70482a78ee3636bd612b0d438c328eb26",
214
214
  "typeScriptVersion": "4.8"
215
215
  }