Skip to content

Update BlockDefinition type import in block definition files #6248

@BeksOmega

Description

@BeksOmega

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, 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions