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

refactor: convert blocksvg and block to ES6 classes #5952

Merged
merged 11 commits into from
Feb 28, 2022

Conversation

BeksOmega
Copy link
Collaborator

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Work on #5860

Proposed Changes

Reorganizes the Block and BlockSvg constructors so that they can be converted to to ES6 classes.

I originally did this by adding an optional skipInit parameter to the Block, but since Maribeth revealed to me new.target I think that would be a better solution. However, I'm posting this PR first so as to theoretically lessen the confusion in my commit history. (Rewriting history pre-running the conversion script is beyond me)

Should be no behavioral changes 🤞

Reason for Changes

Getting slowly closer to typescript.

Test Coverage

All tests pass.

Documentation

N/A

Additional Information

The changes in files besides Block and BlockSvg are casts to make the compiler happy. Apparently it gets more strict when we conver things to ES6 classes.

@BeksOmega BeksOmega requested a review from a team as a code owner February 22, 2022 23:27
@BeksOmega BeksOmega requested review from alschmiedt and removed request for NeilFraser February 24, 2022 23:49
@BeksOmega BeksOmega assigned alschmiedt and unassigned NeilFraser Feb 24, 2022
core/block.js Outdated Show resolved Hide resolved
core/block_dragger.js Show resolved Hide resolved
core/block_svg.js Outdated Show resolved Hide resolved
core/block_svg.js Outdated Show resolved Hide resolved
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.

3 participants