pxt-core 8.0.7 → 8.0.8
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 +9 -4
- package/built/pxtcompiler.js +1 -1
- package/built/pxteditor.d.ts +1 -0
- package/built/pxtlib.d.ts +5 -0
- package/built/pxtlib.js +8 -3
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/package.json +1 -1
package/built/pxt.js
CHANGED
|
@@ -111929,7 +111929,7 @@ var pxt;
|
|
|
111929
111929
|
// and pulls from master
|
|
111930
111930
|
const modtag = (modid === null || modid === void 0 ? void 0 : modid.tag) || ((_a = mod.config) === null || _a === void 0 ? void 0 : _a.version);
|
|
111931
111931
|
const vertag = verid.tag;
|
|
111932
|
-
// if there is no tag on the current dependency,
|
|
111932
|
+
// if there is no tag on the current dependency,
|
|
111933
111933
|
// assume same as existing module version if any
|
|
111934
111934
|
if (modtag && !vertag) {
|
|
111935
111935
|
pxt.debug(`unversioned ${ver}, using ${modtag}`);
|
|
@@ -112388,6 +112388,8 @@ var pxt;
|
|
|
112388
112388
|
opts.otherMultiVariants.push(etarget);
|
|
112389
112389
|
}
|
|
112390
112390
|
else {
|
|
112391
|
+
etarget.target.isNative = opts.target.isNative;
|
|
112392
|
+
opts.target = etarget.target;
|
|
112391
112393
|
ext = einfo;
|
|
112392
112394
|
opts.otherMultiVariants = [];
|
|
112393
112395
|
}
|
|
@@ -119885,8 +119887,11 @@ var ts;
|
|
|
119885
119887
|
let lenLiterals = size("_literals_end");
|
|
119886
119888
|
let lenAllCode = lenPrev;
|
|
119887
119889
|
let totalSize = (lenTotal + this.baseOffset) & 0xffffff;
|
|
119888
|
-
if (flashSize && totalSize > flashSize)
|
|
119889
|
-
|
|
119890
|
+
if (flashSize && totalSize > flashSize) {
|
|
119891
|
+
const e = new Error(lf("program too big by {0} bytes!", totalSize - flashSize));
|
|
119892
|
+
e.ksErrorCode = 9283;
|
|
119893
|
+
throw e;
|
|
119894
|
+
}
|
|
119890
119895
|
flashSize = flashSize || 128 * 1024;
|
|
119891
119896
|
let totalInfo = lf("; total bytes: {0} ({1}% of {2}k flash with {3} free)", totalSize, (100 * totalSize / flashSize).toFixed(1), (flashSize / 1024).toFixed(1), flashSize - totalSize);
|
|
119892
119897
|
let res =
|
|
@@ -129983,7 +129988,7 @@ var ts;
|
|
|
129983
129988
|
function inspect(n) {
|
|
129984
129989
|
console.log(stringKind(n));
|
|
129985
129990
|
}
|
|
129986
|
-
// next free error
|
|
129991
|
+
// next free error 9284
|
|
129987
129992
|
function userError(code, msg, secondary = false) {
|
|
129988
129993
|
let e = new Error(msg);
|
|
129989
129994
|
e.ksEmitterUserError = true;
|
package/built/pxtcompiler.js
CHANGED
|
@@ -8953,7 +8953,7 @@ var ts;
|
|
|
8953
8953
|
function inspect(n) {
|
|
8954
8954
|
console.log(stringKind(n));
|
|
8955
8955
|
}
|
|
8956
|
-
// next free error
|
|
8956
|
+
// next free error 9284
|
|
8957
8957
|
function userError(code, msg, secondary = false) {
|
|
8958
8958
|
let e = new Error(msg);
|
|
8959
8959
|
e.ksEmitterUserError = true;
|
package/built/pxteditor.d.ts
CHANGED
|
@@ -377,6 +377,7 @@ declare namespace pxt.editor {
|
|
|
377
377
|
renderUsbPairDialog?: (firmwareUrl?: string, failedOnce?: boolean) => any;
|
|
378
378
|
renderIncompatibleHardwareDialog?: (unsupportedParts: string[]) => any;
|
|
379
379
|
showUploadInstructionsAsync?: (fn: string, url: string, confirmAsync: (options: any) => Promise<number>) => Promise<void>;
|
|
380
|
+
showProgramTooLargeErrorAsync?: (variants: string[], confirmAsync: (options: any) => Promise<number>) => Promise<pxt.commands.RecompileOptions>;
|
|
380
381
|
toolboxOptions?: IToolboxOptions;
|
|
381
382
|
blocklyPatch?: (pkgTargetVersion: string, dom: Element) => void;
|
|
382
383
|
webUsbPairDialogAsync?: (pairAsync: () => Promise<boolean>, confirmAsync: (options: any) => Promise<number>) => Promise<number>;
|
package/built/pxtlib.d.ts
CHANGED
|
@@ -877,6 +877,10 @@ declare namespace pxt.cloud {
|
|
|
877
877
|
};
|
|
878
878
|
}
|
|
879
879
|
declare namespace pxt.commands {
|
|
880
|
+
interface RecompileOptions {
|
|
881
|
+
recompile: boolean;
|
|
882
|
+
useVariants: string[];
|
|
883
|
+
}
|
|
880
884
|
interface DeployOptions {
|
|
881
885
|
reportError: (e: string) => void;
|
|
882
886
|
showNotification: (msg: string) => void;
|
|
@@ -898,6 +902,7 @@ declare namespace pxt.commands {
|
|
|
898
902
|
helpUrl: string;
|
|
899
903
|
};
|
|
900
904
|
let showUploadInstructionsAsync: (fn: string, url: string, confirmAsync: (options: any) => Promise<number>, saveonly?: boolean) => Promise<void>;
|
|
905
|
+
let showProgramTooLargeErrorAsync: (variants: string[], confirmAsync: (options: any) => Promise<number>) => Promise<RecompileOptions>;
|
|
901
906
|
let saveProjectAsync: (project: pxt.cpp.HexFile) => Promise<void>;
|
|
902
907
|
let electronDeployAsync: (r: ts.pxtc.CompileResult) => Promise<void>;
|
|
903
908
|
let webUsbPairDialogAsync: (pairAsync: () => Promise<boolean>, confirmAsync: (options: any) => Promise<number>) => Promise<number>;
|
package/built/pxtlib.js
CHANGED
|
@@ -14243,7 +14243,7 @@ var pxt;
|
|
|
14243
14243
|
// and pulls from master
|
|
14244
14244
|
const modtag = (modid === null || modid === void 0 ? void 0 : modid.tag) || ((_a = mod.config) === null || _a === void 0 ? void 0 : _a.version);
|
|
14245
14245
|
const vertag = verid.tag;
|
|
14246
|
-
// if there is no tag on the current dependency,
|
|
14246
|
+
// if there is no tag on the current dependency,
|
|
14247
14247
|
// assume same as existing module version if any
|
|
14248
14248
|
if (modtag && !vertag) {
|
|
14249
14249
|
pxt.debug(`unversioned ${ver}, using ${modtag}`);
|
|
@@ -14702,6 +14702,8 @@ var pxt;
|
|
|
14702
14702
|
opts.otherMultiVariants.push(etarget);
|
|
14703
14703
|
}
|
|
14704
14704
|
else {
|
|
14705
|
+
etarget.target.isNative = opts.target.isNative;
|
|
14706
|
+
opts.target = etarget.target;
|
|
14705
14707
|
ext = einfo;
|
|
14706
14708
|
opts.otherMultiVariants = [];
|
|
14707
14709
|
}
|
|
@@ -22199,8 +22201,11 @@ var ts;
|
|
|
22199
22201
|
let lenLiterals = size("_literals_end");
|
|
22200
22202
|
let lenAllCode = lenPrev;
|
|
22201
22203
|
let totalSize = (lenTotal + this.baseOffset) & 0xffffff;
|
|
22202
|
-
if (flashSize && totalSize > flashSize)
|
|
22203
|
-
|
|
22204
|
+
if (flashSize && totalSize > flashSize) {
|
|
22205
|
+
const e = new Error(lf("program too big by {0} bytes!", totalSize - flashSize));
|
|
22206
|
+
e.ksErrorCode = 9283;
|
|
22207
|
+
throw e;
|
|
22208
|
+
}
|
|
22204
22209
|
flashSize = flashSize || 128 * 1024;
|
|
22205
22210
|
let totalInfo = lf("; total bytes: {0} ({1}% of {2}k flash with {3} free)", totalSize, (100 * totalSize / flashSize).toFixed(1), (flashSize / 1024).toFixed(1), flashSize - totalSize);
|
|
22206
22211
|
let res =
|
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":"makecode","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":"Translation languages","path":"/translate/languages","subitems":[]},{"name":"Localization files","path":"/translate/files","subitems":[]},{"name":"Parts to translate","path":"/translate/parts","subitems":[]},{"name":"Translator roles","path":"/translate/roles","subitems":[]},{"name":"In context translation","path":"/translate/in-context","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":"v8.0.7","tag":"v8.0.7","commits":"https://github.com/microsoft/pxt/commits/e231ed4fa1c5f9f4f354224f7e6a69b2836231b9","target":"8.0.7","pxt":"8.0.7"},"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":"b5dbfcda3bc62d7fbf515b6428920a84378f8334130f6fcd7c10af434b8b72af"}}}
|
|
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,"debugMode":false},"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":"makecode","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":"Translation languages","path":"/translate/languages","subitems":[]},{"name":"Localization files","path":"/translate/files","subitems":[]},{"name":"Parts to translate","path":"/translate/parts","subitems":[]},{"name":"Translator roles","path":"/translate/roles","subitems":[]},{"name":"In context translation","path":"/translate/in-context","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":"v8.0.8","tag":"v8.0.8","commits":"https://github.com/microsoft/pxt/commits/a318d338b6b08b53fde5288d32e8c04311592372","target":"8.0.8","pxt":"8.0.8"},"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":"ea1d7e59b8b07ba4fc6f140e8847888f382baa7338841a4219c463bc3a52677c"}}}
|