Ability to set default values for arrays in functions
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
https://makecode.com/playground#basic-array-default-values
I want to request the ability to set default values for arrays in user-defined functions, for example to specify an array of numbers [1, 2, 3] rather than whatever [0, 1]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior in the linked MakeCode playground and inspect how user-defined function parameters are represented and compiled. Determine where array default values are restricted, then add coverage showing that a parameter can default to [1, 2, 3] rather than [0, 1]. Done means the example works consistently in the relevant editor and generated code.
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