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

Update BlockDefinition type import in block definition files #6248

Closed
BeksOmega opened this issue Jun 27, 2022 · 1 comment · Fixed by #7003, #7192 or #7193
Closed

Update BlockDefinition type import in block definition files #6248

BeksOmega opened this issue Jun 27, 2022 · 1 comment · Fixed by #7003, #7192 or #7193

Comments

@BeksOmega
Copy link
Collaborator

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.

@cpcallen
Copy link
Contributor

Too soon, GitHub, too sooon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment