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: component id should be on the prototype #6104

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

rachel-fenichel
Copy link
Collaborator

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

Part of #5857

Proposed Changes

Changes the id property on i_component to be on the prototype, and then updates things that implement IComponent accordingly.

The IDs were already there--created in the constructors for things that implement IComponent. id was not supposed to be at the top level, since it's not shared between instances of a class.

Also added dispose to IBlockDragger.

Reason for Changes

Fix type errors to convert to typescript

@@ -33,6 +33,19 @@ const {Rect} = goog.requireType('Blockly.utils.Rect');
* @alias Blockly.DragTarget
*/
class DragTarget {
/**
* Constructor for DragTarget. It exists to add the id property and should not
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this isn't meant to be constructed directly, should it be tagged @abstract?

@rachel-fenichel rachel-fenichel merged commit 172a8ce into google:develop Apr 22, 2022
@rachel-fenichel rachel-fenichel deleted the component_id branch April 22, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants