pxt-core 7.4.1 → 7.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/built/pxt.js CHANGED
@@ -139059,6 +139059,7 @@ var ts;
139059
139059
  }
139060
139060
  service.snippetAddsDefinitions = snippetAddsDefinitions;
139061
139061
  function getSnippet(context, fn, decl, python, recursionDepth = 0) {
139062
+ var _a;
139062
139063
  // TODO: a lot of this is duplicate logic with blocklyloader.ts:buildBlockFromDef; we should
139063
139064
  // unify these approaches
139064
139065
  let { apis, takenNames, blocksInfo, screenSize, checker } = context;
@@ -139091,10 +139092,15 @@ var ts;
139091
139092
  if (attrs.shim === "TD_ID" && recursionDepth && decl.parameters.length) {
139092
139093
  return getParameterDefault(decl.parameters[0]);
139093
139094
  }
139095
+ const element = fn;
139096
+ const params = pxt.blocks.compileInfo(element);
139094
139097
  const blocksById = blocksInfo.blocksById;
139095
139098
  // TODO: move out of getSnippet for general reuse
139099
+ const blockParameters = ((_a = attrs._def) === null || _a === void 0 ? void 0 : _a.parameters.filter(param => !!params.definitionNameToParam[param.name]).map(param => params.definitionNameToParam[param.name].actualName)) || [];
139096
139100
  const includedParameters = decl.parameters ? decl.parameters
139097
- .filter(param => !param.initializer && !param.questionToken) : [];
139101
+ // Only keep required parameters and parameters included in the blockdef
139102
+ .filter(param => (!param.initializer && !param.questionToken)
139103
+ || (blockParameters.indexOf(param.name.getText()) >= 0)) : [];
139098
139104
  const args = includedParameters
139099
139105
  .map(getParameterDefault)
139100
139106
  .map(p =>
@@ -139104,7 +139110,6 @@ var ts;
139104
139110
  default: p,
139105
139111
  isLiteral: true
139106
139112
  }));
139107
- const element = fn;
139108
139113
  if (element.attributes.block) {
139109
139114
  if (element.attributes.defaultInstance) {
139110
139115
  snippetPrefix = element.attributes.defaultInstance;
@@ -139152,7 +139157,6 @@ var ts;
139152
139157
  isInstance = true;
139153
139158
  }
139154
139159
  else if (element.kind == 1 /* Method */ || element.kind == 2 /* Property */) {
139155
- const params = pxt.blocks.compileInfo(element);
139156
139160
  if (params.thisParameter) {
139157
139161
  let varName = undefined;
139158
139162
  if (params.thisParameter.definitionName) {
@@ -18255,6 +18255,7 @@ var ts;
18255
18255
  }
18256
18256
  service.snippetAddsDefinitions = snippetAddsDefinitions;
18257
18257
  function getSnippet(context, fn, decl, python, recursionDepth = 0) {
18258
+ var _a;
18258
18259
  // TODO: a lot of this is duplicate logic with blocklyloader.ts:buildBlockFromDef; we should
18259
18260
  // unify these approaches
18260
18261
  let { apis, takenNames, blocksInfo, screenSize, checker } = context;
@@ -18287,10 +18288,15 @@ var ts;
18287
18288
  if (attrs.shim === "TD_ID" && recursionDepth && decl.parameters.length) {
18288
18289
  return getParameterDefault(decl.parameters[0]);
18289
18290
  }
18291
+ const element = fn;
18292
+ const params = pxt.blocks.compileInfo(element);
18290
18293
  const blocksById = blocksInfo.blocksById;
18291
18294
  // TODO: move out of getSnippet for general reuse
18295
+ const blockParameters = ((_a = attrs._def) === null || _a === void 0 ? void 0 : _a.parameters.filter(param => !!params.definitionNameToParam[param.name]).map(param => params.definitionNameToParam[param.name].actualName)) || [];
18292
18296
  const includedParameters = decl.parameters ? decl.parameters
18293
- .filter(param => !param.initializer && !param.questionToken) : [];
18297
+ // Only keep required parameters and parameters included in the blockdef
18298
+ .filter(param => (!param.initializer && !param.questionToken)
18299
+ || (blockParameters.indexOf(param.name.getText()) >= 0)) : [];
18294
18300
  const args = includedParameters
18295
18301
  .map(getParameterDefault)
18296
18302
  .map(p =>
@@ -18300,7 +18306,6 @@ var ts;
18300
18306
  default: p,
18301
18307
  isLiteral: true
18302
18308
  }));
18303
- const element = fn;
18304
18309
  if (element.attributes.block) {
18305
18310
  if (element.attributes.defaultInstance) {
18306
18311
  snippetPrefix = element.attributes.defaultInstance;
@@ -18348,7 +18353,6 @@ var ts;
18348
18353
  isInstance = true;
18349
18354
  }
18350
18355
  else if (element.kind == 1 /* Method */ || element.kind == 2 /* Property */) {
18351
- const params = pxt.blocks.compileInfo(element);
18352
18356
  if (params.thisParameter) {
18353
18357
  let varName = undefined;
18354
18358
  if (params.thisParameter.definitionName) {
package/built/target.js CHANGED
@@ -1 +1 @@
1
- var pxtTargetBundle = {"id":"core","name":"Microsoft MakeCode","title":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","bundleddirs":[],"compile":{"hasHex":false,"jsRefCounting":false,"switches":{},"noSourceInFlash":true,"utf8":true},"appTheme":{"logoUrl":"https://makecode.com/","logo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","docsLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","portraitLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","organizationLogo":"@cdnUrl@/blob/106597ae039a275897661651b96856220c9b0fad/static/orglogo.png","organizationWideLogo":"@cdnUrl@/blob/d6139e3d0af51f02aa5f8765ecb0985acbd98551/static/orglogowide.png","homeUrl":"https://makecode.com/","cardLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","appLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","crowdinProject":"kindscript","docMenu":[{"name":"About","path":"/about"},{"name":"Docs","path":"/docs"},{"name":"Blog","path":"/blog"}],"hideDocsEdit":true,"hideDocsSimulator":true,"TOC":[{"name":"About MakeCode","path":"/about","subitems":[]},{"name":"Blog","path":"/blog","subitems":[]},{"name":"Online Learning","path":"/online-learning","subitems":[]},{"name":"Contact Us","path":"/contact","subitems":[]},{"name":"Tools","path":"/tools","subitems":[]},{"name":"Technical Docs","path":"/docs","subitems":[{"name":"JS Editor Features","path":"/js/editor","subitems":[]},{"name":"Programming Language","path":"/language","subitems":[]},{"name":"Async Functions","path":"/async","subitems":[]},{"name":"Partial Flashing","path":"/partial-flashing","subitems":[]},{"name":"Source Embedding","path":"/source-embedding","subitems":[]},{"name":"Updating Blockly Version","path":"/develop/blocklyupgrade","subitems":[]},{"name":"Accessibility","path":"/develop/accessibility","subitems":[]},{"name":"Profiling","path":"/js/profiling","subitems":[]},{"name":"Debugging Hardware","path":"/develop/hw-debugging","subitems":[]}]},{"name":"Creating Targets","path":"/target-creation","subitems":[{"name":"pxtarget.json","path":"/targets/pxtarget","subitems":[]},{"name":"Defining Blocks","path":"/defining-blocks","subitems":[]},{"name":"Auto-generation of .d.ts","path":"/simshim","subitems":[]},{"name":"Static File Drops","path":"/cli/staticpkg","subitems":[]},{"name":"Simulator","path":"/targets/simulator","subitems":[]},{"name":"Theming Editor","path":"/targets/theming","subitems":[]},{"name":"Embedding resources","path":"/jres","subitems":[]}]},{"name":"Creating Extensions","path":"/extensions","subitems":[{"name":"Getting started","path":"/extensions/getting-started","subitems":[]},{"name":"pxt.json","path":"/extensions/pxt-json","subitems":[]},{"name":"Extension versioning","path":"/extensions/versioning","subitems":[]},{"name":"Extension localization","path":"/extensions/localization","subitems":[]},{"name":"Extension approval","path":"/extensions/approval","subitems":[]},{"name":"Editor extensions","path":"/extensions/extensions","subitems":[]},{"name":"GitHub Extension Authoring","path":"/extensions/github-authoring","subitems":[]}]},{"name":"Writing Docs","path":"/writing-docs","subitems":[{"name":"Macros","path":"/writing-docs/macros","subitems":[]},{"name":"Anchors","path":"/writing-docs/anchors","subitems":[]},{"name":"Tutorials","path":"/writing-docs/tutorials","subitems":[]},{"name":"User Tutorials","path":"/writing-docs/user-tutorials","subitems":[]},{"name":"Skillmaps","path":"/writing-docs/skillmaps","subitems":[]},{"name":"Routing","path":"/writing-docs/routing","subitems":[]},{"name":"Testing","path":"/writing-docs/testing","subitems":[]}]},{"name":"Translations","path":"/translate","subitems":[]},{"name":"Blocks Embedding","path":"/blocks-embed","subitems":[]},{"name":"Command Line Interface","path":"/cli","subitems":[{"name":"install","path":"/cli/install","subitems":[]},{"name":"build","path":"/cli/build","subitems":[]},{"name":"bump","path":"/cli/bump","subitems":[]},{"name":"deploy","path":"/cli/deploy","subitems":[]},{"name":"console","path":"/cli/console","subitems":[]},{"name":"gdb","path":"/cli/gdb","subitems":[]},{"name":"staticpkg","path":"/cli/staticpkg","subitems":[]},{"name":"update","path":"/cli/update","subitems":[]},{"name":"pyconv","path":"/cli/pyconv","subitems":[]},{"name":"hidserial","path":"/cli/hidserial","subitems":[]},{"name":"hiddmesg","path":"/cli/hiddmesg","subitems":[]},{"name":"login","path":"/cli/login","subitems":[]}]},{"name":"Labs","path":"/labs","subitems":[]},{"name":"UF2 File Format","path":"https://github.com/microsoft/uf2","subitems":[]},{"name":"Accessibility","path":"/accessibility","subitems":[]},{"name":"Telemetry","path":"/telemetry","subitems":[]}],"embedUrl":"https://makecode.com/","id":"core","title":"Microsoft MakeCode","name":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","htmlDocIncludes":{}},"uploadDocs":true,"versions":{"branch":"v7.4.1","tag":"v7.4.1","commits":"https://github.com/microsoft/pxt/commits/7ca982b27dfd5506b3d7c4d514d61b51d27054fb","target":"7.4.1","pxt":"7.4.1"},"blocksprj":{"id":"blocksprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"tsprj":{"id":"tsprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"bundledpkgs":{},"apiInfo":{"libs/blocksprj":{"apis":{"byQName":{"Array":{"kind":5,"retType":"","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."}},"Array.length":{"kind":2,"retType":"number","attributes":{"weight":84,"blockId":"lists_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"arrays","jsDoc":"Get or set the length of an array. This number is one more than the index of the last element the array.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"Array.push":{"kind":-1,"attributes":{"help":"arrays/push","weight":50,"blockId":"array_push","block":"%list| add value %value| to end","blockNamespace":"arrays","group":"Modify","paramHelp":{"items":"New elements of the Array."},"jsDoc":"Append a new element to an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" add value ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" to end","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","type":"T"}],"isInstance":true,"pyQName":"Array.append"},"Array.concat":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayConcat","weight":40,"paramHelp":{"arr":"The other array that is being concatenated with"},"jsDoc":"Concatenates the values with another array."},"parameters":[{"name":"arr","description":"The other array that is being concatenated with","type":"T[]"}],"isInstance":true},"Array.pop":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pop","weight":45,"blockId":"array_pop","block":"get and remove last value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"get and remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.reverse":{"kind":-1,"attributes":{"help":"arrays/reverse","helper":"arrayReverse","weight":10,"blockId":"array_reverse","block":"reverse %list","blockNamespace":"arrays","group":"Operations","jsDoc":"Reverse the elements in an array. The first array element becomes the last, and the last array element becomes the first.","_def":{"parts":[{"kind":"label","text":"reverse ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.shift":{"kind":-1,"retType":"T","attributes":{"help":"arrays/shift","helper":"arrayShift","weight":30,"blockId":"array_shift","block":"get and remove first value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"get and remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.unshift":{"kind":-1,"retType":"number","attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":25,"blockId":"array_unshift","block":"%list| insert %value| at beginning","blockNamespace":"arrays","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true},"Array.slice":{"kind":-1,"retType":"T[]","attributes":{"paramDefl":{"start":"0","end":"0"},"help":"arrays/slice","helper":"arraySlice","weight":41,"blockNamespace":"arrays","paramHelp":{"start":"The beginning of the specified portion of the array. eg: 0","end":"The end of the specified portion of the array. eg: 0"},"jsDoc":"Return a section of an array."},"parameters":[{"name":"start","description":"The beginning of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"},{"name":"end","description":"The end of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"}],"isInstance":true},"Array.splice":{"kind":-1,"attributes":{"paramDefl":{"start":"0","deleteCount":"0"},"helper":"arraySplice","weight":40,"paramHelp":{"start":"The zero-based location in the array from which to start removing elements. eg: 0","deleteCount":"The number of elements to remove. eg: 0"},"jsDoc":"Remove elements from an array."},"parameters":[{"name":"start","description":"The zero-based location in the array from which to start removing elements. eg: 0","default":"0"},{"name":"deleteCount","description":"The number of elements to remove. eg: 0","default":"0"}],"isInstance":true},"Array.join":{"kind":-1,"retType":"string","attributes":{"helper":"arrayJoin","weight":40,"paramHelp":{"sep":"the string separator"},"jsDoc":"joins all elements of an array into a string and returns this string."},"parameters":[{"name":"sep","description":"the string separator","type":"string","initializer":"undefined"}],"isInstance":true},"Array.some":{"kind":-1,"retType":"boolean","attributes":{"helper":"arraySome","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether at least one element in the array passes the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.every":{"kind":-1,"retType":"boolean","attributes":{"helper":"arrayEvery","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether all elements in the array pass the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.sort":{"kind":-1,"retType":"T[]","attributes":{"helper":"arraySort","weight":40,"paramHelp":{"specifies":"a function that defines the sort order. If omitted, the array is sorted according to the prmitive type"},"jsDoc":"Sort the elements of an array in place and returns the array. The sort is not necessarily stable."},"parameters":[{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"isInstance":true},"Array.map":{"kind":-1,"retType":"U[]","attributes":{"helper":"arrayMap","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array, and return an array containing the results."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.forEach":{"kind":-1,"attributes":{"helper":"arrayForEach","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true,"pyQName":"Array.for_each"},"Array.filter":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFilter","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array."},"jsDoc":"Return the elements of an array that meet the condition specified in a callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.fill":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFill","weight":39,"jsDoc":"Fills all the elements of an array from a start index to an end index with a static value. The end index is not included."},"parameters":[{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"isInstance":true},"Array.find":{"kind":-1,"retType":"T","attributes":{"helper":"arrayFind","weight":40,"paramHelp":{"callbackfn":""},"jsDoc":"Returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned."},"parameters":[{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.reduce":{"kind":-1,"retType":"U","attributes":{"helper":"arrayReduce","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","initialValue":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."},"jsDoc":"Call the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","description":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.","type":"U"}],"isInstance":true},"Array.removeElement":{"kind":-1,"retType":"boolean","attributes":{"weight":48,"jsDoc":"Remove the first occurence of an object. Returns true if removed."},"parameters":[{"name":"element","type":"T"}],"isInstance":true,"pyQName":"Array.remove_element"},"Array.removeAt":{"kind":-1,"retType":"T","attributes":{"help":"arrays/remove-at","weight":47,"blockId":"array_removeat","block":"%list| get and remove value at %index","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" get and remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array.remove_at"},"Array.insertAt":{"kind":-1,"attributes":{"paramDefl":{"index":"0","the":"0"},"help":"arrays/insert-at","weight":20,"blockId":"array_insertAt","block":"%list| insert at %index| value %value","blockNamespace":"arrays","group":"Modify","paramHelp":{"index":"the zero-based position in the list to insert the value, eg: 0","the":"value to insert, eg: 0"},"jsDoc":"Insert the value at a particular index, increases length by 1","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert at ","style":[]},{"kind":"param","name":"index","ref":false},{"kind":"break"},{"kind":"label","text":" value ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"index","description":"the zero-based position in the list to insert the value, eg: 0","default":"0"},{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array.insert_at"},"Array.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"arrays/index-of","weight":40,"blockId":"array_indexof","block":"%list| find index of %value","blockNamespace":"arrays","group":"Operations","paramHelp":{"item":"The value to locate in the array.","fromIndex":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0."},"jsDoc":"Return the index of the first occurrence of a value in an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" find index of ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","description":"The value to locate in the array.","type":"T"},{"name":"fromIndex","description":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.","initializer":"undefined"}],"isInstance":true,"pyQName":"Array.index"},"Array.get":{"kind":-1,"retType":"T","attributes":{"paramDefl":{"index":"0"},"help":"arrays/get","weight":85,"paramHelp":{"index":"the zero-based position in the list of the item, eg: 0"},"jsDoc":"Get the value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list of the item, eg: 0","default":"0"}],"isInstance":true},"Array.set":{"kind":-1,"attributes":{"paramDefl":{"index":"0","value":"0"},"help":"arrays/set","weight":84,"paramHelp":{"index":"the zero-based position in the list to store the value, eg: 0","value":"the value to insert, eg: 0"},"jsDoc":"Store a value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list to store the value, eg: 0","default":"0"},{"name":"value","description":"the value to insert, eg: 0","type":"T","default":"0"}],"isInstance":true},"Array._pickRandom":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pick-random","helper":"arrayPickRandom","weight":25,"blockId":"array_pickRandom","block":"get random value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Return a random value from the array","_def":{"parts":[{"kind":"label","text":"get random value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pick_random"},"Array._unshiftStatement":{"kind":-1,"attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":24,"blockId":"array_unshift_statement","block":"%list| insert %value| at beginning","blockNamespace":"arrays","blockAliasFor":"Array.unshift","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array._unshift_statement"},"Array._popStatement":{"kind":-1,"attributes":{"help":"arrays/pop","weight":44,"blockId":"array_pop_statement","block":"remove last value from %list","blockNamespace":"arrays","blockAliasFor":"Array.pop","group":"Modify","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pop_statement"},"Array._shiftStatement":{"kind":-1,"attributes":{"help":"arrays/shift","helper":"arrayShift","weight":29,"blockId":"array_shift_statement","block":"remove first value from %list","blockNamespace":"arrays","blockAliasFor":"Array.shift","group":"Modify","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._shift_statement"},"Array._removeAtStatement":{"kind":-1,"attributes":{"help":"arrays/remove-at","weight":14,"blockId":"array_removeat_statement","block":"%list| remove value at %index","blockNamespace":"arrays","blockAliasFor":"Array.removeAt","group":"Modify","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array._remove_at_statement"},"String":{"kind":5,"retType":"","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."}},"String.concat":{"kind":-1,"retType":"string","attributes":{"weight":49,"blockId":"string_concat","blockNamespace":"text","paramHelp":{"other":"The string to append to the end of the string."},"jsDoc":"Returns a string that contains the concatenation of two or more strings."},"parameters":[{"name":"other","description":"The string to append to the end of the string.","type":"string"}],"isInstance":true},"String.charAt":{"kind":-1,"retType":"string","attributes":{"weight":48,"help":"text/char-at","blockId":"string_get","block":"char from %this=text|at %pos","blockNamespace":"text","paramHelp":{"index":"The zero-based index of the desired character."},"jsDoc":"Return the character at the specified index.","_def":{"parts":[{"kind":"label","text":"char from ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"pos","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"pos","ref":false}]}},"parameters":[{"name":"index","description":"The zero-based index of the desired character."}],"isInstance":true,"pyQName":"String.char_at"},"String.length":{"kind":2,"retType":"number","attributes":{"property":"true","weight":47,"blockId":"text_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"text","jsDoc":"Returns the length of a String object.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"String.charCodeAt":{"kind":-1,"retType":"number","attributes":{"paramHelp":{"index":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."},"jsDoc":"Return the Unicode value of the character at the specified location."},"parameters":[{"name":"index","description":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."}],"isInstance":true,"pyQName":"String.char_code_at"},"String.compare":{"kind":-1,"retType":"number","attributes":{"help":"text/compare","blockId":"string_compare","block":"compare %this=text| to %that","blockNamespace":"text","paramHelp":{"that":"String to compare to target string"},"jsDoc":"See how the order of characters in two strings is different (in ASCII encoding).","_def":{"parts":[{"kind":"label","text":"compare ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" to ","style":[]},{"kind":"param","name":"that","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"that","ref":false}]}},"parameters":[{"name":"that","description":"String to compare to target string","type":"string"}],"isInstance":true},"String.substr":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0","length":"10"},"helper":"stringSubstr","help":"text/substr","blockId":"string_substr","block":"substring of %this=text|from %start|of length %length","blockNamespace":"text","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","length":"number of characters to extract, eg: 10"},"jsDoc":"Return a substring of the current string.","_def":{"parts":[{"kind":"label","text":"substring of ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"from ","style":[]},{"kind":"param","name":"start","ref":false},{"kind":"break"},{"kind":"label","text":"of length ","style":[]},{"kind":"param","name":"length","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"start","ref":false},{"kind":"param","name":"length","ref":false}]}},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"length","description":"number of characters to extract, eg: 10","initializer":"undefined","default":"10"}],"isInstance":true},"String.replace":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplace","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with the first occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true},"String.replaceAll":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplaceAll","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with each occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true,"pyQName":"String.replace_all"},"String.slice":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0"},"helper":"stringSlice","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","end":"one-past-last character index"},"jsDoc":"Return a substring of the current string."},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"end","description":"one-past-last character index","initializer":"undefined"}],"isInstance":true},"String.isEmpty":{"kind":-1,"retType":"boolean","attributes":{"helper":"stringEmpty","help":"text/is-empty","blockId":"string_isempty","blockNamespace":"text","block":"%this=text| is empty","jsDoc":"Returns a value indicating if the string is empty","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" is empty","style":[]}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"String.is_empty"},"String.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"text/index-of","blockId":"string_indexof","blockNamespace":"text","block":"%this=text|find index of %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Returns the position of the first occurrence of a specified value in a string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"find index of ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true,"pyQName":"String.index_of"},"String.includes":{"kind":-1,"retType":"boolean","attributes":{"help":"text/includes","blockId":"string_includes","blockNamespace":"text","block":"%this=text|includes %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Determines whether a string contains the characters of a specified string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"includes ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true},"String.split":{"kind":-1,"retType":"string[]","attributes":{"helper":"stringSplit","help":"text/split","blockId":"string_split","blockNamespace":"text","block":"split %this=text|at %separator","paramHelp":{"separator":"@param limit"},"jsDoc":"Splits the string according to the separators","_def":{"parts":[{"kind":"label","text":"split ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"separator","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"separator","ref":false}]}},"parameters":[{"name":"separator","description":"@param limit","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"isInstance":true},"String.trim":{"kind":-1,"retType":"string","attributes":{"helper":"stringTrim","jsDoc":"Return a substring of the current string with whitespace removed from both ends"},"parameters":[],"isInstance":true},"String.toUpperCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToUpperCase","help":"text/to-upper-case","jsDoc":"Converts the string to upper case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_upper_case"},"String.toLowerCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToLowerCase","help":"text/to-lower-case","jsDoc":"Converts the string to lower case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_lower_case"},"parseFloat":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123","s":"123"},"help":"text/parse-float","blockId":"string_parsefloat","block":"parse to number %text","blockNamespace":"text","explicitDefaults":["text"],"paramHelp":{"s":"A string to convert into a number. eg: 123"},"jsDoc":"Convert a string to a number.","_def":{"parts":[{"kind":"label","text":"parse to number ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","type":"string","initializer":"123","default":"123"}],"pyQName":"parse_float"},"randint":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random","block":"pick random %min|to %limit","blockNamespace":"Math","help":"math/randint","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}]},"Object":{"kind":5,"retType":""},"Function":{"kind":9,"retType":"Function","extendsTypes":[]},"Function.__assignableToFunction":{"kind":2,"retType":"Function","isInstance":true},"IArguments":{"kind":9,"retType":"IArguments","extendsTypes":[]},"IArguments.__assignableToIArguments":{"kind":2,"retType":"IArguments","isInstance":true},"RegExp":{"kind":9,"retType":"RegExp","extendsTypes":[]},"RegExp.__assignableToRegExp":{"kind":2,"retType":"RegExp","isInstance":true},"Boolean":{"kind":9,"retType":"Boolean","extendsTypes":[]},"Boolean.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of an object."},"parameters":[],"isInstance":true,"pyQName":"Boolean.to_string"},"String@type":{"kind":9,"retType":"String","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."},"extendsTypes":[],"pyQName":"String"},"String.fromCharCode":{"kind":-3,"retType":"string","attributes":{"help":"math/from-char-code","weight":1,"blockNamespace":"text","blockId":"stringFromCharCode","block":"text from char code %code","jsDoc":"Make a string from the given ASCII character code.","_def":{"parts":[{"kind":"label","text":"text from char code ","style":[]},{"kind":"param","name":"code","ref":false}],"parameters":[{"kind":"param","name":"code","ref":false}]}},"parameters":[{"name":"code"}],"pyQName":"String.from_char_code"},"Number":{"kind":5,"retType":""},"Number.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of a number."},"parameters":[],"isInstance":true,"pyQName":"Number.to_string"},"Array@type":{"kind":9,"retType":"T[]","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."},"extendsTypes":[],"pyQName":"Array"},"Array.isArray":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given object is an array."},"parameters":[{"name":"obj","type":"any"}],"pyQName":"Array.is_array"},"Object@type":{"kind":9,"retType":"Object","extendsTypes":[],"pyQName":"Object"},"Object.keys":{"kind":-3,"retType":"string[]","attributes":{"jsDoc":"Return the field names in an object."},"parameters":[{"name":"obj","type":"any"}]},"Math":{"kind":5,"retType":"","attributes":{"jsDoc":"More complex operations with numbers."}},"Math.pow":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The base value of the expression.","y":"The exponent value of the expression."},"jsDoc":"Returns the value of a base expression taken to a specified power."},"parameters":[{"name":"x","description":"The base value of the expression."},{"name":"y","description":"The exponent value of the expression."}]},"Math.random":{"kind":-3,"retType":"number","attributes":{"help":"math/random","jsDoc":"Returns a pseudorandom number between 0 and 1."},"parameters":[]},"Math.randomRange":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random_deprecated","block":"pick random %min|to %limit","help":"math/random-range","deprecated":"true","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}],"pyQName":"Math.random_range"},"Math.log":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns the natural logarithm (base e) of a number."},"parameters":[{"name":"x","description":"A number"}]},"Math.exp":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns returns ``e^x``."},"parameters":[{"name":"x","description":"A number"}]},"Math.sin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the sine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.cos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the cosine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.tan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the tangent of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.asin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arcsine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.acos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arccosine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arctangent (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan2":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"y":"A number","x":"A number"},"jsDoc":"Returns the arctangent of the quotient of its arguments."},"parameters":[{"name":"y","description":"A number"},{"name":"x","description":"A number"}]},"Math.sqrt":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the square root of a number."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.ceil":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the smallest number greater than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.floor":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the greatest number less than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.trunc":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the number with the decimal part truncated."},"parameters":[{"name":"x","description":"A numeric expression."}],"pyQName":"int"},"Math.round":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The value to be rounded to the nearest number."},"jsDoc":"Returns a supplied numeric expression rounded to the nearest number."},"parameters":[{"name":"x","description":"The value to be rounded to the nearest number."}]},"Math.imul":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit multiplication of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"Math.idiv":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit division of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"control":{"kind":5,"retType":""},"control._onCodeStart":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_start"},"control._onCodeStop":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_stop"},"NaN":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing Not-A-Number."},"pyQName":"na_n"},"Infinity":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing positive infinity."},"pyQName":"infinity"},"isNaN":{"kind":-3,"retType":"boolean","parameters":[{"name":"x"}],"pyQName":"is_na_n"},"Number@type":{"kind":9,"retType":"Number","extendsTypes":[],"pyQName":"Number"},"Number.isNaN":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given value is of type Number and it is a NaN."},"parameters":[{"name":"x","type":"any"}],"pyQName":"Number.is_na_n"},"StringMap":{"kind":9,"retType":"StringMap","attributes":{"jsDoc":"A dictionary from string key to string values"},"extendsTypes":[]},"parseInt":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123"},"help":"text/parse-int","blockId":"string_parseint","block":"parse to integer %text","blockNamespace":"text","explicitDefaults":["text"],"blockHidden":true,"paramHelp":{"text":"A string to convert into an integral number. eg: \"123\"","radix":"optional A value between 2 and 36 that specifies the base of the number in text."},"jsDoc":"Convert a string to an integer.\n\n\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\nAll other strings are considered decimal.","_def":{"parts":[{"kind":"label","text":"parse to integer ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","description":"A string to convert into an integral number. eg: \"123\"","type":"string","initializer":"123","default":"123"},{"name":"radix","description":"optional A value between 2 and 36 that specifies the base of the number in text.","initializer":"undefined"}],"pyQName":"int"},"helpers":{"kind":5,"retType":""},"helpers.arrayFill":{"kind":-3,"retType":"T[]","parameters":[{"name":"O","type":"T[]"},{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_fill"},"helpers.arraySplice":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"start"},{"name":"len"}],"pyQName":"helpers.array_splice"},"helpers.arrayReverse":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_reverse"},"helpers.arrayShift":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_shift"},"helpers.arrayJoin":{"kind":-3,"retType":"string","parameters":[{"name":"arr","type":"T[]"},{"name":"sep","type":"string","initializer":"undefined"}],"pyQName":"helpers.array_join"},"helpers.arrayUnshift":{"kind":-3,"retType":"number","parameters":[{"name":"arr","type":"T[]"},{"name":"value","type":"T"}],"pyQName":"helpers.array_unshift"},"helpers.arraySort":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"pyQName":"helpers.array_sort"},"helpers.arrayMap":{"kind":-3,"retType":"U[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_map"},"helpers.arraySome":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_some"},"helpers.arrayEvery":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_every"},"helpers.arrayForEach":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_for_each"},"helpers.arrayFilter":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_filter"},"helpers.arrayFind":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_find"},"helpers.arrayReduce":{"kind":-3,"retType":"U","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","type":"U"}],"pyQName":"helpers.array_reduce"},"helpers.arrayConcat":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"otherArr","type":"T[]"}],"pyQName":"helpers.array_concat"},"helpers.arrayPickRandom":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_pick_random"},"helpers.arraySlice":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_slice"},"helpers.stringReplace":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace"},"helpers.stringReplaceAll":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace_all"},"helpers.stringSubstr":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"length","initializer":"undefined"}],"pyQName":"helpers.string_substr"},"helpers.stringSlice":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.string_slice"},"helpers.stringToUpperCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_upper_case"},"helpers.stringToLowerCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_lower_case"},"helpers.stringSplit":{"kind":-3,"retType":"string[]","parameters":[{"name":"S","type":"string"},{"name":"separator","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"pyQName":"helpers.string_split"},"helpers.stringTrim":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_trim"},"helpers.isWhitespace":{"kind":-3,"retType":"boolean","parameters":[{"name":"c"}],"pyQName":"helpers.is_whitespace"},"helpers.stringEmpty":{"kind":-3,"retType":"boolean","parameters":[{"name":"S","type":"string"}],"pyQName":"helpers.string_empty"},"Math.clamp":{"kind":-3,"retType":"number","parameters":[{"name":"min"},{"name":"max"},{"name":"value"}]},"Math.abs":{"kind":-3,"retType":"number","attributes":{"help":"math/abs","paramHelp":{"x":"A numeric expression for which the absolute value is needed."},"jsDoc":"Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5."},"parameters":[{"name":"x","description":"A numeric expression for which the absolute value is needed."}],"pyQName":"abs"},"Math.sign":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The numeric expression to test"},"jsDoc":"Returns the sign of the x, indicating whether x is positive, negative or zero."},"parameters":[{"name":"x","description":"The numeric expression to test"}]},"Math.max":{"kind":-3,"retType":"number","attributes":{"help":"math/max","jsDoc":"Returns the larger of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"max"},"Math.min":{"kind":-3,"retType":"number","attributes":{"help":"math/min","jsDoc":"Returns the smaller of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"min"},"Math.roundWithPrecision":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"the number to round","digits":"the number of resulting digits"},"jsDoc":"Rounds ``x`` to a number with the given number of ``digits``"},"parameters":[{"name":"x","description":"the number to round"},{"name":"digits","description":"the number of resulting digits"}],"pyQName":"Math.round_with_precision"},"__internal":{"kind":5,"retType":"","attributes":{"blockHidden":true}},"__internal.__downUp":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleDownUp","block":"%down","paramFieldEditor":{"down":"toggledownup"},"paramFieldEditorOptions":{"down":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a down/up toggle","_def":{"parts":[{"kind":"param","name":"down","ref":false}],"parameters":[{"kind":"param","name":"down","ref":false}]}},"parameters":[{"name":"down","type":"boolean"}]},"__internal.__upDown":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleUpDown","block":"%up","paramFieldEditor":{"up":"toggleupdown"},"paramFieldEditorOptions":{"up":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a up/down toggle","_def":{"parts":[{"kind":"param","name":"up","ref":false}],"parameters":[{"kind":"param","name":"up","ref":false}]}},"parameters":[{"name":"up","type":"boolean"}]},"__internal.__highLow":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleHighLow","block":"%high","paramFieldEditor":{"high":"togglehighlow"},"paramFieldEditorOptions":{"high":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a high/low toggle","_def":{"parts":[{"kind":"param","name":"high","ref":false}],"parameters":[{"kind":"param","name":"high","ref":false}]}},"parameters":[{"name":"high","type":"boolean"}]},"__internal.__onOff":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleOnOff","block":"%on","paramFieldEditor":{"on":"toggleonoff"},"paramFieldEditorOptions":{"on":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a on/off toggle","_def":{"parts":[{"kind":"param","name":"on","ref":false}],"parameters":[{"kind":"param","name":"on","ref":false}]}},"parameters":[{"name":"on","type":"boolean"}]},"__internal.__yesNo":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleYesNo","block":"%yes","paramFieldEditor":{"yes":"toggleyesno"},"paramFieldEditorOptions":{"yes":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a yes/no toggle","_def":{"parts":[{"kind":"param","name":"yes","ref":false}],"parameters":[{"kind":"param","name":"yes","ref":false}]}},"parameters":[{"name":"yes","type":"boolean"}]},"__internal.__winLose":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleWinLose","block":"%win","paramFieldEditor":{"win":"togglewinlose"},"paramFieldEditorOptions":{"win":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a win/lose toggle","_def":{"parts":[{"kind":"param","name":"win","ref":false}],"parameters":[{"kind":"param","name":"win","ref":false}]}},"parameters":[{"name":"win","type":"boolean"}]},"__internal.__colorNumberPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"#ff0000","color":"#ff0000"},"blockId":"colorNumberPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colornumber"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","colours":"[\"#ff0000\",\"#ff8000\",\"#ffff00\",\"#ff9da5\",\"#00ff00\",\"#b09eff\",\"#00ffff\",\"#007fff\",\"#65471f\",\"#0000ff\",\"#7f00ff\",\"#ff0080\",\"#ff00ff\",\"#ffffff\",\"#999999\",\"#000000\"]","columns":"4","className":"rgbColorPicker"}},"explicitDefaults":["value"],"paramHelp":{"color":"color, eg: #ff0000"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","initializer":"#ff0000","default":"#ff0000"}]},"__internal.__colorWheelPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__colorWheelHsvPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelHsvPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255","channel":"hsvfast"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor using HSV values","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__speedPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"speed":"50"},"blockId":"speedPicker","block":"%speed","shim":"TD_ID","paramFieldEditor":{"speed":"speed"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"speed":{"decompileLiterals":"1"}},"paramHelp":{"speed":"the speed, eg: 50"},"jsDoc":"A speed picker","_def":{"parts":[{"kind":"param","name":"speed","ref":false}],"parameters":[{"kind":"param","name":"speed","ref":false}]}},"parameters":[{"name":"speed","description":"the speed, eg: 50","default":"50"}]},"__internal.__turnRatioPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"turnratio":"0"},"blockId":"turnRatioPicker","block":"%turnratio","shim":"TD_ID","paramFieldEditor":{"turnratio":"turnratio"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"turnRatio":{"decompileLiterals":"1"}},"paramHelp":{"turnratio":"the turn ratio, eg: 0"},"jsDoc":"A turn ratio picker","_def":{"parts":[{"kind":"param","name":"turnratio","ref":false}],"parameters":[{"kind":"param","name":"turnratio","ref":false}]}},"parameters":[{"name":"turnratio","description":"the turn ratio, eg: 0","default":"0"}]},"__internal.__protractor":{"kind":-3,"retType":"number","attributes":{"blockId":"protractorPicker","block":"%angle","shim":"TD_ID","paramFieldEditor":{"angle":"protractor"},"paramFieldEditorOptions":{"angle":{"decompileLiterals":"1"}},"colorSecondary":"#FFFFFF","blockHidden":true,"jsDoc":"A field editor that displays a protractor","_def":{"parts":[{"kind":"param","name":"angle","ref":false}],"parameters":[{"kind":"param","name":"angle","ref":false}]}},"parameters":[{"name":"angle"}]},"__internal.__timePicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"ms":"500"},"blockId":"timePicker","block":"%ms","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"ms":"numberdropdown"},"paramFieldEditorOptions":{"ms":{"decompileLiterals":"true","data":"[[\"100 ms\", 100], [\"200 ms\", 200], [\"500 ms\", 500], [\"1 second\", 1000], [\"2 seconds\", 2000], [\"5 seconds\", 5000]]"}},"paramHelp":{"ms":"time duration in milliseconds, eg: 500, 1000"},"jsDoc":"Get the time field editor","_def":{"parts":[{"kind":"param","name":"ms","ref":false}],"parameters":[{"kind":"param","name":"ms","ref":false}]}},"parameters":[{"name":"ms","description":"time duration in milliseconds, eg: 500, 1000","default":"500"}]}}},"sha":"978ef16e53925da6d9b9b0d02d0843e31fffdd18ae05702d8d7aefb9b24f54aa"}}}
1
+ var pxtTargetBundle = {"id":"core","name":"Microsoft MakeCode","title":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","bundleddirs":[],"compile":{"hasHex":false,"jsRefCounting":false,"switches":{},"noSourceInFlash":true,"utf8":true},"appTheme":{"logoUrl":"https://makecode.com/","logo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","docsLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","portraitLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","organizationLogo":"@cdnUrl@/blob/106597ae039a275897661651b96856220c9b0fad/static/orglogo.png","organizationWideLogo":"@cdnUrl@/blob/d6139e3d0af51f02aa5f8765ecb0985acbd98551/static/orglogowide.png","homeUrl":"https://makecode.com/","cardLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","appLogo":"@cdnUrl@/blob/4d9a6c8b1fa4c75911b2c468cb3ca1cdfb61fcb6/static/logo.svg","crowdinProject":"kindscript","docMenu":[{"name":"About","path":"/about"},{"name":"Docs","path":"/docs"},{"name":"Blog","path":"/blog"}],"hideDocsEdit":true,"hideDocsSimulator":true,"TOC":[{"name":"About MakeCode","path":"/about","subitems":[]},{"name":"Blog","path":"/blog","subitems":[]},{"name":"Online Learning","path":"/online-learning","subitems":[]},{"name":"Contact Us","path":"/contact","subitems":[]},{"name":"Tools","path":"/tools","subitems":[]},{"name":"Technical Docs","path":"/docs","subitems":[{"name":"JS Editor Features","path":"/js/editor","subitems":[]},{"name":"Programming Language","path":"/language","subitems":[]},{"name":"Async Functions","path":"/async","subitems":[]},{"name":"Partial Flashing","path":"/partial-flashing","subitems":[]},{"name":"Source Embedding","path":"/source-embedding","subitems":[]},{"name":"Updating Blockly Version","path":"/develop/blocklyupgrade","subitems":[]},{"name":"Accessibility","path":"/develop/accessibility","subitems":[]},{"name":"Profiling","path":"/js/profiling","subitems":[]},{"name":"Debugging Hardware","path":"/develop/hw-debugging","subitems":[]}]},{"name":"Creating Targets","path":"/target-creation","subitems":[{"name":"pxtarget.json","path":"/targets/pxtarget","subitems":[]},{"name":"Defining Blocks","path":"/defining-blocks","subitems":[]},{"name":"Auto-generation of .d.ts","path":"/simshim","subitems":[]},{"name":"Static File Drops","path":"/cli/staticpkg","subitems":[]},{"name":"Simulator","path":"/targets/simulator","subitems":[]},{"name":"Theming Editor","path":"/targets/theming","subitems":[]},{"name":"Embedding resources","path":"/jres","subitems":[]}]},{"name":"Creating Extensions","path":"/extensions","subitems":[{"name":"Getting started","path":"/extensions/getting-started","subitems":[]},{"name":"pxt.json","path":"/extensions/pxt-json","subitems":[]},{"name":"Extension versioning","path":"/extensions/versioning","subitems":[]},{"name":"Extension localization","path":"/extensions/localization","subitems":[]},{"name":"Extension approval","path":"/extensions/approval","subitems":[]},{"name":"Editor extensions","path":"/extensions/extensions","subitems":[]},{"name":"GitHub Extension Authoring","path":"/extensions/github-authoring","subitems":[]}]},{"name":"Writing Docs","path":"/writing-docs","subitems":[{"name":"Macros","path":"/writing-docs/macros","subitems":[]},{"name":"Anchors","path":"/writing-docs/anchors","subitems":[]},{"name":"Tutorials","path":"/writing-docs/tutorials","subitems":[]},{"name":"User Tutorials","path":"/writing-docs/user-tutorials","subitems":[]},{"name":"Skillmaps","path":"/writing-docs/skillmaps","subitems":[]},{"name":"Routing","path":"/writing-docs/routing","subitems":[]},{"name":"Testing","path":"/writing-docs/testing","subitems":[]}]},{"name":"Translations","path":"/translate","subitems":[]},{"name":"Blocks Embedding","path":"/blocks-embed","subitems":[]},{"name":"Command Line Interface","path":"/cli","subitems":[{"name":"install","path":"/cli/install","subitems":[]},{"name":"build","path":"/cli/build","subitems":[]},{"name":"bump","path":"/cli/bump","subitems":[]},{"name":"deploy","path":"/cli/deploy","subitems":[]},{"name":"console","path":"/cli/console","subitems":[]},{"name":"gdb","path":"/cli/gdb","subitems":[]},{"name":"staticpkg","path":"/cli/staticpkg","subitems":[]},{"name":"update","path":"/cli/update","subitems":[]},{"name":"pyconv","path":"/cli/pyconv","subitems":[]},{"name":"hidserial","path":"/cli/hidserial","subitems":[]},{"name":"hiddmesg","path":"/cli/hiddmesg","subitems":[]},{"name":"login","path":"/cli/login","subitems":[]}]},{"name":"Labs","path":"/labs","subitems":[]},{"name":"UF2 File Format","path":"https://github.com/microsoft/uf2","subitems":[]},{"name":"Accessibility","path":"/accessibility","subitems":[]},{"name":"Telemetry","path":"/telemetry","subitems":[]}],"embedUrl":"https://makecode.com/","id":"core","title":"Microsoft MakeCode","name":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","htmlDocIncludes":{}},"uploadDocs":true,"versions":{"branch":"v7.4.3","tag":"v7.4.3","commits":"https://github.com/microsoft/pxt/commits/8702bfe4e417e4c954b76229a7e249ff41cc5d83","target":"7.4.3","pxt":"7.4.3"},"blocksprj":{"id":"blocksprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"tsprj":{"id":"tsprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"bundledpkgs":{},"apiInfo":{"libs/blocksprj":{"apis":{"byQName":{"Array":{"kind":5,"retType":"","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."}},"Array.length":{"kind":2,"retType":"number","attributes":{"weight":84,"blockId":"lists_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"arrays","jsDoc":"Get or set the length of an array. This number is one more than the index of the last element the array.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"Array.push":{"kind":-1,"attributes":{"help":"arrays/push","weight":50,"blockId":"array_push","block":"%list| add value %value| to end","blockNamespace":"arrays","group":"Modify","paramHelp":{"items":"New elements of the Array."},"jsDoc":"Append a new element to an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" add value ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" to end","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","type":"T"}],"isInstance":true,"pyQName":"Array.append"},"Array.concat":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayConcat","weight":40,"paramHelp":{"arr":"The other array that is being concatenated with"},"jsDoc":"Concatenates the values with another array."},"parameters":[{"name":"arr","description":"The other array that is being concatenated with","type":"T[]"}],"isInstance":true},"Array.pop":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pop","weight":45,"blockId":"array_pop","block":"get and remove last value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"get and remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.reverse":{"kind":-1,"attributes":{"help":"arrays/reverse","helper":"arrayReverse","weight":10,"blockId":"array_reverse","block":"reverse %list","blockNamespace":"arrays","group":"Operations","jsDoc":"Reverse the elements in an array. The first array element becomes the last, and the last array element becomes the first.","_def":{"parts":[{"kind":"label","text":"reverse ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.shift":{"kind":-1,"retType":"T","attributes":{"help":"arrays/shift","helper":"arrayShift","weight":30,"blockId":"array_shift","block":"get and remove first value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"get and remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true},"Array.unshift":{"kind":-1,"retType":"number","attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":25,"blockId":"array_unshift","block":"%list| insert %value| at beginning","blockNamespace":"arrays","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true},"Array.slice":{"kind":-1,"retType":"T[]","attributes":{"paramDefl":{"start":"0","end":"0"},"help":"arrays/slice","helper":"arraySlice","weight":41,"blockNamespace":"arrays","paramHelp":{"start":"The beginning of the specified portion of the array. eg: 0","end":"The end of the specified portion of the array. eg: 0"},"jsDoc":"Return a section of an array."},"parameters":[{"name":"start","description":"The beginning of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"},{"name":"end","description":"The end of the specified portion of the array. eg: 0","initializer":"undefined","default":"0"}],"isInstance":true},"Array.splice":{"kind":-1,"attributes":{"paramDefl":{"start":"0","deleteCount":"0"},"helper":"arraySplice","weight":40,"paramHelp":{"start":"The zero-based location in the array from which to start removing elements. eg: 0","deleteCount":"The number of elements to remove. eg: 0"},"jsDoc":"Remove elements from an array."},"parameters":[{"name":"start","description":"The zero-based location in the array from which to start removing elements. eg: 0","default":"0"},{"name":"deleteCount","description":"The number of elements to remove. eg: 0","default":"0"}],"isInstance":true},"Array.join":{"kind":-1,"retType":"string","attributes":{"helper":"arrayJoin","weight":40,"paramHelp":{"sep":"the string separator"},"jsDoc":"joins all elements of an array into a string and returns this string."},"parameters":[{"name":"sep","description":"the string separator","type":"string","initializer":"undefined"}],"isInstance":true},"Array.some":{"kind":-1,"retType":"boolean","attributes":{"helper":"arraySome","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether at least one element in the array passes the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The some method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.every":{"kind":-1,"retType":"boolean","attributes":{"helper":"arrayEvery","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array."},"jsDoc":"Tests whether all elements in the array pass the test implemented by the provided function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The every method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.sort":{"kind":-1,"retType":"T[]","attributes":{"helper":"arraySort","weight":40,"paramHelp":{"specifies":"a function that defines the sort order. If omitted, the array is sorted according to the prmitive type"},"jsDoc":"Sort the elements of an array in place and returns the array. The sort is not necessarily stable."},"parameters":[{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"isInstance":true},"Array.map":{"kind":-1,"retType":"U[]","attributes":{"helper":"arrayMap","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array, and return an array containing the results."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.forEach":{"kind":-1,"attributes":{"helper":"arrayForEach","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array."},"jsDoc":"Call a defined callback function on each element of an array."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The forEach method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true,"pyQName":"Array.for_each"},"Array.filter":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFilter","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array."},"jsDoc":"Return the elements of an array that meet the condition specified in a callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array.","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.fill":{"kind":-1,"retType":"T[]","attributes":{"helper":"arrayFill","weight":39,"jsDoc":"Fills all the elements of an array from a start index to an end index with a static value. The end index is not included."},"parameters":[{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"isInstance":true},"Array.find":{"kind":-1,"retType":"T","attributes":{"helper":"arrayFind","weight":40,"paramHelp":{"callbackfn":""},"jsDoc":"Returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned."},"parameters":[{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"isInstance":true},"Array.reduce":{"kind":-1,"retType":"U","attributes":{"helper":"arrayReduce","weight":40,"paramHelp":{"callbackfn":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","initialValue":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."},"jsDoc":"Call the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function."},"parameters":[{"name":"callbackfn","description":"A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","description":"Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.","type":"U"}],"isInstance":true},"Array.removeElement":{"kind":-1,"retType":"boolean","attributes":{"weight":48,"jsDoc":"Remove the first occurence of an object. Returns true if removed."},"parameters":[{"name":"element","type":"T"}],"isInstance":true,"pyQName":"Array.remove_element"},"Array.removeAt":{"kind":-1,"retType":"T","attributes":{"help":"arrays/remove-at","weight":47,"blockId":"array_removeat","block":"%list| get and remove value at %index","blockNamespace":"arrays","group":"Read","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" get and remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array.remove_at"},"Array.insertAt":{"kind":-1,"attributes":{"paramDefl":{"index":"0","the":"0"},"help":"arrays/insert-at","weight":20,"blockId":"array_insertAt","block":"%list| insert at %index| value %value","blockNamespace":"arrays","group":"Modify","paramHelp":{"index":"the zero-based position in the list to insert the value, eg: 0","the":"value to insert, eg: 0"},"jsDoc":"Insert the value at a particular index, increases length by 1","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert at ","style":[]},{"kind":"param","name":"index","ref":false},{"kind":"break"},{"kind":"label","text":" value ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"index","description":"the zero-based position in the list to insert the value, eg: 0","default":"0"},{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array.insert_at"},"Array.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"arrays/index-of","weight":40,"blockId":"array_indexof","block":"%list| find index of %value","blockNamespace":"arrays","group":"Operations","paramHelp":{"item":"The value to locate in the array.","fromIndex":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0."},"jsDoc":"Return the index of the first occurrence of a value in an array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" find index of ","style":[]},{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"item","description":"The value to locate in the array.","type":"T"},{"name":"fromIndex","description":"The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.","initializer":"undefined"}],"isInstance":true,"pyQName":"Array.index"},"Array.get":{"kind":-1,"retType":"T","attributes":{"paramDefl":{"index":"0"},"help":"arrays/get","weight":85,"paramHelp":{"index":"the zero-based position in the list of the item, eg: 0"},"jsDoc":"Get the value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list of the item, eg: 0","default":"0"}],"isInstance":true},"Array.set":{"kind":-1,"attributes":{"paramDefl":{"index":"0","value":"0"},"help":"arrays/set","weight":84,"paramHelp":{"index":"the zero-based position in the list to store the value, eg: 0","value":"the value to insert, eg: 0"},"jsDoc":"Store a value at a particular index"},"parameters":[{"name":"index","description":"the zero-based position in the list to store the value, eg: 0","default":"0"},{"name":"value","description":"the value to insert, eg: 0","type":"T","default":"0"}],"isInstance":true},"Array._pickRandom":{"kind":-1,"retType":"T","attributes":{"help":"arrays/pick-random","helper":"arrayPickRandom","weight":25,"blockId":"array_pickRandom","block":"get random value from %list","blockNamespace":"arrays","group":"Read","jsDoc":"Return a random value from the array","_def":{"parts":[{"kind":"label","text":"get random value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pick_random"},"Array._unshiftStatement":{"kind":-1,"attributes":{"help":"arrays/unshift","helper":"arrayUnshift","weight":24,"blockId":"array_unshift_statement","block":"%list| insert %value| at beginning","blockNamespace":"arrays","blockAliasFor":"Array.unshift","group":"Modify","paramHelp":{"element":"to insert at the start of the Array."},"jsDoc":"Add one element to the beginning of an array and return the new length of the array.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" insert ","style":[]},{"kind":"param","name":"value","ref":false},{"kind":"break"},{"kind":"label","text":" at beginning","style":[]}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","type":"T"}],"isInstance":true,"pyQName":"Array._unshift_statement"},"Array._popStatement":{"kind":-1,"attributes":{"help":"arrays/pop","weight":44,"blockId":"array_pop_statement","block":"remove last value from %list","blockNamespace":"arrays","blockAliasFor":"Array.pop","group":"Modify","jsDoc":"Remove the last element from an array and return it.","_def":{"parts":[{"kind":"label","text":"remove last value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._pop_statement"},"Array._shiftStatement":{"kind":-1,"attributes":{"help":"arrays/shift","helper":"arrayShift","weight":29,"blockId":"array_shift_statement","block":"remove first value from %list","blockNamespace":"arrays","blockAliasFor":"Array.shift","group":"Modify","jsDoc":"Remove the first element from an array and return it. This method changes the length of the array.","_def":{"parts":[{"kind":"label","text":"remove first value from ","style":[]},{"kind":"param","name":"list","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"Array._shift_statement"},"Array._removeAtStatement":{"kind":-1,"attributes":{"help":"arrays/remove-at","weight":14,"blockId":"array_removeat_statement","block":"%list| remove value at %index","blockNamespace":"arrays","blockAliasFor":"Array.removeAt","group":"Modify","jsDoc":"Remove the element at a certain index.","_def":{"parts":[{"kind":"param","name":"list","ref":false},{"kind":"break"},{"kind":"label","text":" remove value at ","style":[]},{"kind":"param","name":"index","ref":false}],"parameters":[{"kind":"param","name":"list","ref":false},{"kind":"param","name":"index","ref":false}]}},"parameters":[{"name":"index"}],"isInstance":true,"pyQName":"Array._remove_at_statement"},"String":{"kind":5,"retType":"","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."}},"String.concat":{"kind":-1,"retType":"string","attributes":{"weight":49,"blockId":"string_concat","blockNamespace":"text","paramHelp":{"other":"The string to append to the end of the string."},"jsDoc":"Returns a string that contains the concatenation of two or more strings."},"parameters":[{"name":"other","description":"The string to append to the end of the string.","type":"string"}],"isInstance":true},"String.charAt":{"kind":-1,"retType":"string","attributes":{"weight":48,"help":"text/char-at","blockId":"string_get","block":"char from %this=text|at %pos","blockNamespace":"text","paramHelp":{"index":"The zero-based index of the desired character."},"jsDoc":"Return the character at the specified index.","_def":{"parts":[{"kind":"label","text":"char from ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"pos","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"pos","ref":false}]}},"parameters":[{"name":"index","description":"The zero-based index of the desired character."}],"isInstance":true,"pyQName":"String.char_at"},"String.length":{"kind":2,"retType":"number","attributes":{"property":"true","weight":47,"blockId":"text_length","block":"length of %VALUE","blockBuiltin":"true","blockNamespace":"text","jsDoc":"Returns the length of a String object.","_def":{"parts":[{"kind":"label","text":"length of ","style":[]},{"kind":"param","name":"VALUE","ref":false}],"parameters":[{"kind":"param","name":"VALUE","ref":false}]}},"isInstance":true},"String.charCodeAt":{"kind":-1,"retType":"number","attributes":{"paramHelp":{"index":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."},"jsDoc":"Return the Unicode value of the character at the specified location."},"parameters":[{"name":"index","description":"The zero-based index of the desired character. If there is no character at the specified index, NaN is returned."}],"isInstance":true,"pyQName":"String.char_code_at"},"String.compare":{"kind":-1,"retType":"number","attributes":{"help":"text/compare","blockId":"string_compare","block":"compare %this=text| to %that","blockNamespace":"text","paramHelp":{"that":"String to compare to target string"},"jsDoc":"See how the order of characters in two strings is different (in ASCII encoding).","_def":{"parts":[{"kind":"label","text":"compare ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" to ","style":[]},{"kind":"param","name":"that","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"that","ref":false}]}},"parameters":[{"name":"that","description":"String to compare to target string","type":"string"}],"isInstance":true},"String.substr":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0","length":"10"},"helper":"stringSubstr","help":"text/substr","blockId":"string_substr","block":"substring of %this=text|from %start|of length %length","blockNamespace":"text","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","length":"number of characters to extract, eg: 10"},"jsDoc":"Return a substring of the current string.","_def":{"parts":[{"kind":"label","text":"substring of ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"from ","style":[]},{"kind":"param","name":"start","ref":false},{"kind":"break"},{"kind":"label","text":"of length ","style":[]},{"kind":"param","name":"length","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"start","ref":false},{"kind":"param","name":"length","ref":false}]}},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"length","description":"number of characters to extract, eg: 10","initializer":"undefined","default":"10"}],"isInstance":true},"String.replace":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplace","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with the first occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true},"String.replaceAll":{"kind":-1,"retType":"string","attributes":{"helper":"stringReplaceAll","paramHelp":{"toReplace":"the substring to replace in the current string","replacer":"either the string that replaces toReplace in the current string,"},"jsDoc":"Return the current string with each occurence of toReplace\nreplaced with the replacer\n\n\nor a function that accepts the substring and returns the replacement string."},"parameters":[{"name":"toReplace","description":"the substring to replace in the current string","type":"string"},{"name":"replacer","description":"either the string that replaces toReplace in the current string,","type":"string | ((sub: string) => string)"}],"isInstance":true,"pyQName":"String.replace_all"},"String.slice":{"kind":-1,"retType":"string","attributes":{"paramDefl":{"start":"0"},"helper":"stringSlice","paramHelp":{"start":"first character index; can be negative from counting from the end, eg:0","end":"one-past-last character index"},"jsDoc":"Return a substring of the current string."},"parameters":[{"name":"start","description":"first character index; can be negative from counting from the end, eg:0","default":"0"},{"name":"end","description":"one-past-last character index","initializer":"undefined"}],"isInstance":true},"String.isEmpty":{"kind":-1,"retType":"boolean","attributes":{"helper":"stringEmpty","help":"text/is-empty","blockId":"string_isempty","blockNamespace":"text","block":"%this=text| is empty","jsDoc":"Returns a value indicating if the string is empty","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":" is empty","style":[]}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false}]}},"parameters":[],"isInstance":true,"pyQName":"String.is_empty"},"String.indexOf":{"kind":-1,"retType":"number","attributes":{"help":"text/index-of","blockId":"string_indexof","blockNamespace":"text","block":"%this=text|find index of %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Returns the position of the first occurrence of a specified value in a string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"find index of ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true,"pyQName":"String.index_of"},"String.includes":{"kind":-1,"retType":"boolean","attributes":{"help":"text/includes","blockId":"string_includes","blockNamespace":"text","block":"%this=text|includes %searchValue","paramHelp":{"searchValue":"the text to find","start":"optional start index for the search"},"jsDoc":"Determines whether a string contains the characters of a specified string.","_def":{"parts":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"includes ","style":[]},{"kind":"param","name":"searchValue","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"searchValue","ref":false}]}},"parameters":[{"name":"searchValue","description":"the text to find","type":"string"},{"name":"start","description":"optional start index for the search","initializer":"undefined"}],"isInstance":true},"String.split":{"kind":-1,"retType":"string[]","attributes":{"helper":"stringSplit","help":"text/split","blockId":"string_split","blockNamespace":"text","block":"split %this=text|at %separator","paramHelp":{"separator":"@param limit"},"jsDoc":"Splits the string according to the separators","_def":{"parts":[{"kind":"label","text":"split ","style":[]},{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"break"},{"kind":"label","text":"at ","style":[]},{"kind":"param","name":"separator","ref":false}],"parameters":[{"kind":"param","name":"this","shadowBlockId":"text","ref":false},{"kind":"param","name":"separator","ref":false}]}},"parameters":[{"name":"separator","description":"@param limit","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"isInstance":true},"String.trim":{"kind":-1,"retType":"string","attributes":{"helper":"stringTrim","jsDoc":"Return a substring of the current string with whitespace removed from both ends"},"parameters":[],"isInstance":true},"String.toUpperCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToUpperCase","help":"text/to-upper-case","jsDoc":"Converts the string to upper case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_upper_case"},"String.toLowerCase":{"kind":-1,"retType":"string","attributes":{"helper":"stringToLowerCase","help":"text/to-lower-case","jsDoc":"Converts the string to lower case characters."},"parameters":[],"isInstance":true,"pyQName":"String.to_lower_case"},"parseFloat":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123","s":"123"},"help":"text/parse-float","blockId":"string_parsefloat","block":"parse to number %text","blockNamespace":"text","explicitDefaults":["text"],"paramHelp":{"s":"A string to convert into a number. eg: 123"},"jsDoc":"Convert a string to a number.","_def":{"parts":[{"kind":"label","text":"parse to number ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","type":"string","initializer":"123","default":"123"}],"pyQName":"parse_float"},"randint":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random","block":"pick random %min|to %limit","blockNamespace":"Math","help":"math/randint","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}]},"Object":{"kind":5,"retType":""},"Function":{"kind":9,"retType":"Function","extendsTypes":[]},"Function.__assignableToFunction":{"kind":2,"retType":"Function","isInstance":true},"IArguments":{"kind":9,"retType":"IArguments","extendsTypes":[]},"IArguments.__assignableToIArguments":{"kind":2,"retType":"IArguments","isInstance":true},"RegExp":{"kind":9,"retType":"RegExp","extendsTypes":[]},"RegExp.__assignableToRegExp":{"kind":2,"retType":"RegExp","isInstance":true},"Boolean":{"kind":9,"retType":"Boolean","extendsTypes":[]},"Boolean.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of an object."},"parameters":[],"isInstance":true,"pyQName":"Boolean.to_string"},"String@type":{"kind":9,"retType":"String","attributes":{"blockNamespace":"text","jsDoc":"Combine, split, and search text strings."},"extendsTypes":[],"pyQName":"String"},"String.fromCharCode":{"kind":-3,"retType":"string","attributes":{"help":"math/from-char-code","weight":1,"blockNamespace":"text","blockId":"stringFromCharCode","block":"text from char code %code","jsDoc":"Make a string from the given ASCII character code.","_def":{"parts":[{"kind":"label","text":"text from char code ","style":[]},{"kind":"param","name":"code","ref":false}],"parameters":[{"kind":"param","name":"code","ref":false}]}},"parameters":[{"name":"code"}],"pyQName":"String.from_char_code"},"Number":{"kind":5,"retType":""},"Number.toString":{"kind":-1,"retType":"string","attributes":{"jsDoc":"Returns a string representation of a number."},"parameters":[],"isInstance":true,"pyQName":"Number.to_string"},"Array@type":{"kind":9,"retType":"T[]","attributes":{"blockNamespace":"Arrays","jsDoc":"Add, remove, and replace items in lists."},"extendsTypes":[],"pyQName":"Array"},"Array.isArray":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given object is an array."},"parameters":[{"name":"obj","type":"any"}],"pyQName":"Array.is_array"},"Object@type":{"kind":9,"retType":"Object","extendsTypes":[],"pyQName":"Object"},"Object.keys":{"kind":-3,"retType":"string[]","attributes":{"jsDoc":"Return the field names in an object."},"parameters":[{"name":"obj","type":"any"}]},"Math":{"kind":5,"retType":"","attributes":{"jsDoc":"More complex operations with numbers."}},"Math.pow":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The base value of the expression.","y":"The exponent value of the expression."},"jsDoc":"Returns the value of a base expression taken to a specified power."},"parameters":[{"name":"x","description":"The base value of the expression."},{"name":"y","description":"The exponent value of the expression."}]},"Math.random":{"kind":-3,"retType":"number","attributes":{"help":"math/random","jsDoc":"Returns a pseudorandom number between 0 and 1."},"parameters":[]},"Math.randomRange":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"min":"0","max":"10"},"blockId":"device_random_deprecated","block":"pick random %min|to %limit","help":"math/random-range","deprecated":"true","paramHelp":{"min":"the lower inclusive bound, eg: 0","max":"the upper inclusive bound, eg: 10"},"jsDoc":"Returns a pseudorandom number between min and max included.\nIf both numbers are integral, the result is integral.","_def":{"parts":[{"kind":"label","text":"pick random ","style":[]},{"kind":"param","name":"min","ref":false},{"kind":"break"},{"kind":"label","text":"to ","style":[]},{"kind":"param","name":"limit","ref":false}],"parameters":[{"kind":"param","name":"min","ref":false},{"kind":"param","name":"limit","ref":false}]}},"parameters":[{"name":"min","description":"the lower inclusive bound, eg: 0","default":"0"},{"name":"max","description":"the upper inclusive bound, eg: 10","default":"10"}],"pyQName":"Math.random_range"},"Math.log":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns the natural logarithm (base e) of a number."},"parameters":[{"name":"x","description":"A number"}]},"Math.exp":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A number"},"jsDoc":"Returns returns ``e^x``."},"parameters":[{"name":"x","description":"A number"}]},"Math.sin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the sine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.cos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the cosine of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.tan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"An angle in radians"},"jsDoc":"Returns the tangent of a number."},"parameters":[{"name":"x","description":"An angle in radians"}]},"Math.asin":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arcsine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.acos":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arccosine (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"x":"A number"},"jsDoc":"Returns the arctangent (in radians) of a number"},"parameters":[{"name":"x","description":"A number"}]},"Math.atan2":{"kind":-3,"retType":"number","attributes":{"help":"math/trigonometry","paramHelp":{"y":"A number","x":"A number"},"jsDoc":"Returns the arctangent of the quotient of its arguments."},"parameters":[{"name":"y","description":"A number"},{"name":"x","description":"A number"}]},"Math.sqrt":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the square root of a number."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.ceil":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the smallest number greater than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.floor":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the greatest number less than or equal to its numeric argument."},"parameters":[{"name":"x","description":"A numeric expression."}]},"Math.trunc":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"A numeric expression."},"jsDoc":"Returns the number with the decimal part truncated."},"parameters":[{"name":"x","description":"A numeric expression."}],"pyQName":"int"},"Math.round":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The value to be rounded to the nearest number."},"jsDoc":"Returns a supplied numeric expression rounded to the nearest number."},"parameters":[{"name":"x","description":"The value to be rounded to the nearest number."}]},"Math.imul":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit multiplication of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"Math.idiv":{"kind":-3,"retType":"number","attributes":{"help":"math","paramHelp":{"x":"The first number","y":"The second number"},"jsDoc":"Returns the value of integer signed 32 bit division of two numbers."},"parameters":[{"name":"x","description":"The first number"},{"name":"y","description":"The second number"}]},"control":{"kind":5,"retType":""},"control._onCodeStart":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_start"},"control._onCodeStop":{"kind":-3,"parameters":[{"name":"arg","type":"any"}],"pyQName":"control._on_code_stop"},"NaN":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing Not-A-Number."},"pyQName":"na_n"},"Infinity":{"kind":4,"retType":"number","attributes":{"jsDoc":"Constant representing positive infinity."},"pyQName":"infinity"},"isNaN":{"kind":-3,"retType":"boolean","parameters":[{"name":"x"}],"pyQName":"is_na_n"},"Number@type":{"kind":9,"retType":"Number","extendsTypes":[],"pyQName":"Number"},"Number.isNaN":{"kind":-3,"retType":"boolean","attributes":{"jsDoc":"Check if a given value is of type Number and it is a NaN."},"parameters":[{"name":"x","type":"any"}],"pyQName":"Number.is_na_n"},"StringMap":{"kind":9,"retType":"StringMap","attributes":{"jsDoc":"A dictionary from string key to string values"},"extendsTypes":[]},"parseInt":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"text":"123"},"help":"text/parse-int","blockId":"string_parseint","block":"parse to integer %text","blockNamespace":"text","explicitDefaults":["text"],"blockHidden":true,"paramHelp":{"text":"A string to convert into an integral number. eg: \"123\"","radix":"optional A value between 2 and 36 that specifies the base of the number in text."},"jsDoc":"Convert a string to an integer.\n\n\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\nAll other strings are considered decimal.","_def":{"parts":[{"kind":"label","text":"parse to integer ","style":[]},{"kind":"param","name":"text","ref":false}],"parameters":[{"kind":"param","name":"text","ref":false}]}},"parameters":[{"name":"text","description":"A string to convert into an integral number. eg: \"123\"","type":"string","initializer":"123","default":"123"},{"name":"radix","description":"optional A value between 2 and 36 that specifies the base of the number in text.","initializer":"undefined"}],"pyQName":"int"},"helpers":{"kind":5,"retType":""},"helpers.arrayFill":{"kind":-3,"retType":"T[]","parameters":[{"name":"O","type":"T[]"},{"name":"value","type":"T"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_fill"},"helpers.arraySplice":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"start"},{"name":"len"}],"pyQName":"helpers.array_splice"},"helpers.arrayReverse":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_reverse"},"helpers.arrayShift":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_shift"},"helpers.arrayJoin":{"kind":-3,"retType":"string","parameters":[{"name":"arr","type":"T[]"},{"name":"sep","type":"string","initializer":"undefined"}],"pyQName":"helpers.array_join"},"helpers.arrayUnshift":{"kind":-3,"retType":"number","parameters":[{"name":"arr","type":"T[]"},{"name":"value","type":"T"}],"pyQName":"helpers.array_unshift"},"helpers.arraySort":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value1: T, value2: T) => number","initializer":"undefined","handlerParameters":[{"name":"value1","type":"T"},{"name":"value2","type":"T"}]}],"pyQName":"helpers.array_sort"},"helpers.arrayMap":{"kind":-3,"retType":"U[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => U","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_map"},"helpers.arraySome":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_some"},"helpers.arrayEvery":{"kind":-3,"retType":"boolean","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_every"},"helpers.arrayForEach":{"kind":-3,"parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => void","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_for_each"},"helpers.arrayFilter":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_filter"},"helpers.arrayFind":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(value: T, index: number) => boolean","handlerParameters":[{"name":"value","type":"T"},{"name":"index","type":"number"}]}],"pyQName":"helpers.array_find"},"helpers.arrayReduce":{"kind":-3,"retType":"U","parameters":[{"name":"arr","type":"T[]"},{"name":"callbackfn","type":"(previousValue: U, currentValue: T, currentIndex: number) => U","handlerParameters":[{"name":"previousValue","type":"U"},{"name":"currentValue","type":"T"},{"name":"currentIndex","type":"number"}]},{"name":"initialValue","type":"U"}],"pyQName":"helpers.array_reduce"},"helpers.arrayConcat":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"otherArr","type":"T[]"}],"pyQName":"helpers.array_concat"},"helpers.arrayPickRandom":{"kind":-3,"retType":"T","parameters":[{"name":"arr","type":"T[]"}],"pyQName":"helpers.array_pick_random"},"helpers.arraySlice":{"kind":-3,"retType":"T[]","parameters":[{"name":"arr","type":"T[]"},{"name":"start","initializer":"undefined"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.array_slice"},"helpers.stringReplace":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace"},"helpers.stringReplaceAll":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"toReplace","type":"string"},{"name":"replacer","type":"string | ((sub: string) => string)"}],"pyQName":"helpers.string_replace_all"},"helpers.stringSubstr":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"length","initializer":"undefined"}],"pyQName":"helpers.string_substr"},"helpers.stringSlice":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"},{"name":"start"},{"name":"end","initializer":"undefined"}],"pyQName":"helpers.string_slice"},"helpers.stringToUpperCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_upper_case"},"helpers.stringToLowerCase":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_to_lower_case"},"helpers.stringSplit":{"kind":-3,"retType":"string[]","parameters":[{"name":"S","type":"string"},{"name":"separator","type":"string","initializer":"undefined"},{"name":"limit","initializer":"undefined"}],"pyQName":"helpers.string_split"},"helpers.stringTrim":{"kind":-3,"retType":"string","parameters":[{"name":"s","type":"string"}],"pyQName":"helpers.string_trim"},"helpers.isWhitespace":{"kind":-3,"retType":"boolean","parameters":[{"name":"c"}],"pyQName":"helpers.is_whitespace"},"helpers.stringEmpty":{"kind":-3,"retType":"boolean","parameters":[{"name":"S","type":"string"}],"pyQName":"helpers.string_empty"},"Math.clamp":{"kind":-3,"retType":"number","parameters":[{"name":"min"},{"name":"max"},{"name":"value"}]},"Math.abs":{"kind":-3,"retType":"number","attributes":{"help":"math/abs","paramHelp":{"x":"A numeric expression for which the absolute value is needed."},"jsDoc":"Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5."},"parameters":[{"name":"x","description":"A numeric expression for which the absolute value is needed."}],"pyQName":"abs"},"Math.sign":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"The numeric expression to test"},"jsDoc":"Returns the sign of the x, indicating whether x is positive, negative or zero."},"parameters":[{"name":"x","description":"The numeric expression to test"}]},"Math.max":{"kind":-3,"retType":"number","attributes":{"help":"math/max","jsDoc":"Returns the larger of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"max"},"Math.min":{"kind":-3,"retType":"number","attributes":{"help":"math/min","jsDoc":"Returns the smaller of two supplied numeric expressions."},"parameters":[{"name":"a"},{"name":"b"}],"pyQName":"min"},"Math.roundWithPrecision":{"kind":-3,"retType":"number","attributes":{"paramHelp":{"x":"the number to round","digits":"the number of resulting digits"},"jsDoc":"Rounds ``x`` to a number with the given number of ``digits``"},"parameters":[{"name":"x","description":"the number to round"},{"name":"digits","description":"the number of resulting digits"}],"pyQName":"Math.round_with_precision"},"__internal":{"kind":5,"retType":"","attributes":{"blockHidden":true}},"__internal.__downUp":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleDownUp","block":"%down","paramFieldEditor":{"down":"toggledownup"},"paramFieldEditorOptions":{"down":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a down/up toggle","_def":{"parts":[{"kind":"param","name":"down","ref":false}],"parameters":[{"kind":"param","name":"down","ref":false}]}},"parameters":[{"name":"down","type":"boolean"}]},"__internal.__upDown":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleUpDown","block":"%up","paramFieldEditor":{"up":"toggleupdown"},"paramFieldEditorOptions":{"up":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a up/down toggle","_def":{"parts":[{"kind":"param","name":"up","ref":false}],"parameters":[{"kind":"param","name":"up","ref":false}]}},"parameters":[{"name":"up","type":"boolean"}]},"__internal.__highLow":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleHighLow","block":"%high","paramFieldEditor":{"high":"togglehighlow"},"paramFieldEditorOptions":{"high":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a high/low toggle","_def":{"parts":[{"kind":"param","name":"high","ref":false}],"parameters":[{"kind":"param","name":"high","ref":false}]}},"parameters":[{"name":"high","type":"boolean"}]},"__internal.__onOff":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleOnOff","block":"%on","paramFieldEditor":{"on":"toggleonoff"},"paramFieldEditorOptions":{"on":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a on/off toggle","_def":{"parts":[{"kind":"param","name":"on","ref":false}],"parameters":[{"kind":"param","name":"on","ref":false}]}},"parameters":[{"name":"on","type":"boolean"}]},"__internal.__yesNo":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleYesNo","block":"%yes","paramFieldEditor":{"yes":"toggleyesno"},"paramFieldEditorOptions":{"yes":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a yes/no toggle","_def":{"parts":[{"kind":"param","name":"yes","ref":false}],"parameters":[{"kind":"param","name":"yes","ref":false}]}},"parameters":[{"name":"yes","type":"boolean"}]},"__internal.__winLose":{"kind":-3,"retType":"boolean","attributes":{"shim":"TD_ID","blockHidden":true,"blockId":"toggleWinLose","block":"%win","paramFieldEditor":{"win":"togglewinlose"},"paramFieldEditorOptions":{"win":{"decompileLiterals":"true"}},"jsDoc":"A shim to render a boolean as a win/lose toggle","_def":{"parts":[{"kind":"param","name":"win","ref":false}],"parameters":[{"kind":"param","name":"win","ref":false}]}},"parameters":[{"name":"win","type":"boolean"}]},"__internal.__colorNumberPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"#ff0000","color":"#ff0000"},"blockId":"colorNumberPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colornumber"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","colours":"[\"#ff0000\",\"#ff8000\",\"#ffff00\",\"#ff9da5\",\"#00ff00\",\"#b09eff\",\"#00ffff\",\"#007fff\",\"#65471f\",\"#0000ff\",\"#7f00ff\",\"#ff0080\",\"#ff00ff\",\"#ffffff\",\"#999999\",\"#000000\"]","columns":"4","className":"rgbColorPicker"}},"explicitDefaults":["value"],"paramHelp":{"color":"color, eg: #ff0000"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","initializer":"#ff0000","default":"#ff0000"}]},"__internal.__colorWheelPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__colorWheelHsvPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"value":"10"},"blockId":"colorWheelHsvPicker","block":"%value","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"value":"colorwheel"},"paramFieldEditorOptions":{"value":{"decompileLiterals":"true","sliderWidth":"200","min":"0","max":"255","channel":"hsvfast"}},"paramHelp":{"value":"value between 0 to 255 to get a color value, eg: 10"},"jsDoc":"Get the color wheel field editor using HSV values","_def":{"parts":[{"kind":"param","name":"value","ref":false}],"parameters":[{"kind":"param","name":"value","ref":false}]}},"parameters":[{"name":"value","description":"value between 0 to 255 to get a color value, eg: 10","default":"10"}]},"__internal.__speedPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"speed":"50"},"blockId":"speedPicker","block":"%speed","shim":"TD_ID","paramFieldEditor":{"speed":"speed"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"speed":{"decompileLiterals":"1"}},"paramHelp":{"speed":"the speed, eg: 50"},"jsDoc":"A speed picker","_def":{"parts":[{"kind":"param","name":"speed","ref":false}],"parameters":[{"kind":"param","name":"speed","ref":false}]}},"parameters":[{"name":"speed","description":"the speed, eg: 50","default":"50"}]},"__internal.__turnRatioPicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"turnratio":"0"},"blockId":"turnRatioPicker","block":"%turnratio","shim":"TD_ID","paramFieldEditor":{"turnratio":"turnratio"},"colorSecondary":"#FFFFFF","weight":0,"blockHidden":true,"paramFieldEditorOptions":{"turnRatio":{"decompileLiterals":"1"}},"paramHelp":{"turnratio":"the turn ratio, eg: 0"},"jsDoc":"A turn ratio picker","_def":{"parts":[{"kind":"param","name":"turnratio","ref":false}],"parameters":[{"kind":"param","name":"turnratio","ref":false}]}},"parameters":[{"name":"turnratio","description":"the turn ratio, eg: 0","default":"0"}]},"__internal.__protractor":{"kind":-3,"retType":"number","attributes":{"blockId":"protractorPicker","block":"%angle","shim":"TD_ID","paramFieldEditor":{"angle":"protractor"},"paramFieldEditorOptions":{"angle":{"decompileLiterals":"1"}},"colorSecondary":"#FFFFFF","blockHidden":true,"jsDoc":"A field editor that displays a protractor","_def":{"parts":[{"kind":"param","name":"angle","ref":false}],"parameters":[{"kind":"param","name":"angle","ref":false}]}},"parameters":[{"name":"angle"}]},"__internal.__timePicker":{"kind":-3,"retType":"number","attributes":{"paramDefl":{"ms":"500"},"blockId":"timePicker","block":"%ms","blockHidden":true,"shim":"TD_ID","colorSecondary":"#FFFFFF","paramFieldEditor":{"ms":"numberdropdown"},"paramFieldEditorOptions":{"ms":{"decompileLiterals":"true","data":"[[\"100 ms\", 100], [\"200 ms\", 200], [\"500 ms\", 500], [\"1 second\", 1000], [\"2 seconds\", 2000], [\"5 seconds\", 5000]]"}},"paramHelp":{"ms":"time duration in milliseconds, eg: 500, 1000"},"jsDoc":"Get the time field editor","_def":{"parts":[{"kind":"param","name":"ms","ref":false}],"parameters":[{"kind":"param","name":"ms","ref":false}]}},"parameters":[{"name":"ms","description":"time duration in milliseconds, eg: 500, 1000","default":"500"}]}}},"sha":"2882eb21aea8dccabdc96f04d2223991a9d045052ca7b74846208936cb44eaaa"}}}