<@U33H6SB2B> question: why was the `JsVirtual` / `...
# javascript
e
@turansky question: why was the
JsVirtual
/
JsValue
mechanism implemented with sealed interfaces instead of enums. Is that because of technical limitations of external enums?
t
1. TS enum constans aren't unique (surprise)
Copy code
// valid TS enum
enum TSEnum {
    a = 1,
    b = 1,
    c = 1,
    d = 2,
    e = 2,
    ;
}
1. No enum = No runtime 2. Enum has additional properties/methods, which unions don't have 3. External enums deprecated (it's cool)
✔️ 1