consider allowing exhaustive switch statement · Issue #6155 · microsoft/TypeScript (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd

type foo = 'hey' | 'nay'; let value : foo = 'hey'; switch (value) { case 'hey': doThis(); break; case 'nay': doThat(); break; default: void; // <-- syntax TBD that indicates: 1. no other than known options are allowed 2. all known options must be considered }

Metadata

Metadata

Labels

Development

No branches or pull requests

Issue actions