Closed Christian24 closed 4 years ago
Could you try with the property dot syntax instead:
.type="${AlertType.SUCCESS}"
I tried that. It leads exactly to the same error.
Is a typescript
problem
Update your typescript version
typescript@3.8.0-dev.20200107
@runem this problem should mark it as closed
@herberthobregon is right, it was the Typescript version. 3.8 works great.
Hello,
I just started testing lit-analyzer and I noticed something with the way we use enums: Think about the following property:
AlertType
itself looks like this:Now it is very easy to use this since I can just go:
This works great since the enum at runtime just gets transpiled to a String and I do get code completion in my IDE. However, lit-analyzer does not recognize this and fails with
Type 'string' is not assignable to 'AlertType'
.