Skip to content

[*] Fix: Replace legacy Flow syntax with modern equivalents in .flow … - #8315

Merged
etrepum merged 1 commit into
mainfrom
fix/flow-legacy-syntax-www-sync
Apr 8, 2026
Merged

etrepum merged 1 commit into
mainfrom
fix/flow-legacy-syntax-www-sync

Conversation

@potatowagon

@potatowagon potatowagon commented Apr 8, 2026 •

Copy link
Copy Markdown
Contributor

…type stubs

The upstream commit 1d349fe updated Flow syntax in source files, but the hand-maintained .flow type stubs were not updated to match. This causes Flow errors during www sync.

Replacements:

  • $ReadOnly<> → Readonly<>
  • $ReadOnlyArray<> → ReadonlyArray<>
  • $ReadOnlyMap<> → ReadonlyMap<>
  • $NonMaybeType<> → NonNullable<>
  • mixed → unknown
  • <T: Bound> → <T extends Bound>
  • Remove readonly keyword from CommunityTeam.tsx interfaces

Description

Describe the changes in this pull request

Closes #

Test plan

same changes in D99817603 passes flow

…type stubs

The upstream commit 1d349fe updated Flow syntax in source files, but the
hand-maintained .flow type stubs were not updated to match. This causes Flow
errors during www sync.

Replacements:
- `$ReadOnly<>` → `Readonly<>`
- `$ReadOnlyArray<>` → `ReadonlyArray<>`
- `$ReadOnlyMap<>` → `ReadonlyMap<>`
- `$NonMaybeType<>` → `NonNullable<>`
- `mixed` → `unknown`
- `<T: Bound>` → `<T extends Bound>`
- Remove `readonly` keyword from CommunityTeam.tsx interfaces
@meta-cla meta-cla 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 Apr 8, 2026
@vercel

vercel Bot commented Apr 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Apr 8, 2026 4:08pm
lexical-playground Ready Ready Preview, Comment Apr 8, 2026 4:08pm

Request Review

@potatowagon
potatowagon marked this pull request as draft April 8, 2026 16:08
@potatowagon
potatowagon marked this pull request as ready for review April 8, 2026 16:19
@etrepum

etrepum commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

Big fan of the new almost-typescript syntax, makes things much easier to maintain! I bet an LLM could be prompted to do it at this point

Comment on lines -15 to -25
readonly avatar: string;
readonly links: {
readonly github: string;
avatar: string;
links: {
github: string;
};
readonly location?: string;
readonly name: string;
readonly org?: string;
readonly orgLink?: string;
readonly sponsor?: string;
readonly title?: string;
readonly username: string;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mostly just curious, but since this isn't flow and the data is only used in a readonly manner, what is the reason that these are changing? It's coming from an imported json file so the rationale for readonly here was to treat it as a frozen constant.

@etrepum
etrepum added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit 7ea3e02 Apr 8, 2026
42 checks passed
@etrepum etrepum mentioned this pull request Apr 9, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 041724bf Deployed Apr 8, 2026 by vercel[bot]
Preview – lexical — 041724bf Deployed Apr 8, 2026 by vercel[bot]
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.

2 participants