microsoft / microsoft/pxt-microbit

The default value (0,10) in the randint function is not auto-complete in Micro:bit JavaScript

Open
#6,344 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted intellisense monaco P2
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug
The default parameters (0,10) in the randint function does not auto-complete in Micro:bit JavaScript.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to https://makecode.microbit.org/beta
  2. Create a new project with JavaScript only
  3. Typing basic.showNumber(randint) and observe

Actual behavior
The randint function in Micro:bit JavaScript does not auto-complete with its default parameters (0, 10)

Expected behavior
The randint function should auto-complete with its default parameters (0, 10) to assist users in writing correct and efficient code

Screen Recording
https://github.com/user-attachments/assets/0a9ff750-aaa6-4b88-bc66-d574e61e1752

Additional context
1.OS: iPad
2.Browser: Chrome, Firefox, Edge, Safari
3.makecode.microbit.org version: 7.1.42
4.Microsoft MakeCode version: 11.4.28

Contributor guide

Open the contributing guide

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

Start by reproducing the issue at https://makecode.microbit.org/beta in a JavaScript-only project, using basic.showNumber(randint) as described. Trace the Micro:bit JavaScript autocomplete behavior for randint and compare it with the expected (0, 10) suggestion. Done means the default parameters appear in autocomplete and the behavior is verified in the listed browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience, embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.