don't use blockStatement anymore
This commit is contained in:
parent
c2883d00ee
commit
0c7d49256d
@ -151,7 +151,7 @@ namespace control {
|
||||
* Raises an event in the event bus.
|
||||
*/
|
||||
//% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src=control_event_source|with value %value=control_event_value"
|
||||
//% blockExternalInputs=1 blockStatement=1
|
||||
//% blockExternalInputs=1
|
||||
void onEvent(int src, int value, Action handler) {
|
||||
registerWithDal(src, value, handler);
|
||||
}
|
||||
|
2
libs/microbit/shims.d.ts
vendored
2
libs/microbit/shims.d.ts
vendored
@ -340,7 +340,7 @@ declare namespace control {
|
||||
* Raises an event in the event bus.
|
||||
*/
|
||||
//% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src=control_event_source|with value %value=control_event_value"
|
||||
//% blockExternalInputs=1 blockStatement=1 shim=control::onEvent
|
||||
//% blockExternalInputs=1 shim=control::onEvent
|
||||
function onEvent(src: number, value: number, handler: () => void): void;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user