add default types
This commit is contained in:
parent
ad1e5f1b82
commit
a70e333d4d
@ -2,7 +2,7 @@
|
|||||||
import Blockly from 'blockly';
|
import Blockly from 'blockly';
|
||||||
import { getColour } from '../helpers/colour';
|
import { getColour } from '../helpers/colour';
|
||||||
import { getCompatibleTypes } from '../helpers/types'
|
import { getCompatibleTypes } from '../helpers/types'
|
||||||
|
import * as Types from '../helpers/types';
|
||||||
|
|
||||||
Blockly.Blocks['controls_whileUntil'] = {
|
Blockly.Blocks['controls_whileUntil'] = {
|
||||||
/**
|
/**
|
||||||
@ -47,6 +47,7 @@ Blockly.Blocks['controls_for'] = {
|
|||||||
{
|
{
|
||||||
"type": "field_variable",
|
"type": "field_variable",
|
||||||
"name": "VAR",
|
"name": "VAR",
|
||||||
|
"defaultType": Types.NUMBER.typeName,
|
||||||
"variable": null
|
"variable": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -97,6 +98,7 @@ Blockly.Blocks['controls_forEach'] = {
|
|||||||
{
|
{
|
||||||
"type": "field_variable",
|
"type": "field_variable",
|
||||||
"name": "VAR",
|
"name": "VAR",
|
||||||
|
"defaultType": Types.NUMBER.typeName,
|
||||||
"variable": null
|
"variable": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -287,7 +287,8 @@ Blockly.Blocks['math_change'] = {
|
|||||||
{
|
{
|
||||||
"type": "field_variable",
|
"type": "field_variable",
|
||||||
"name": "VAR",
|
"name": "VAR",
|
||||||
"variable": Blockly.Msg.MATH_CHANGE_TITLE_ITEM
|
"defaultType": Types.NUMBER.typeName,
|
||||||
|
"variable": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "input_value",
|
"type": "input_value",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user