Description
see discussion here: microsoft/pxt#10559
the substring block requires length as a parameter but it's optional in the JavaScript. as a result, decompiling some code where you don't provide that parameter ends up giving you a block with a hole in it.
to fix this, we should deprecate the old block and make a new one where the parameter is optional (with a + button). because we can't rename this function, whoever does this will need to:
- create a new function with the same signature as
String.substring
(but with an underscore at the beginning) - copy the blockId/definition to the new API
- add a new blockId/definition to the original API with the optional parameter
- add the blockAliasFor annotation to the new API to point to the old API so that it gets compiled to the same JavaScript