-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
TypeScript Version: 1.8.34
Code
// A *self-contained* demonstration of the problem follows...
let extension: String = "bin";
switch (extension) {
case "txt", "xml":
return ResourceType.PlainText;
case "bmp", "jpg", "jpeg", "png", "tiff", "psd", "tga", "gif":
return ResourceType.Image;
case "mp3", "wav", "ogg", "flac", "wma", "m4a":
return ResourceType.Audio;
case "bin", "dat":
return ResourceType.Binary;
case "ico":
return ResourceType.Icon;
case "rc", "resx":
return ResourceType.ResourceScript;
default:
return ResourceType.Unknown;
}Expected behavior:
The Switch case will return the correct value based on the condition ex when extension == "bin" ResourceType.Binary should be returned
Actual behavior:
The Default value is always returned
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript