Unfortunately I don’t think that functionality from TypeScript translates well to ReScript. The simple cases might (just the equivalent of dot access), but add on things like variants, tuples and more and we’d need likely need to invent more syntax, and do a pretty complicated lookup of types. This lookup would also be alot less useful than in TS. As an example, what if you have a variant where 2 cases has the same prop name, but the props have different types? In TS it’d become typeOfA | typeOfB because that’s how the TS type system works. But in ReScript you can’t mix types like that.
Then there’s the added question around whether to keep things as explicit as possible, which would favor not having this type of lookup. This is also the reason why we’ve rejected @as.
Personally, that functionality in TS has almost always caused more issues than it has solved in codebases I’ve worked in.
Could be explored for sure if someone is interested in taking a stab at investigating how a complete ReScript version of that feature could look/work. But, just like when considering @as, I think we need to keep this type of thing simple to start out.