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

fix: Fix errors in TS declarations with blocks and generators #6200

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

maribethb
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #6079.

Proposed Changes

This is a cherry-pick of #6174 and #6185

Behavior Before Change

Errors when using Blockly v8 with TypeScript (see issue)

Behavior After Change

There are still problems with the TypeScript declarations, but they can be worked around by casting to any. For example, you may see a TypeError related to the injection of BlocklyOptions in Blockly.inject. If so, you can avoid that by casting that parameter to any to bypass the type error.

This is in contrast with the current behavior which throws an error that cannot be avoided by casting.

Reason for Changes

Test Coverage

Documentation

Additional Information

See original PRs for more information about testing and background.

@maribethb maribethb requested a review from a team as a code owner June 7, 2022 22:58
@maribethb maribethb requested review from rachel-fenichel and removed request for a team June 7, 2022 22:58
@maribethb maribethb merged commit d61f4ca into google:master Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with default export in typescript definitions
2 participants