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 HTMLCollection<+T> 14 implements Iterable<T>, ArrayLike<T> 15{ 16 // This property should've been read-only as well, but Flow doesn't handle 17 // read-only indexers correctly (thinks reads are writes and fails). 18 [index: number]: T; 19 +length: number; 20 item(index: number): T | null; 21 namedItem(name: string): T | null; 22 @@iterator(): Iterator<T>; 23} 24 25declare export function createHTMLCollection<T>( 26 elements: $ReadOnlyArray<T>, 27): HTMLCollection<T>; 28