-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 2.8.1
Search Terms: StyleSheetList iterable
Code
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
for (const styleSheet of document.styleSheets) {
}Both latest Chrome 65 and Firefox 59 support iterable on StyleSheetList and CSSRuleList.
I can submitted a PR if needed.
Expected behavior:
Code compiled without error.
Actual behavior:
Type 'StyleSheetList' is not an array type or a string type or does not have a 'Symbol.iterator' method that returns an iterator.
Playground Link:
Related Issues:
dominictobias and Joozty
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this