rokucommunity / rokucommunity/brighterscript

Support more specific types on component interface fields

Open
#1,262 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

When we define component interfaces, we should support more specific types that can further improve the type system.

<component name="MyComponent">
    <interface>
        <field id="someNode" type="MAKE_ME_MORE_AWESOME" />
    </interface>
</component>

  1. More specific component types instead of the generic node:
    Instead of
<field id="someNode" type="node" />

We could support

<field id="someNode" type="roSGNodeContentNode" />
  1. enums instead of strings or integers
    Instead of
<field id="someNode" type="SomeInterface" />

Could be

enum RemoteDirection
    up="up
    down="down"
end interface
<field id="direction" type="RemoteDirection" />

and much more. There are many edge cases to work out here. We could start with component types, and expand upon it later.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by tracing how component interface fields and the generic node type are represented, then define the first component-type cases to support. Done means a component field can declare a specific component type and the type system handles it; enum support is explicitly later work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.