You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typecast m as MyComponentM
interface MyComponentM
top as roSGNodeMyComponent
include AlphaM ' not married to this syntax, but this is the magic
end interface
sub init()
initAlpha()
print m.alpha ' this is known to be a boolean
end sub
The text was updated successfully, but these errors were encountered:
However, for multiple extension, I think we should do it how typescript does, with a type statement and type unions:
type ManyComponents = MyComponentM & AlphaM & roSGNodePoster
This would be even nicer if we eventually add inline interface types, because then you wouldn't have to name them ahead of time (not sure about the syntax, but something like this?):
type ManyComponents = AlphaM & roSGNodePoster & {
top as roSGNodeMyComponent
}
OK... Changing this topic to be "Support for type declarations and Intersection types"
markwpearce
changed the title
Support for "mixin" interfaces
Support for ~"mixin" interfaces~ type declarations and Intersection types
Nov 4, 2024
markwpearce
changed the title
Support for ~"mixin" interfaces~ type declarations and Intersection types
Support for type declarations and Intersection types
Nov 4, 2024
It would be nice be able to support "mixins" to interfaces...
Basically, some way of being able to say this interface is composed of these other interfaces:
Eg.
source/mixins/alpha.bs
:components/MyComponent.xml
components/MyComponent.bs
The text was updated successfully, but these errors were encountered: