rokucommunity / rokucommunity/brighterscript

Suggestion: expose/export component functions

Open
#232 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi all! I'm relatively new reading and learning about Brighterscript language, and I like a lot this idea!

One thing I found when exposing functions is that sometimes I forgot to declare the <function> tag in the XML file, I know there is a runtime warning when you try to call a non-existent function in a node using callFunc, but I consider that could be a great idea to unify this in Brighterscript code, I think in something like this:

expose function sayHello (name as string) as string
    return "Hello, my name is " + string
end function

Reserved word can be expose or export, I like expose, but maybe someone has a better argument for using export.

That's it!

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

No files, tests, or entry points are named. Start by reviewing how BrighterScript currently declares functions and maps XML tags, then resolve whether expose or export is appropriate and define the syntax and compiler/runtime behavior before implementation; done means functions can be exposed from BrighterScript without a separate XML declaration.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.