Stricter disjunction of interfaces #54051
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Uh oh!
There was an error while loading. Please reload this page.
Suggestion
🔍 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.
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
📃 Motivating Example
Disjunction of interfaces can lead to an error
Here is example 1:
Problem: Typescript didn't find the error of type mismatch.
Example 2:
Signature of
modifyObject
is same, but now code is correct.Example 3:
It would be better if interface disjunction handled getters and setters
In this form, it will lead to breaking changes, so there can be 2 options:
but this seems impossible
The text was updated successfully, but these errors were encountered: