-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strong interfaces #1817
Comments
Can you share the error you're getting and give more code to demonstrate the issue? I'm not able to reproduce any errors with your code. I'm not sure what you mean by strong interfaces because I can't tell what they're trying to solve. |
I think what he means is that if he changes new Article({id: 1, title: "Title", text: "Hello" /* this doesn't thrown an error - could a strong interface solve this? */ }); Also, applying a comment to this object does something weird .... PLAYGROUND observe the generated js code. |
Problem is no error occurs if i rename the member |
@cevek Will this code be correct in your case ? strong interface A {
name?: string;
}
class B implements A {
name: string;
other: number;
} |
See #391 |
if I rename property
text?
todescription?
in interfaceIArticle
no error occursand I dont know what went wrong in my code
How about strong interfaces?
And if object with this interface has over properties then compiler will throw an error
The text was updated successfully, but these errors were encountered: