annotate apis to support multiple forever blocks
This commit is contained in:
parent
52e67c6bfc
commit
a2755dc4d2
@ -112,7 +112,7 @@ namespace basic {
|
|||||||
* Repeats the code forever in the background. On each iteration, allows other codes to run.
|
* Repeats the code forever in the background. On each iteration, allows other codes to run.
|
||||||
* @param body code to execute
|
* @param body code to execute
|
||||||
*/
|
*/
|
||||||
//% help=basic/forever weight=55 blockGap=8
|
//% help=basic/forever weight=55 blockGap=8 blockAllowMultiple=1
|
||||||
//% blockId=device_forever block="forever" icon="\uf01e"
|
//% blockId=device_forever block="forever" icon="\uf01e"
|
||||||
void forever(Action a) {
|
void forever(Action a) {
|
||||||
if (a != 0) {
|
if (a != 0) {
|
||||||
|
@ -121,7 +121,7 @@ namespace control {
|
|||||||
/**
|
/**
|
||||||
* Schedules code that run in the background.
|
* Schedules code that run in the background.
|
||||||
*/
|
*/
|
||||||
//% help=control/in-background
|
//% help=control/in-background blockAllowMultiple=1
|
||||||
//% blockId="control_in_background" block="run in background" blockGap=8
|
//% blockId="control_in_background" block="run in background" blockGap=8
|
||||||
void inBackground(Action a) {
|
void inBackground(Action a) {
|
||||||
runInBackground(a);
|
runInBackground(a);
|
||||||
|
4
libs/core/shims.d.ts
vendored
4
libs/core/shims.d.ts
vendored
@ -195,7 +195,7 @@ declare namespace basic {
|
|||||||
* Repeats the code forever in the background. On each iteration, allows other codes to run.
|
* Repeats the code forever in the background. On each iteration, allows other codes to run.
|
||||||
* @param body code to execute
|
* @param body code to execute
|
||||||
*/
|
*/
|
||||||
//% help=basic/forever weight=55 blockGap=8
|
//% help=basic/forever weight=55 blockGap=8 blockAllowMultiple=1
|
||||||
//% blockId=device_forever block="forever" icon="\uf01e" shim=basic::forever
|
//% blockId=device_forever block="forever" icon="\uf01e" shim=basic::forever
|
||||||
function forever(a: () => void): void;
|
function forever(a: () => void): void;
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ declare namespace control {
|
|||||||
/**
|
/**
|
||||||
* Schedules code that run in the background.
|
* Schedules code that run in the background.
|
||||||
*/
|
*/
|
||||||
//% help=control/in-background
|
//% help=control/in-background blockAllowMultiple=1
|
||||||
//% blockId="control_in_background" block="run in background" blockGap=8 shim=control::inBackground
|
//% blockId="control_in_background" block="run in background" blockGap=8 shim=control::inBackground
|
||||||
function inBackground(a: () => void): void;
|
function inBackground(a: () => void): void;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user