1/** 2 * Copyright (c) Meta Platforms, Inc. and affiliates. 3 * 4 * This source code is licensed under the MIT license found in the 5 * LICENSE file in the root directory of this source tree. 6 * 7 * @format 8 * @flow strict 9 */ 10 11import type {ArrayLike} from './ArrayLikeUtils'; 12 13declare export default class NodeList<+T> implements Iterable<T>, ArrayLike<T> { 14 // This property should've been read-only as well, but Flow doesn't handle 15 // read-only indexers correctly (thinks reads are writes and fails). 16 [index: number]: T; 17 +length: number; 18 item(index: number): T | null; 19 entries(): Iterator<[number, T]>; 20 forEach<ThisType>( 21 callbackFn: (value: T, index: number, array: NodeList<T>) => mixed, 22 thisArg?: ThisType, 23 ): void; 24 keys(): Iterator<number>; 25 values(): Iterator<T>; 26 @@iterator(): Iterator<T>; 27} 28 29declare export function createNodeList<T>( 30 elements: $ReadOnlyArray<T>, 31): NodeList<T>; 32