mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix fs.watch callback type for new @types/node (#54417)
This commit is contained in:
Generated
+6
-6
@@ -816,9 +816,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.4.tgz",
|
||||
"integrity": "sha512-ni5f8Xlf4PwnT/Z3f0HURc3ZSw8UyrqMqmM3L5ysa7VjHu8c3FOmIo1nKCcLrV/OAmtf3N4kFna/aJqxsfEtnA==",
|
||||
"version": "20.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz",
|
||||
"integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/semver": {
|
||||
@@ -5090,9 +5090,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "20.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.4.tgz",
|
||||
"integrity": "sha512-ni5f8Xlf4PwnT/Z3f0HURc3ZSw8UyrqMqmM3L5ysa7VjHu8c3FOmIo1nKCcLrV/OAmtf3N4kFna/aJqxsfEtnA==",
|
||||
"version": "20.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz",
|
||||
"integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/semver": {
|
||||
|
||||
+2
-2
@@ -812,7 +812,7 @@ function createDirectoryWatcherSupportingRecursive({
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined, modifiedTime?: Date) => void;
|
||||
export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined | null, modifiedTime?: Date) => void;
|
||||
/** @internal */
|
||||
export type FsWatch = (fileOrDirectory: string, entryKind: FileSystemEntryKind, callback: FsWatchCallback, recursive: boolean, fallbackPollingInterval: PollingInterval, fallbackOptions: WatchOptions | undefined) => FileWatcher;
|
||||
/** @internal */
|
||||
@@ -1205,7 +1205,7 @@ export function createSystemWatchFunctions({
|
||||
}
|
||||
}
|
||||
|
||||
function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined) {
|
||||
function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined | null) {
|
||||
// In some scenarios, file save operation fires event with fileName.ext~ instead of fileName.ext
|
||||
// To ensure we see the file going missing and coming back up (file delete and then recreated)
|
||||
// and watches being updated correctly we are calling back with fileName.ext as well as fileName.ext~
|
||||
|
||||
Reference in New Issue
Block a user