-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript Version: 3.2.0-dev.201xxxxx
Search Terms:
Code
const enum Weekday {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday
}
namespace Weekday {
export function isBusinessDay(day: Weekday) {
switch (day) {
case Weekday.Saturday:
case Weekday.Sunday:
return false;
default:
return true;
}
}
}
export default Weekday;
Expected behavior:
no errors.
Actual behavior:
got an error "Enum declarations can only merge with namespace or other enum declarations."
Related Issues:
#16804
I just found the realated issues, but no solution for me. I can't understand why this is not a bug. The playground shows what I expected in compilation.
I hope not to report an error, while the compilation result is exactly what I want.
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created