Skip to content

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 migration to typescript.

Proposed Changes

Add annotations for compose and decompose functions on block.
Change a cast from * to ?.

Reason for changes

Fixes several type errors blocking typescript conversion.

Copy link
Contributor

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

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

Technically the compiler shouldn't accept this, because the BlockSvg versions of these functions expect more restricted types - which is bad. But also technically we always use the different versions correctly so it's fine. We just can't communicate that to the compiler without casting all the time.

@rachel-fenichel
Copy link
Collaborator Author

I'll add a note in #6097 to about the more specific types.

@rachel-fenichel rachel-fenichel merged commit 619ee66 into RaspberryPiFoundation:develop Apr 22, 2022
@rachel-fenichel rachel-fenichel deleted the de_compose branch April 22, 2022 18:18
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.

3 participants