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
We should have a way to declare all (or almost all) built-in roku types in typedefs. This would provide several benefits:
more flexibility for contributors wanting to improve the documentation on the native types
more options for separating certain features into different libraries (like brightscript, brightsign, maybe future versions of brightscript with new features)
enables developers to use that same syntax to declare objects in their own code that might not be public knowledge (i.e. internal roku projects, select partners, etc).
I envision we move all of the built-in types and objects and components and interfaces into a single folder (maybe libs/brightscript.d.bs, and here is the syntax I'm currently envisioning.
the native interfaces can probably just use the existing interface keyword
"brightscript components" use the object keyword". We need a way to "spread" all of the functions of an interface onto the object. Maybe that's how "implements" works for object, or maybe we have some extra syntax to say "I'm not going to write them again, just copy them onto this thing".
objectroDateTimeimplementsifDateTime, ifToStr'objects can also have concrete methods declare on them, if you want to make an interface for themfunctionsomeNonInteraceFunc() asintegerendobject
components would use the component keyword (like the component statement syntax mentioned in Component Statement #575)
We should have a way to declare all (or almost all) built-in roku types in typedefs. This would provide several benefits:
I envision we move all of the built-in types and objects and components and interfaces into a single folder (maybe
libs/brightscript.d.bs, and here is the syntax I'm currently envisioning.the native interfaces can probably just use the existing
interface keyword"brightscript components" use the
objectkeyword". We need a way to "spread" all of the functions of an interface onto the object. Maybe that's how "implements" works forobject, or maybe we have some extra syntax to say "I'm not going to write them again, just copy them onto this thing".components would use the
componentkeyword (like the component statement syntax mentioned in Component Statement #575)Declaring these items with the
declarekeyword in a d.bs file might allow them to be exposed globally to the program. Like this: