Skip to content

fix: export JSON block definition type#10102

Open
yuanran32 wants to merge 2 commits into
RaspberryPiFoundation:mainfrom
yuanran32:main
Open

fix: export JSON block definition type#10102
yuanran32 wants to merge 2 commits into
RaspberryPiFoundation:mainfrom
yuanran32:main

Conversation

@yuanran32

Copy link
Copy Markdown

The basics

The details

Resolves

Fixes #10086

Proposed Changes

Exports JsonBlockDefinition from blockly.ts so it is available through the public blockly/core entry point.

Also updates the TypeScript test fixture to import JsonBlockDefinition from blockly-test/core instead of the internal interfaces/i_json_block_definition
path.

Reason for Changes

JsonBlockDefinition was added in #9613, but it was not re-exported from blockly.ts. As a result, users could not access the type from the expected public
Blockly core export.

This PR adds the missing re-export.

Test Coverage

Updated the TypeScript test fixture for JSON block custom args to verify that JsonBlockDefinition can be imported from blockly-test/core.

Validated with npm.cmd run tsc -w packages/blockly

Documentation

No documentation changes needed.

@yuanran32 yuanran32 requested a review from a team as a code owner July 3, 2026 10:31
@yuanran32 yuanran32 requested a review from lizschwab July 3, 2026 10:31
@github-actions github-actions Bot added the PR: fix Fixes a bug label Jul 3, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome! It looks like this is your first pull request in Blockly, so here are a couple of tips:

  • You can find tips about contributing to Blockly and how to validate your changes on our developer site.
  • We use conventional commits to make versioning the package easier. Make sure your commit message is in the proper format or learn how to fix it.
  • If any of the other checks on this PR fail, you can click on them to learn why. It might be that your change caused a test failure, or that you need to double-check the style guide.
    Thank you for opening this PR! A member of the Blockly team will review it soon.

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

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON Block interface is not being exported in blockly.ts

2 participants