1*af2ec015STomasz Sapeta/**
2*af2ec015STomasz Sapeta * Copyright (c) Meta Platforms, Inc. and affiliates.
3*af2ec015STomasz Sapeta *
4*af2ec015STomasz Sapeta * This source code is licensed under the MIT license found in the
5*af2ec015STomasz Sapeta * LICENSE file in the root directory of this source tree.
6*af2ec015STomasz Sapeta *
7*af2ec015STomasz Sapeta * @format
8*af2ec015STomasz Sapeta * @flow strict
9*af2ec015STomasz Sapeta */
10*af2ec015STomasz Sapeta
11*af2ec015STomasz Sapetaimport type {ArrayLike} from './ArrayLikeUtils';
12*af2ec015STomasz Sapeta
13*af2ec015STomasz Sapetadeclare export default class HTMLCollection<+T>
14*af2ec015STomasz Sapeta  implements Iterable<T>, ArrayLike<T>
15*af2ec015STomasz Sapeta{
16*af2ec015STomasz Sapeta  // This property should've been read-only as well, but Flow doesn't handle
17*af2ec015STomasz Sapeta  // read-only indexers correctly (thinks reads are writes and fails).
18*af2ec015STomasz Sapeta  [index: number]: T;
19*af2ec015STomasz Sapeta  +length: number;
20*af2ec015STomasz Sapeta  item(index: number): T | null;
21*af2ec015STomasz Sapeta  namedItem(name: string): T | null;
22*af2ec015STomasz Sapeta  @@iterator(): Iterator<T>;
23*af2ec015STomasz Sapeta}
24*af2ec015STomasz Sapeta
25*af2ec015STomasz Sapetadeclare export function createHTMLCollection<T>(
26*af2ec015STomasz Sapeta  elements: $ReadOnlyArray<T>,
27*af2ec015STomasz Sapeta): HTMLCollection<T>;
28