Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flow-typed/environment/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ declare module 'fs' {
read(): Promise<?Dirent>;
read(cb: (err?: Error, dirent: ?Dirent) => void): void;
readSync(): ?Dirent;
@@asyncIterator(): AsyncIterator<Dirent>;
[Symbol.asyncIterator](): AsyncIterator<Dirent>;
}
type AppendOrWriteToFileHandle = (
data:
Expand Down Expand Up @@ -3564,7 +3564,7 @@ declare class readline$Interface extends events$EventEmitter {
...
},
): void;
@@asyncIterator(): AsyncIterator<string>;
[Symbol.asyncIterator](): AsyncIterator<string>;
}

declare module 'readline' {
Expand Down Expand Up @@ -3657,7 +3657,7 @@ declare class stream$Readable extends stream$Stream {
_read(size: number): void;
_destroy(error: ?Error, callback: (error?: Error) => void): void;
push(chunk: ?(Buffer | Uint8Array | string), encoding?: string): boolean;
@@asyncIterator(): AsyncIterator<string | Buffer>;
[Symbol.asyncIterator](): AsyncIterator<string | Buffer>;
}

type writableStreamOptions = {
Expand Down Expand Up @@ -4339,7 +4339,7 @@ declare module 'url' {
options?: Readonly<{windows?: boolean}>,
): string;
declare class URLSearchParams {
@@iterator(): Iterator<[string, string]>;
[Symbol.iterator](): Iterator<[string, string]>;

size: number;

Expand Down
2 changes: 1 addition & 1 deletion flow-typed/npm/@isaacs/ttlcache_1.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ declare module '@isaacs/ttlcache' {
* Iterating over the cache itself yields the same results as
* `cache.entries()`
*/
@@iterator(): Iterator<[K, V]>;
[Symbol.iterator](): Iterator<[K, V]>;

/**
* Cancel the timer and stop automatically expiring entries.
Expand Down
2 changes: 1 addition & 1 deletion flow-typed/npm/node-fetch_v2.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ declare module 'node-fetch' {
entries(): Iterator<[string, string]>;
keys(): Iterator<string>;
values(): Iterator<string>;
@@iterator(): Iterator<[string, string]>;
[Symbol.iterator](): Iterator<[string, string]>;
}

declare class Body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ declare export class URLSearchParams {
has(name: string): boolean;
set(name: string, value: string): void;
sort(): void;
@@iterator(): IteratorObject<[string, string]>;
[Symbol.iterator](): IteratorObject<[string, string]>;
toString(): string;
keys(): IteratorObject<string>;
values(): IteratorObject<string>;
Expand Down
8 changes: 4 additions & 4 deletions packages/react-native/flow/bom.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ declare class DOMRect extends DOMRectReadOnly {
}

declare class DOMRectList {
@@iterator(): Iterator<DOMRect>;
[Symbol.iterator](): Iterator<DOMRect>;
item(index: number): DOMRect;
length: number;
[index: number]: DOMRect;
Expand Down Expand Up @@ -594,7 +594,7 @@ type HeadersInit =
// TODO Heades and URLSearchParams are almost the same thing.
// Could it somehow be abstracted away?
declare class Headers {
@@iterator(): Iterator<[string, string]>;
[Symbol.iterator](): Iterator<[string, string]>;
append(name: string, value: string): void;
constructor(init?: HeadersInit): void;
delete(name: string): void;
Expand All @@ -616,7 +616,7 @@ declare class Headers {
}

declare class URLSearchParams {
@@iterator(): Iterator<[string, string]>;
[Symbol.iterator](): Iterator<[string, string]>;

append(name: string, value: string): void;

Expand Down Expand Up @@ -846,7 +846,7 @@ declare class FileSystemDirectoryHandle extends FileSystemHandle {
resolve(possibleDescendant: FileSystemHandle): Promise<Array<string> | null>;

// Async iterator functions
@@asyncIterator(): AsyncIterator<[string, FileSystemHandle]>;
[Symbol.asyncIterator](): AsyncIterator<[string, FileSystemHandle]>;
entries(): AsyncIterator<[string, FileSystemHandle]>;
keys(): AsyncIterator<string>;
values(): AsyncIterator<FileSystemHandle>;
Expand Down
8 changes: 4 additions & 4 deletions packages/react-native/flow/cssom.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ declare class StyleSheet {
}

declare class StyleSheetList {
@@iterator(): Iterator<StyleSheet>;
[Symbol.iterator](): Iterator<StyleSheet>;
length: number;
[index: number]: StyleSheet;
}

declare class MediaList {
@@iterator(): Iterator<string>;
[Symbol.iterator](): Iterator<string>;
appendMedium(newMedium: string): void;
deleteMedium(oldMedium: string): void;
item(index: number): ?string;
Expand Down Expand Up @@ -80,14 +80,14 @@ declare class CSSKeyframesRule extends CSSRule {
}

declare class CSSRuleList {
@@iterator(): Iterator<CSSRule>;
[Symbol.iterator](): Iterator<CSSRule>;
item(index: number): ?CSSRule;
length: number;
[index: number]: CSSRule;
}

declare class CSSStyleDeclaration {
@@iterator(): Iterator<string>;
[Symbol.iterator](): Iterator<string>;
/* DOM CSS Properties */
alignContent: string;
alignItems: string;
Expand Down
24 changes: 12 additions & 12 deletions packages/react-native/flow/dom.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ declare class File extends Blob {
}

declare class FileList {
@@iterator(): Iterator<File>;
[Symbol.iterator](): Iterator<File>;
length: number;
item(index: number): File;
[index: number]: File;
Expand All @@ -88,7 +88,7 @@ declare class DataTransfer {
}

declare class DataTransferItemList {
@@iterator(): Iterator<DataTransferItem>;
[Symbol.iterator](): Iterator<DataTransferItem>;
length: number; // readonly
[index: number]: DataTransferItem;
add(data: string, type: string): ?DataTransferItem;
Expand Down Expand Up @@ -116,7 +116,7 @@ declare class DataTransferItem {
declare type DOMStringMap = {[key: string]: string, ...};

declare class DOMStringList {
@@iterator(): Iterator<string>;
[Symbol.iterator](): Iterator<string>;
readonly [key: number]: string;
readonly length: number;
item(v: number): string | null;
Expand Down Expand Up @@ -1160,7 +1160,7 @@ declare class Touch {
// TouchList#item(index) will return null if n > #length. Should #item's
// return type just been Touch?
declare class TouchList {
@@iterator(): Iterator<Touch>;
[Symbol.iterator](): Iterator<Touch>;
length: number;
item(index: number): null | Touch;
[index: number]: Touch;
Expand Down Expand Up @@ -1323,7 +1323,7 @@ declare class Node extends EventTarget {
}

declare class NodeList<T = Node> {
@@iterator(): Iterator<T>;
[Symbol.iterator](): Iterator<T>;
length: number;
item(index: number): T;
[index: number]: T;
Expand All @@ -1340,7 +1340,7 @@ declare class NodeList<T = Node> {
type NodeListOf<T extends Node> = NodeList<T>;

declare class NamedNodeMap {
@@iterator(): Iterator<Attr>;
[Symbol.iterator](): Iterator<Attr>;
length: number;
removeNamedItemNS(namespaceURI: string, localName: string): Attr;
item(index: number): Attr;
Expand All @@ -1364,7 +1364,7 @@ declare class Attr extends Node {
}

declare class HTMLCollection<out Elem extends HTMLElement> {
@@iterator(): Iterator<Elem>;
[Symbol.iterator](): Iterator<Elem>;
length: number;
item(nameOrIndex?: any, optionalIndex?: any): Elem | null;
namedItem(name: string): Elem | null;
Expand Down Expand Up @@ -2789,7 +2789,7 @@ declare var document: Document;
type FocusOptions = {preventScroll?: boolean, ...};

declare class DOMTokenList {
@@iterator(): Iterator<string>;
[Symbol.iterator](): Iterator<string>;
length: number;
item(index: number): string;
contains(token: string): boolean;
Expand Down Expand Up @@ -5001,7 +5001,7 @@ declare class HTMLDetailsElement extends HTMLElement {

declare class HTMLFormElement extends HTMLElement {
tagName: 'FORM';
@@iterator(): Iterator<HTMLElement>;
[Symbol.iterator](): Iterator<HTMLElement>;
[index: number | string]: HTMLElement | null;
acceptCharset: string;
action: string;
Expand Down Expand Up @@ -5158,7 +5158,7 @@ declare class TextTrackCue extends EventTarget {
}

declare class TextTrackCueList {
@@iterator(): Iterator<TextTrackCue>;
[Symbol.iterator](): Iterator<TextTrackCue>;
length: number;
[index: number]: TextTrackCue;
getCueById(id: string): ?TextTrackCue;
Expand Down Expand Up @@ -5189,7 +5189,7 @@ declare class TextTrackList extends EventTarget {
}

declare class MediaKeyStatusMap<BufferDataSource, MediaKeyStatus> {
@@iterator(): Iterator<[BufferDataSource, MediaKeyStatus]>;
[Symbol.iterator](): Iterator<[BufferDataSource, MediaKeyStatus]>;
size: number;
entries(): Iterator<[BufferDataSource, MediaKeyStatus]>;
forEach(
Expand Down Expand Up @@ -6005,7 +6005,7 @@ declare class SourceBuffer extends EventTarget {
}

declare class SourceBufferList extends EventTarget {
@@iterator(): Iterator<SourceBuffer>;
[Symbol.iterator](): Iterator<SourceBuffer>;
[index: number]: SourceBuffer;
length: number;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ declare export default class DOMRectList
[index: number]: DOMRectReadOnly;
readonly length: number;
item(index: number): DOMRectReadOnly | null;
@@iterator(): IteratorObject<DOMRectReadOnly>;
[Symbol.iterator](): IteratorObject<DOMRectReadOnly>;
}

declare export function createDOMRectList(
Expand Down
Loading