Allow separate read and write types for index signatures to support Proxies #45887
Closed
5 tasks done
Labels
Duplicate
An existing issue was already created
Suggestion
Es6
Proxy
is one of the most powerful and sweet features of JavaScript, it can particularly give JavaScript programmers ability to have different setter/getter behaviors on index properties. But TypeScript just ruins the experience, despite similar practices found largely in DOM Api's.If Typescript can't infer Proxy types, at least provide more powerful index signatures typing, allowing getter setter to have different types.
📃 Motivating Example
Now TypeScript wont allow this and I can't even set index signatures with varying signatures of getter and setter.
⭐ Suggestion
Infer Proxy types or at least support different getter/setter for index signatures like this.
🔍 Search Terms
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
Proxy type inferring, different getter/setter signatures on index properties, etc
✅ Viability Checklist
My suggestion meets these guidelines:
💻 Use Cases
Proxy support.
The text was updated successfully, but these errors were encountered: