@types/node 18.16.6 → 18.16.7

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 v18.16/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 08 May 2023 20:32:59 GMT
11
+ * Last updated: Wed, 10 May 2023 08:02:54 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node v18.16/fs.d.ts CHANGED
@@ -2999,7 +2999,7 @@ declare module 'fs' {
2999
2999
  bigint?: false | undefined;
3000
3000
  })
3001
3001
  | undefined,
3002
- listener: (curr: Stats, prev: Stats) => void
3002
+ listener: StatsListener
3003
3003
  ): StatWatcher;
3004
3004
  export function watchFile(
3005
3005
  filename: PathLike,
@@ -3008,13 +3008,14 @@ declare module 'fs' {
3008
3008
  bigint: true;
3009
3009
  })
3010
3010
  | undefined,
3011
- listener: (curr: BigIntStats, prev: BigIntStats) => void
3011
+ listener: BigIntStatsListener
3012
3012
  ): StatWatcher;
3013
3013
  /**
3014
3014
  * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
3015
3015
  * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
3016
+ * @param listener The callback listener will be called each time the file is accessed.
3016
3017
  */
3017
- export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): StatWatcher;
3018
+ export function watchFile(filename: PathLike, listener: StatsListener): StatWatcher;
3018
3019
  /**
3019
3020
  * Stop watching for changes on `filename`. If `listener` is specified, only that
3020
3021
  * particular listener is removed. Otherwise, _all_ listeners are removed,
@@ -3027,7 +3028,8 @@ declare module 'fs' {
3027
3028
  * @since v0.1.31
3028
3029
  * @param listener Optional, a listener previously attached using `fs.watchFile()`
3029
3030
  */
3030
- export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
3031
+ export function unwatchFile(filename: PathLike, listener?: StatsListener): void;
3032
+ export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
3031
3033
  export interface WatchOptions extends Abortable {
3032
3034
  encoding?: BufferEncoding | 'buffer' | undefined;
3033
3035
  persistent?: boolean | undefined;
@@ -3035,6 +3037,8 @@ declare module 'fs' {
3035
3037
  }
3036
3038
  export type WatchEventType = 'rename' | 'change';
3037
3039
  export type WatchListener<T> = (event: WatchEventType, filename: T) => void;
3040
+ export type StatsListener = (curr: Stats, prev: Stats) => void;
3041
+ export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
3038
3042
  /**
3039
3043
  * Watch for changes on `filename`, where `filename` is either a file or a
3040
3044
  * directory.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.16.6",
3
+ "version": "18.16.7",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "c4aa2681cf4ab02277304d4f720b228ae29c8e114ec45ad83bd51e3b38027f78",
235
+ "typesPublisherContentHash": "d171623e0f3e34a4bd1bd61d8322dab780ca80568ac3bbd3301636fe7f6f440d",
236
236
  "typeScriptVersion": "4.3"
237
237
  }
@@ -2899,7 +2899,7 @@ declare module 'fs' {
2899
2899
  bigint?: false | undefined;
2900
2900
  })
2901
2901
  | undefined,
2902
- listener: (curr: Stats, prev: Stats) => void
2902
+ listener: StatsListener
2903
2903
  ): StatWatcher;
2904
2904
  export function watchFile(
2905
2905
  filename: PathLike,
@@ -2908,7 +2908,7 @@ declare module 'fs' {
2908
2908
  bigint: true;
2909
2909
  })
2910
2910
  | undefined,
2911
- listener: (curr: BigIntStats, prev: BigIntStats) => void
2911
+ listener: BigIntStatsListener
2912
2912
  ): StatWatcher;
2913
2913
  /**
2914
2914
  * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
@@ -2927,7 +2927,8 @@ declare module 'fs' {
2927
2927
  * @since v0.1.31
2928
2928
  * @param listener Optional, a listener previously attached using `fs.watchFile()`
2929
2929
  */
2930
- export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
2930
+ export function unwatchFile(filename: PathLike, listener?: StatsListener): void;
2931
+ export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
2931
2932
  export interface WatchOptions extends Abortable {
2932
2933
  encoding?: BufferEncoding | 'buffer' | undefined;
2933
2934
  persistent?: boolean | undefined;
@@ -2935,6 +2936,8 @@ declare module 'fs' {
2935
2936
  }
2936
2937
  export type WatchEventType = 'rename' | 'change';
2937
2938
  export type WatchListener<T> = (event: WatchEventType, filename: T) => void;
2939
+ export type StatsListener = (curr: Stats, prev: Stats) => void;
2940
+ export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
2938
2941
  /**
2939
2942
  * Watch for changes on `filename`, where `filename` is either a file or a
2940
2943
  * directory.