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"
TypeScript Version: 2.7.0-dev.20171216 and older
Code
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: