Files
shaka-player/externs/domstringlist.js
T
Laura Harker 4ef5e33697 refactor: fix upcoming Closure Compiler type errors on Symbol.iterator (#8851)
Closure Compiler will soon start typechecking well-known symbol
properties, such as Symbol.iterator - see
https://github.com/google/closure-compiler/issues/1737.

This will cause some type errors in existing code that implements
`Iterable` (for context, I ran into these errors in google's internal
repo) that is missing a Symbol.iterator override or `@override`
annotation
2025-07-10 15:48:01 -07:00

35 lines
730 B
JavaScript

/*! @license
* Shaka Player
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Externs for DOMStringList to override those provided by the
* Closure Compiler.
*
* TODO: contribute fixes to the Closure Compiler externs
*
* @externs
*/
/**
* This is an Iterable, but Closure's built-in extern doesn't seem to declare it
* as such in this version of the compiler (20200406).
*
* Here we override that definition.
*
* @implements {IArrayLike<string>}
* @implements {Iterable<string>}
* @constructor
* @suppress {duplicate}
*/
var DOMStringList = function() {};
/**
* @override
* @return {!Iterator<string>}
*/
DOMStringList.prototype[Symbol.iterator] = function() {};