google / google/closure-compiler

Explicit type annotations shouldn't be required when iterating over e.g. Map.entries()

Open
#2,059 1 comment 0 reactions 0 assignees View on GitHub
Types
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

For a map of type `!Map`, map.entries() returns an `!IterableIterator>`.

The information that the first element of each entry must be a string and the second must be a number is lost, so you have to explicitly cast them later.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.