Skip to content

set.values().next() has wrong typeΒ #43750

Closed
@sdegutis

Description

@sdegutis

Bug Report

πŸ”Ž Search Terms

πŸ•— Version & Regression Information

Happens in both versions 4.2.3 and 4.3.0-beta

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

const s = new Set<string>();
s.values().next().value;

πŸ™ Actual behavior

Type of value is any.

πŸ™‚ Expected behavior

Type of value should probably be string | undefined or something.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions