Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate scratch-blocks to Typescript #224

Merged
merged 125 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
dd0bbcd
chore: rename checkbox_buble.js to checkbox_bubble.ts
gonfunko Oct 15, 2024
dcfc592
refactor: convert CheckboxBubble to TS
gonfunko Oct 15, 2024
e8ddbaf
chore: rename status_indicator_label.js to status_indicator_label.ts
gonfunko Oct 15, 2024
040b035
refactor: convert StatusIndicatorLabel to Typescript
gonfunko Oct 15, 2024
65ce0dd
chore: rename status_indicator_label_flyout_inflater.js to status_ind…
gonfunko Oct 15, 2024
8a137e2
refactor: convert StatusIndicatorLabelFlyoutInflater to TS
gonfunko Oct 15, 2024
a0b00af
chore: rename recyclable_block_flyout_inflater.js to recyclable_block…
gonfunko Oct 15, 2024
48331a6
refactor: convert RecyclableBlockFlyoutInflater to TS
gonfunko Oct 15, 2024
6551ad2
chore: rename procedures.js to procedures.ts
gonfunko Oct 15, 2024
f8be7ca
refactor: modernize and convert procedures.ts to Typescript
gonfunko Oct 15, 2024
2730eb1
chore: rename variables.js to variables.ts
gonfunko Oct 16, 2024
c33e8a6
refactor: convert variables.ts to Typescript
gonfunko Oct 16, 2024
eea99ef
refactor: modernize variables.ts
gonfunko Oct 16, 2024
fd1bec2
chore: rename shadows.js to shadows.ts
gonfunko Oct 16, 2024
1c54664
refactor: convert shadows.ts to Typescript
gonfunko Oct 16, 2024
9d2e956
chore: rename scratch_variable_model.js to scratch_variable_model.ts
gonfunko Oct 16, 2024
f967c8a
refactor: convert ScratchVariableModel to Typescript
gonfunko Oct 16, 2024
1d069bb
chore: rename scratch_variable_map.js to scratch_variable_map.ts
gonfunko Oct 16, 2024
12e3d9b
refactor: convert ScratchVariableMap to Typescript
gonfunko Oct 16, 2024
108c429
chore: rename scratch_dragger.js to scratch_dragger.ts
gonfunko Oct 16, 2024
8dc70a6
refactor: convert ScratchDragger to Typescript
gonfunko Oct 16, 2024
5ec7e6f
chore: add TSDoc to ScratchDragger
gonfunko Oct 16, 2024
2fac9a9
chore: rename scratch_continuous_toolbox.js to scratch_continuous_too…
gonfunko Oct 16, 2024
144dbe8
refactor: convert ScratchContinuousToolbox to Typescript
gonfunko Oct 16, 2024
01c021b
chore: rename scratch_continuous_category.js to scratch_continuous_ca…
gonfunko Oct 16, 2024
a468113
refactor: convert ScratchContinuousCategory to Typescript
gonfunko Oct 16, 2024
5ec527c
chore: rename scratch_connection_checker.js to scratch_connection_che…
gonfunko Oct 16, 2024
ea66345
refactor: convert ScratchConnectionChecker to Typescript
gonfunko Oct 16, 2024
724f096
chore: rename scratch_comment_icon.js to scratch_comment_icon.ts
gonfunko Oct 16, 2024
f2b09b6
refactor: convert ScratchCommentIcon to Typescript
gonfunko Oct 16, 2024
e4b2378
chore: rename data_category.js to data_category.ts
gonfunko Oct 17, 2024
5158b1c
refactor: convert data_category.ts to Typescript
gonfunko Oct 17, 2024
2ed676c
refactor: modernize data_category.ts
gonfunko Oct 17, 2024
9ad6310
chore: rename scratch_block_paster.js to scratch_block_paster.ts
gonfunko Oct 17, 2024
443e2e2
refactor: convert ScratchBlockPaster to Typescript
gonfunko Oct 17, 2024
fbe6276
chore: rename glows.js to glows.ts
gonfunko Oct 17, 2024
123db04
refactor: convert glows.ts to Typescript
gonfunko Oct 17, 2024
24a0edb
chore: rename flyout_checkbox_icon.js to flyout_checkbox_icon.ts
gonfunko Oct 17, 2024
1102585
refactor: convert FlyoutCheckboxIcon to Typescript
gonfunko Oct 17, 2024
16376fa
refactor: convert css.js to Typescript
gonfunko Oct 17, 2024
caa1057
chore: rename context_menu_items.js to context_menu_items.ts
gonfunko Oct 17, 2024
a4eca72
refactor: convert context_menu_items.ts to Typescript
gonfunko Oct 17, 2024
0dba894
refactor: convert constants.js to Typescript
gonfunko Oct 17, 2024
09a742f
chore: add license to constants.ts
gonfunko Oct 17, 2024
c6e7b83
refactor: convert colours.js to Typescript
gonfunko Oct 17, 2024
b95d02a
chore: remove the unneded categories.js
gonfunko Oct 17, 2024
647b0f0
chore: rename block_reporting.js to block_reporting.ts
gonfunko Oct 17, 2024
eca4687
refactor: convert block_reporting.ts to Typescript
gonfunko Oct 17, 2024
1c31a47
chore: rename colour.js to colour.ts
gonfunko Oct 17, 2024
a458e31
refactor: convert colour.ts to Typescript
gonfunko Oct 17, 2024
4568d98
refactor: convert control.js to Typescript
gonfunko Oct 17, 2024
4146c9d
refactor: convert event.js to Typescript
gonfunko Oct 17, 2024
3792aff
refactor: convert looks.js to Typescript
gonfunko Oct 17, 2024
518bfda
refactor: convert math.js to Typescript
gonfunko Oct 17, 2024
af53553
refactor: convert matrix.js to Typescript
gonfunko Oct 17, 2024
68841c5
refactor: convert motion.js to Typescript
gonfunko Oct 17, 2024
9dc8b71
refactor: convert note.js to Typescript
gonfunko Oct 17, 2024
2af4cce
refactor: convert operators.js to Typescript
gonfunko Oct 17, 2024
28d62fe
refactor: convert sensing.js to Typescript
gonfunko Oct 17, 2024
c1d58b7
refactor: convert sound.js to Typescript
gonfunko Oct 17, 2024
bd5cccd
refactor: convert text.js to Typescript
gonfunko Oct 17, 2024
6d4b595
chore: rename data.js to data.ts
gonfunko Oct 17, 2024
429486c
refactor: convert data.ts to Typescript
gonfunko Oct 17, 2024
cefd8c8
chore: rename procedures.js to procedures.ts
gonfunko Oct 17, 2024
8fd8cac
refactor: convert procedures.ts to Typescript
gonfunko Oct 17, 2024
53e3171
refactor: modernize procedures.ts
gonfunko Oct 17, 2024
a848483
chore: rename vertical_extensions.js to vertical_extensions.ts
gonfunko Oct 17, 2024
2d7cb78
refactor: convert vertical_extensions.ts to Typescript
gonfunko Oct 17, 2024
c7c0ce4
chore: rename field_angle.js to scratch_field_angle.ts
gonfunko Oct 17, 2024
5bb1c0f
refactor: convert ScratchFieldAngle to Typescript
gonfunko Oct 18, 2024
93b2f13
refactor: clean up ScratchFieldAngle
gonfunko Oct 18, 2024
4615ac4
refactor: add typings for `this` to block definitions
gonfunko Oct 18, 2024
1d000c5
chore: rename field_variable.js to scratch_field_variable.ts
gonfunko Oct 18, 2024
da0697e
refactor: convert ScratchFieldVariable to Typescript
gonfunko Oct 18, 2024
51011a4
chore: rename field_vertical_separator.js to field_vertical_separator.ts
gonfunko Oct 18, 2024
cc51da9
refactor: convert FieldVerticalSeparator to Typescript
gonfunko Oct 18, 2024
1838212
chore: rename field_variable_getter.js to field_variable_getter.ts
gonfunko Oct 18, 2024
2fc751b
refactor: convert FieldVariableGetter to Typescript
gonfunko Oct 18, 2024
9004bd7
chore: rename field_textinput_removable.js to field_textinput_removab…
gonfunko Oct 18, 2024
9f1000d
refactor: convert FieldTextInputRemovable to Typescript
gonfunko Oct 18, 2024
3a7fcf8
chore: rename field_number.js to scratch_field_number.ts
gonfunko Oct 18, 2024
498966a
refactor: convert ScratchFieldNumber to Typescript
gonfunko Oct 18, 2024
316fa0a
chore: rename field_note.js to field_note.ts
gonfunko Oct 18, 2024
e749f38
refactor: convert FieldNote to Typescript
gonfunko Oct 18, 2024
6da5a73
chore: rename field_matrix.js to field_matrix.ts
gonfunko Oct 18, 2024
51e64ee
refactor: convert FieldMatrix to Typescript
gonfunko Oct 18, 2024
463912a
chore: rename field_dropdown.js to scratch_field_dropdown.ts
gonfunko Oct 18, 2024
2ee27f9
refactor: convert ScratchFieldDropdown to Typescript
gonfunko Oct 18, 2024
71c71ae
chore: rename field_colour_slider.js to field_colour_slider.ts
gonfunko Oct 18, 2024
205303a
refactor: convert FieldColourSlider to Typescript
gonfunko Oct 18, 2024
434bf84
chore: rename events_block_comment_base.js to events_block_comment_ba…
gonfunko Oct 21, 2024
1b16f7d
refactor: convert BlockCommentBase to Typescript
gonfunko Oct 21, 2024
6456eb8
chore: rename events_block_comment_change.js to events_block_comment_…
gonfunko Oct 21, 2024
be51907
refactor: convert BlockCommentChange to Typescript
gonfunko Oct 21, 2024
7396437
chore: rename events_block_comment_collapse.js to events_block_commen…
gonfunko Oct 21, 2024
64c83cd
refactor: convert BlockCommentCollapse to Typescript
gonfunko Oct 21, 2024
8159dfe
chore: rename events_block_comment_create.js to events_block_comment_…
gonfunko Oct 21, 2024
00c4bec
refactor: convert BlockCommentCreate to Typescript
gonfunko Oct 21, 2024
cad3478
chore: rename events_block_comment_delete.js to events_block_comment_…
gonfunko Oct 21, 2024
6a439e5
refactor: convert BlockCommentDelete to Typescript
gonfunko Oct 21, 2024
0f34fcb
chore: rename events_block_comment_move.js to events_block_comment_mo…
gonfunko Oct 21, 2024
ddf5365
refactor: convert BlockCommentMove to Typescript
gonfunko Oct 21, 2024
2d52b1e
chore: rename events_block_comment_resize.js to events_block_comment_…
gonfunko Oct 21, 2024
915fd0d
refactor: convert BlockCommentResize to Typescript
gonfunko Oct 21, 2024
d696249
chore: rename events_block_drag_end.js to events_block_drag_end.ts
gonfunko Oct 21, 2024
5107a5a
refactor: convert BlockDragEnd to Typescript
gonfunko Oct 21, 2024
a02f099
chore: rename events_block_drag_outside.js to events_block_drag_outsi…
gonfunko Oct 21, 2024
8f74c6f
refactor: convert BlockDragOutside to Typescript
gonfunko Oct 21, 2024
370a63b
chore: rename events_scratch_variable_create.js to events_scratch_var…
gonfunko Oct 21, 2024
fd2a021
refactor: convert ScratchVariableCreate to Typescript
gonfunko Oct 21, 2024
d12b9a0
chore: rename bowler_hat.js to bowler_hat.ts
gonfunko Oct 21, 2024
5abf7c9
refactor: convert BowlerHat to Typescript
gonfunko Oct 21, 2024
12a46ac
chore: rename constants.js to constants.ts
gonfunko Oct 21, 2024
25dcdda
refactor: convert ConstantProvider to Typescript
gonfunko Oct 21, 2024
f2e9c10
chore: rename drawer.js to drawer.ts
gonfunko Oct 21, 2024
7f30272
refactor: convert Drawer to Typescript
gonfunko Oct 21, 2024
cc54d89
chore: rename path_object.js to path_object.ts
gonfunko Oct 21, 2024
512717e
refactor: convert PathObject to Typescript
gonfunko Oct 21, 2024
c2693e5
chore: rename render_info.js to render_info.ts
gonfunko Oct 21, 2024
266b47b
refactor: convert RenderInfo to Typescript
gonfunko Oct 21, 2024
dfdfd94
chore: rename renderer.js to renderer.ts
gonfunko Oct 21, 2024
ed7e030
refactor: convert Renderer to Typescript
gonfunko Oct 21, 2024
9f83f5f
chore: rename scratch_blocks_utils.js to scratch_blocks_utils.ts
gonfunko Oct 22, 2024
0020746
refactor: remove unused functions
gonfunko Oct 22, 2024
ae9f848
refactor: convert scratch_blocks_utils.ts to Typescript
gonfunko Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/block_reporting.js → src/block_reporting.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as Blockly from "blockly/core";
import { Colours } from "./colours.js";
import { Colours } from "./colours";

export function reportValue(id, value) {
const block =
Blockly.getMainWorkspace().getBlockById(id) ||
Blockly.getMainWorkspace().getFlyout().getWorkspace().getBlockById(id);
export function reportValue(id: string, value: string) {
const block = (Blockly.getMainWorkspace().getBlockById(id) ||
(Blockly.getMainWorkspace() as Blockly.WorkspaceSvg)
.getFlyout()
.getWorkspace()
.getBlockById(id)) as Blockly.BlockSvg;
if (!block) {
throw "Tried to report value on block that does not exist.";
}
Expand Down
12 changes: 6 additions & 6 deletions src/blocks/colour.js → src/blocks/colour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@
* @author [email protected] (Neil Fraser)
*/
import * as Blockly from "blockly/core";
import * as Constants from "../constants.js";
import * as Constants from "../constants";

/**
* Pick a random colour.
* @return {string} #RRGGBB for random colour.
*
* @returns #RRGGBB for random colour.
*/
function randomColour() {
var num = Math.floor(Math.random() * Math.pow(2, 24));
function randomColour(): string {
const num = Math.floor(Math.random() * Math.pow(2, 24));
return "#" + ("00000" + num.toString(16)).substr(-6);
}

Blockly.Blocks["colour_picker"] = {
/**
* Block for colour picker.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
message0: "%1",
args0: [
Expand Down
75 changes: 21 additions & 54 deletions src/blocks/control.js → src/blocks/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
*/

import * as Blockly from "blockly/core";
import { Categories } from "../categories.js";

Blockly.Blocks["control_forever"] = {
/**
* Block for repeat n times (external number).
* https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#5eke39
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
const ws = this.workspace.options.parentWorkspace || this.workspace;
this.jsonInit({
id: "control_forever",
Expand All @@ -51,7 +49,6 @@ Blockly.Blocks["control_forever"] = {
flip_rtl: true,
},
],
category: Categories.control,
extensions: ["colours_control", "shape_end"],
});
},
Expand All @@ -61,9 +58,8 @@ Blockly.Blocks["control_repeat"] = {
/**
* Block for repeat n times (external number).
* https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#so57n9
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
const ws = this.workspace.options.parentWorkspace || this.workspace;
this.jsonInit({
id: "control_repeat",
Expand Down Expand Up @@ -93,7 +89,6 @@ Blockly.Blocks["control_repeat"] = {
flip_rtl: true,
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -102,9 +97,8 @@ Blockly.Blocks["control_repeat"] = {
Blockly.Blocks["control_if"] = {
/**
* Block for if-then.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
type: "control_if",
message0: Blockly.Msg.CONTROL_IF,
Expand All @@ -122,7 +116,6 @@ Blockly.Blocks["control_if"] = {
name: "SUBSTACK",
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -131,9 +124,8 @@ Blockly.Blocks["control_if"] = {
Blockly.Blocks["control_if_else"] = {
/**
* Block for if-else.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
type: "control_if_else",
message0: Blockly.Msg.CONTROL_IF,
Expand All @@ -159,7 +151,6 @@ Blockly.Blocks["control_if_else"] = {
name: "SUBSTACK2",
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -168,13 +159,12 @@ Blockly.Blocks["control_if_else"] = {
Blockly.Blocks["control_stop"] = {
/**
* Block for stop all scripts.
* @this Blockly.Block
*/
init: function () {
var ALL_SCRIPTS = "all";
var THIS_SCRIPT = "this script";
var OTHER_SCRIPTS = "other scripts in sprite";
var stopDropdown = new Blockly.FieldDropdown(
init: function (this: Blockly.Block) {
const ALL_SCRIPTS = "all";
const THIS_SCRIPT = "this script";
const OTHER_SCRIPTS = "other scripts in sprite";
const stopDropdown = new Blockly.FieldDropdown(
function () {
if (
this.sourceBlock_ &&
Expand Down Expand Up @@ -205,9 +195,8 @@ Blockly.Blocks["control_stop"] = {
Blockly.Blocks["control_wait"] = {
/**
* Block to wait (pause) stack.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
id: "control_wait",
message0: Blockly.Msg.CONTROL_WAIT,
Expand All @@ -217,7 +206,6 @@ Blockly.Blocks["control_wait"] = {
name: "DURATION",
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -226,9 +214,8 @@ Blockly.Blocks["control_wait"] = {
Blockly.Blocks["control_wait_until"] = {
/**
* Block to wait until a condition becomes true.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
message0: Blockly.Msg.CONTROL_WAITUNTIL,
args0: [
Expand All @@ -238,7 +225,6 @@ Blockly.Blocks["control_wait_until"] = {
check: "Boolean",
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -247,9 +233,8 @@ Blockly.Blocks["control_wait_until"] = {
Blockly.Blocks["control_repeat_until"] = {
/**
* Block to repeat until a condition becomes true.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
const ws = this.workspace.options.parentWorkspace || this.workspace;
this.jsonInit({
message0: Blockly.Msg.CONTROL_REPEATUNTIL,
Expand Down Expand Up @@ -279,7 +264,6 @@ Blockly.Blocks["control_repeat_until"] = {
flip_rtl: true,
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -290,7 +274,7 @@ Blockly.Blocks["control_while"] = {
* Block to repeat until a condition becomes false.
* (This is an obsolete "hacked" block, for compatibility with 2.0.)
*/
init: function () {
init: function (this: Blockly.Block) {
const ws = this.workspace.options.parentWorkspace || this.workspace;
this.jsonInit({
message0: Blockly.Msg.CONTROL_WHILE,
Expand Down Expand Up @@ -320,7 +304,6 @@ Blockly.Blocks["control_while"] = {
flip_rtl: true,
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -330,9 +313,8 @@ Blockly.Blocks["control_for_each"] = {
/**
* Block for for-each. This is an obsolete block that is implemented for
* compatibility with Scratch 2.0 projects.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
type: "control_for_each",
message0: Blockly.Msg.CONTROL_FOREACH,
Expand All @@ -353,7 +335,6 @@ Blockly.Blocks["control_for_each"] = {
name: "SUBSTACK",
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -362,14 +343,12 @@ Blockly.Blocks["control_for_each"] = {
Blockly.Blocks["control_start_as_clone"] = {
/**
* Block for "when I start as a clone" hat.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
id: "control_start_as_clone",
message0: Blockly.Msg.CONTROL_STARTASCLONE,
args0: [],
category: Categories.control,
extensions: ["colours_control", "shape_hat"],
});
},
Expand All @@ -383,9 +362,8 @@ Blockly.Blocks["control_create_clone_of_menu"] = {};
Blockly.Blocks["control_create_clone_of"] = {
/**
* Block for "create clone of..."
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
id: "control_start_as_clone",
message0: Blockly.Msg.CONTROL_CREATECLONEOF,
Expand All @@ -395,7 +373,6 @@ Blockly.Blocks["control_create_clone_of"] = {
name: "CLONE_OPTION",
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -404,13 +381,11 @@ Blockly.Blocks["control_create_clone_of"] = {
Blockly.Blocks["control_delete_this_clone"] = {
/**
* Block for "delete this clone."
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
message0: Blockly.Msg.CONTROL_DELETETHISCLONE,
args0: [],
category: Categories.control,
extensions: ["colours_control", "shape_end"],
});
},
Expand All @@ -420,12 +395,10 @@ Blockly.Blocks["control_get_counter"] = {
/**
* Block to get the counter value. This is an obsolete block that is
* implemented for compatibility with Scratch 2.0 projects.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
message0: Blockly.Msg.CONTROL_COUNTER,
category: Categories.control,
extensions: ["colours_control", "output_number"],
});
},
Expand All @@ -435,12 +408,10 @@ Blockly.Blocks["control_incr_counter"] = {
/**
* Block to add one to the counter value. This is an obsolete block that is
* implemented for compatibility with Scratch 2.0 projects.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
message0: Blockly.Msg.CONTROL_INCRCOUNTER,
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -450,12 +421,10 @@ Blockly.Blocks["control_clear_counter"] = {
/**
* Block to clear the counter value. This is an obsolete block that is
* implemented for compatibility with Scratch 2.0 projects.
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
message0: Blockly.Msg.CONTROL_CLEARCOUNTER,
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand All @@ -473,9 +442,8 @@ Blockly.Blocks["control_all_at_once"] = {
* reporter that is always true (e.g. "if 1 = 1"). Also note that the
* Scratch 2.0 spec for this block is "warpSpeed", but the label shows
* "all at once".
* @this Blockly.Block
*/
init: function () {
init: function (this: Blockly.Block) {
this.jsonInit({
message0: Blockly.Msg.CONTROL_ALLATONCE,
message1: "%1", // Statement
Expand All @@ -485,7 +453,6 @@ Blockly.Blocks["control_all_at_once"] = {
name: "SUBSTACK",
},
],
category: Categories.control,
extensions: ["colours_control", "shape_statement"],
});
},
Expand Down
Loading