Skip to content

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

@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