I’m creating a custom block with quite weird formatting and whenever I go to blocks from javascript the function(){ }
parameter disappears.
This is the shape of block:
This is the code for the block:
//% value.defl=function () { }
//% block="JSON"
//% handlerStatement=1
export function json(handler: () => void): {} {
return {}
}
Once I go to the blocks tab, the code goes from this: custom.json(function() { })
to this: custom.json()
It also gives me this error:
Line 1: Expected 1 arguments, but got 0.
This is mainly for the MakeCode team, but if anyone else could help me that would be great!