ezno
ezno copied to clipboard
Fix and figure out how multiple properties should be represented
Currently there is no difference in the representation of properties that are dependent once OR multiple times.
aka { [a: number]: "value" }
has under a context properties as [(PropertyKey::Type(*number type*), Property::Value(TypeId -> Type::Constant(Constant::String("value")))]
. There is no difference between this being a project with many keys that are number like OR a single key, which is of the type of number.
I think this can be solved by a separate variant Property
on the RHS called Property::Multiple(Box<Property>)
which denotes that the RHS property is dependent. This only makes sense if the LHS is PropertyKey::Type
though 🤔. Also the RHS needs depend of types from the LHS for type mappings in TypeScript 🤔🤔