Files
ShakaPlayer/externs/texttrackcuelist.js
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

30 lines
650 B
JavaScript

/*! @license
* Shaka Player
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Externs for TextTrackCueList which are missing from the
* Closure compiler.
*
* @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<!TextTrackCue>}
* @implements {Iterable<!TextTrackCue>}
* @constructor
* @suppress {duplicate}
*/
var TextTrackCueList = function() {};
/** @override */
TextTrackCueList.prototype[Symbol.iterator] = function() {};