Repository navigation
[lexical] Modernize InlineFormattableNode Flow stub syntax rejected by fb-www flow strict - #8763
Merged
etrepum merged 1 commit intoJun 30, 2026
Conversation
…-www flow strict The InlineFormattableNode interface in the hand-maintained Lexical.js.flow stub used legacy Flow syntax that fb-www's flow strict mode rejects: - `+__isInlineFormattable` covariant shorthand -> `readonly` - `mixed` return types -> `unknown` This is the same class of fix as meta#8742, which the InlineFormattableNode declaration (added in meta#8737) regressed. The TS source in LexicalTextNode.ts already uses `readonly` and `unknown`, so this only aligns the Flow stub with the existing TS definition.
potatowagon
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7 and
zurfyx
as code owners
June 30, 2026 08:20
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Verified against fb-www flow strict on a www OnDemand (Flow 0.321.0). Before ( After this change: Note the |
etrepum
approved these changes
Jun 30, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The hand-maintained
InlineFormattableNodeFlow stub inpackages/lexical/flow/Lexical.js.flowuses legacy Flow syntax that Meta's internal fb-www flow strict mode rejects, breaking the www Lexical sync:+__isInlineFormattable: true;— covariant-property shorthand →readonly __isInlineFormattable: true;setFormat(format: number): mixed;→setFormat(format: number): unknown;toggleFormat(type: TextFormatType): mixed;→toggleFormat(type: TextFormatType): unknown;This is the same class of fix as #8742 ("Modernize Flow type-stub syntax rejected by fb-www flow strict"). The
InlineFormattableNodeinterface was added in #8737 after #8742 landed, so it reintroduced the old syntax.The TypeScript source already uses the modern forms —
packages/lexical/src/nodes/LexicalTextNode.ts:So this change only aligns the Flow stub with the existing
.d.ts/TS definition — no semantic change to exports or signatures.Test plan
readonlyandunknownare the same types the TS source declares, so flow/d.ts export consistency is preserved.+-covariant ormixedusages remaining in anypackages/**/*.js.flowstub.