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

Loosen node and version types #4143

Merged
merged 4 commits into from
Apr 4, 2023
Merged

Loosen node and version types #4143

merged 4 commits into from
Apr 4, 2023

Conversation

thegreatercurve
Copy link
Contributor

@thegreatercurve thegreatercurve commented Mar 17, 2023

Despite using the Spread utility function we still get type errors when we try to override string literal types, as evidenced in #4142.

A simple solution is just to change the type of a node to only use string and instead rely on runtime checks if a node type is incorrect or unknown.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 17, 2023
@vercel
Copy link

vercel bot commented Mar 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2023 1:22pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2023 1:22pm

@github-actions
Copy link

github-actions bot commented Mar 17, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 26.91 KB (0%) 539 ms (0%) 76 ms (+177.24% 🔺) 614 ms
packages/lexical-rich-text/dist/LexicalRichText.js 37.76 KB (0%) 756 ms (0%) 55 ms (-38.08% 🔽) 810 ms
packages/lexical-plain-text/dist/LexicalPlainText.js 37.74 KB (0%) 755 ms (0%) 56 ms (-13.17% 🔽) 811 ms

@thegreatercurve thegreatercurve marked this pull request as ready for review March 21, 2023 10:16
@thegreatercurve thegreatercurve force-pushed the bug/loosen-node-types branch from 929e4a3 to ef075fe Compare April 4, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants