You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, because we are in the middle of the typescript migration, we cannot use const {BlockDefinition} = goog.requireType('Blockly.blocks'); in the block definition files, because BlockDefinition is a type, which gets stripped when TypeScript transpiles to JS. So it doesn't exist when the closure module system goes to try to find it.
When we turn the block definitions into typescript/esmodules, we should try to properly import the BlockDefinition type using import statements.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently, because we are in the middle of the typescript migration, we cannot use
const {BlockDefinition} = goog.requireType('Blockly.blocks');
in the block definition files, becauseBlockDefinition
is a type, which gets stripped when TypeScript transpiles to JS. So it doesn't exist when the closure module system goes to try to find it.When we turn the block definitions into typescript/esmodules, we should try to properly import the
BlockDefinition
type usingimport
statements.The text was updated successfully, but these errors were encountered: