diff --git a/app/blocks/variables/get.js b/app/blocks/variables/get.js index 177b81d..ffcafb8 100644 --- a/app/blocks/variables/get.js +++ b/app/blocks/variables/get.js @@ -1,3 +1,4 @@ +/** @type {import('#types').BlockDefinitionRaw} */ export default { type: 'io_variables_get', bytecodeKey: "getVariable", diff --git a/app/blocks/variables/set.js b/app/blocks/variables/set.js index 6d5a840..18b354b 100644 --- a/app/blocks/variables/set.js +++ b/app/blocks/variables/set.js @@ -1,3 +1,4 @@ +/** @type {import('#types').BlockDefinitionRaw} */ export default { type: 'io_variables_set', bytecodeKey: "setVariable", @@ -36,6 +37,7 @@ export default { const defaultedValue = value ? JSON.parse(value) + // TODO: is this !== 0 check superfluous? : (value !== 0 && value !== null) && null, blockPayload = JSON.stringify({ setVariable: { diff --git a/app/types.js b/app/types.js index 836a0f0..cb6ad40 100644 --- a/app/types.js +++ b/app/types.js @@ -48,6 +48,7 @@ * @typedef {object} BlockRegeneratorHelpers * @property {function} expressionToBlock * @property {function} arrayToStatements + * @property {function} registerVariable */ /**