Skip to content

Set MUST NOT allow to be number-indexed #30194

@SalathielGenese

Description

@SalathielGenese

I just experimented a (what's the opposite of false positive ?) clean negative false negative (thanks to @fatcerberus )

TypeScript Version: 3.0.0-dev.201xxxxx
TypeScript Version: 3.3.3

NOTE : I had enabled downlevelIteration

Code

const leitters = new Set([ 'Aa', 'Bb', 'Cc' ]);
const leitter: string = leitters[0];

Expected behavior:

Second line MUST error

Actual behavior:

No error is reported...

Playground Link: https://bit.ly/2HcxmJa

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions