-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
TypeScript Version: 2.7.0-dev.20171216 and older
Code
enum Test {
A = "a very long string value, such that you want to make it " +
"span multiple lines to meet some column limit"
}
Expected behavior:
Accepted.
Actual behavior:
error TS2352: Type 'string' cannot be converted to type 'Test'.
Adding some 'as Test' annotation didn't seem to work.
Workarounds:
- put it all on one very long line
- wrap in parens, add an "as any"
Metadata
Metadata
Assignees
Labels
Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript