Migrate rich-text package to TypeScript#12233
Conversation
| type: string, | ||
| props: Record<string, unknown>, | ||
| asBackground?: boolean | ||
| ) => Record<string, unknown>, |
There was a problem hiding this comment.
Not sure if it makes sense to create a local type Element or add a todo and leave it as is until the elements library package to get converted 🤔
There was a problem hiding this comment.
Edit: probably makes sense to wait for #12090
|
@barklund There are still 2 type errors in |
|
Plugin builds for b4fc5e2 are ready 🛎️!
|
|
Size Change: +17.2 kB (+1%) Total Size: 2.7 MB
ℹ️ View Unchanged
|
barklund
left a comment
There was a problem hiding this comment.
Various comments and suggestions for optimization. Most importantly I feel is typing the generic formatter, so they all conform to a common interface.
Installed with `—force`
barklund
left a comment
There was a problem hiding this comment.
Looks good to me. It's not perfect, but we're still learning, and the suboptimal bits are only internal to this package, so they shouldn't leak through to the rest of the app anyway.
Context
Summary
Relevant Technical Choices
To-do
as Statecasting right now. Looks like it generally needs some changes to allow selecting the whole state without a selector as well.renderMapdoesn't have the correct type, for matching the type, we'd need to change the logic to useImmutable.Map, however, it works currently as well so I'm wondering ifdraft-jstypes are not complete.User-facing changes
Testing Instructions
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
Does this PR change what data or activity we track or use?
Does this PR have a legal-related impact?
Checklist
Type: XYZlabel to the PRFixes #12179