Skip to content

Migrate element package to TS #70886

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

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

dhruvikpatel18
Copy link
Contributor

What?

Part of: #67691
Migrating the element package to Typescript.

Why?

Type safety.

Testing Instructions

Type check

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Package] Element /packages/element labels Jul 24, 2025
@t-hamano t-hamano mentioned this pull request Jul 24, 2025
37 tasks
@dhruvikpatel18 dhruvikpatel18 force-pushed the try/convert-element-ts branch from a73cef7 to d7724d7 Compare July 28, 2025 10:28
@dhruvikpatel18 dhruvikpatel18 marked this pull request as ready for review July 28, 2025 11:46
Copy link

github-actions bot commented Jul 28, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dhruvikpatel18 <dhruvik18@git.wordpress.org>
Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

This looks pretty good. Thank you.

I just have some suggestions about cleaning up JSDoc types

@dhruvikpatel18 dhruvikpatel18 force-pushed the try/convert-element-ts branch from d7724d7 to 21e3164 Compare August 5, 2025 09:16
Copy link
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

There are still many more non-null assertions left in this PR. Let us remove them all.

Copy link
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

This looks pretty good now.

I would like @jsnajdr @tyxla @sirreal or @youknowriad to have a second look.

@manzoorwanijk
Copy link
Member

Once this gets shipped, I have some interesting changes in mind for createInterpolateElement, making its conversionMap type-safe and have auto-completion.

@manzoorwanijk manzoorwanijk self-requested a review August 6, 2025 13:07
@manzoorwanijk
Copy link
Member

manzoorwanijk commented Aug 8, 2025

Let us resolve the conflicts here after updating the branch from trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Element /packages/element [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants