ezno icon indicating copy to clipboard operation
ezno copied to clipboard

Fix and figure out how multiple properties should be represented

Open kaleidawave opened this issue 6 months ago • 0 comments

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 🤔🤔

kaleidawave avatar Dec 20 '23 20:12 kaleidawave