Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
npm run format
andnpm run lint
The details
Resolves
#6420
Proposed Changes
Passes the block to the Mutator constructor.
Behavior Before Change
Mutators would fail to initialize properly.
Behavior After Change
Mutators initialize and work as expected.
Reason for Changes
As part of the migration to TS, the Mutator constructor was changed to require the block it's attached to. Most existing block definitions had not been updated to pass this in. This PR updates those definitions to invoke the new constructor correctly.
Alternatively, I could try to revert the previous change to the Mutator constructor and pass null as the block value to the Icon superclass constructor as it did in v8, which probably requires some other changes to types.
Information for Deprecating Change
This PR adds a deprecation warning if you call a mutator or Icon without passing the block the mutator/icon is attached to. In the future, you will be required to pass the block. If you are affected, then find the offending mutator and include the attached block as the last argument to the mutator constructor.