-
Notifications
You must be signed in to change notification settings - Fork 161
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
Need non-sealed sealed external interface PromiseLike<out T> #2518
Comments
Do you mean, that sealed external interfaces don't exist? |
If all TS interfaces are inheritable,the “sealed” modifier is not needed. We cannot constrain JavaScript developers. In order to support various types of mappings to the greatest extent, I hope not to use “sealed”. Without type union, inheritance is used more frequently. |
Some necessary “sealed” can be retained. For example, when it comes to the correctness of compiling KotlinJS to JS. If it is just for “when” type judgment and giving up the correctness of wrapping for JS, I don't think it's worth it. |
It doesn't work in common case unfortunately. JFYI - PR is welcome |
Will you create PR? |
I will. |
When writing the wrapper for antd's
A type
MessageType
extends fromPromiseLike
whick is sealed.source:
https://github.com/ant-design/ant-design/blob/aa48a3cf4223a422be9d17f4aed2e9fb3aae1003/components/message/interface.ts#L49C1-L51C2
Can the official wrappers maintain the ability of inheritance relationship like in TypeScript? If an interface is inheritable in TypeScript, then do not add “sealed”.
The text was updated successfully, but these errors were encountered: