From 6cbfc0b8fb4c526ff62547931b3861990fee4cb7 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Wed, 28 Oct 2026 02:41:12 -0700 Subject: [PATCH] Restore async-iterable Node return types Summary: Restore `AsyncIteratorObject` return types for `fs.promises.glob`, `fs.promises.watch`, and `timers/promises.setInterval` so these APIs retain their async-iterable contracts. Changelog: [Internal] Differential Revision: D128036025 --- flow-typed/environment/node.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flow-typed/environment/node.js b/flow-typed/environment/node.js index 463708f489e4..b636583a6e20 100644 --- a/flow-typed/environment/node.js +++ b/flow-typed/environment/node.js @@ -2422,8 +2422,8 @@ declare module 'fs' { options?: GlobOptions, ): Node$Conditional< WithFileTypes, - AsyncIterator, - AsyncIterator, + AsyncIteratorObject, + AsyncIteratorObject, >, lchmod(path: FSPromisePath, mode: number): Promise, lchown(path: FSPromisePath, uid: number, guid: number): Promise, @@ -2533,7 +2533,7 @@ declare module 'fs' { maxQueue?: number, overflow?: 'ignore' | 'throw', }>, - ): AsyncIterator<{eventType: string, filename: ?string}>, + ): AsyncIteratorObject<{eventType: string, filename: ?string}>, write( filehandle: FileHandle, buffer: T, @@ -4271,7 +4271,7 @@ declare module 'timers/promises' { delay?: number, value?: T, options?: TimerOptions, - ): AsyncIterator; + ): AsyncIteratorObject; declare export var scheduler: Readonly<{ wait(delay: number, options?: TimerOptions): Promise,