diff --git a/.flowconfig b/.flowconfig index 0502a61494e..343fa50eea4 100644 --- a/.flowconfig +++ b/.flowconfig @@ -39,6 +39,8 @@ flow-typed/ packages/react-native/flow/ [options] +builtin_lib=core-only + emoji=true format.bracket_spacing=false @@ -94,4 +96,4 @@ untyped-import untyped-type-import [version] -^0.332.0 +^0.333.0 diff --git a/flow-typed/environment/node.js b/flow-typed/environment/node.js index b06b25d5049..353bf3ff75f 100644 --- a/flow-typed/environment/node.js +++ b/flow-typed/environment/node.js @@ -71,7 +71,7 @@ declare class Buffer extends Uint8Array { sourceStart?: number, sourceEnd?: number, ): number; - entries(): Iterator<[number, number]>; + entries(): IteratorObject<[number, number]>; equals(otherBuffer: Buffer): boolean; fill( value: string | Buffer | number, @@ -91,7 +91,7 @@ declare class Buffer extends Uint8Array { encoding?: buffer$Encoding, ): number; inspect(): string; - keys(): Iterator; + keys(): IteratorObject; lastIndexOf( value: string | Buffer | number, offsetOrEncoding?: number | buffer$Encoding, @@ -121,7 +121,7 @@ declare class Buffer extends Uint8Array { swap64(): Buffer; toJSON(): buffer$ToJSONRet; toString(encoding?: buffer$Encoding, start?: number, end?: number): string; - values(): Iterator; + values(): IteratorObject; write( string: string, offset?: number, @@ -181,14 +181,13 @@ declare class Buffer extends Uint8Array { static compare(buf1: Buffer, buf2: Buffer): number; static concat(list: Array, totalLength?: number): Buffer; - static from(value: Buffer): Buffer; + static from(value: ArrayLike | Iterable): Buffer; static from(value: string, encoding?: buffer$Encoding): Buffer; static from( value: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number, ): Buffer; - static from(value: Iterable): this; static isBuffer(obj: any): boolean; static isEncoding(encoding: string): boolean; } diff --git a/package.json b/package.json index fba931e5597..87a07e01c71 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "eslint-plugin-relay": "^1.8.3", "fb-dotslash": "0.5.8", "flow-api-translator": "0.331.0", - "flow-bin": "^0.332.0", + "flow-bin": "^0.333.0", "flow-eslint": "0.331.0", "flow-parser": "0.331.0", "flow-transform": "0.331.0", diff --git a/packages/react-native/flow/bom.js.flow b/packages/react-native/flow/bom.js.flow index a2ed4d76e61..24cf0328eb9 100644 --- a/packages/react-native/flow/bom.js.flow +++ b/packages/react-native/flow/bom.js.flow @@ -181,14 +181,14 @@ type EventCountsForEachCallbackType = // https://www.w3.org/TR/event-timing/#eventcounts declare interface EventCounts { - entries(): Iterator<[string, number]>; + entries(): IteratorObject<[string, number]>; forEach(callback: EventCountsForEachCallbackType): void; get(key: string): ?number; has(key: string): boolean; - keys(): Iterator; + keys(): IteratorObject; size: number; - values(): Iterator; + values(): IteratorObject; } declare class Performance { diff --git a/yarn.lock b/yarn.lock index e33aa02fd21..b99a28a8f0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4832,10 +4832,10 @@ flow-api-translator@0.331.0: flow-transform "0.331.0" typescript "5.3.2" -flow-bin@^0.332.0: - version "0.332.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.332.0.tgz#b83761b61c1d4fd22a74a6882035da671556fb32" - integrity sha512-Vf1fSgUkwKwwN/xt2vFHxiML8g6BBGXbKHlgZm4R//bNp+pc9DMKQ5F0vsTXdBMaeHrFur1U5Lonh9w2bxb8nA== +flow-bin@^0.333.0: + version "0.333.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.333.0.tgz#6f44cb45b7772ab1a8a0ad9bb658de9ea0953c18" + integrity sha512-cDI5lcb0mbWUmkKs09hTaPEprQzrV+XKp1YzBLgNG13uzr1kM3qhYxZFx766f3an7LmD2lD9BzNbNu+hw4YHew== flow-enums-runtime@^0.0.6: version "0.0.6"