8000 Support implicit declare in Flow by fisker · Pull Request #18690 · prettier/prettier · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@fisker
Copy link
Member
@fisker fisker commented Jan 20, 2026

Description

Blocked #18663 (comment)

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

@pkg-pr-new
Copy link
pkg-pr-new bot commented Jan 20, 2026

Open in StackBlitz

yarn add https://pkg.pr.new/@prettier/plugin-hermes@18690.tgz
yarn add https://pkg.pr.new/@prettier/plugin-oxc@18690.tgz
yarn add https://pkg.pr.new/prettier@18690.tgz

commit: 1c80714

@netlify
Copy link
netlify bot commented Jan 20, 2026

Deploy Preview for prettier ready!

Name Link
🔨 Latest commit 1c80714
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/697343f982abd00008bd1a8b
😎 Deploy Preview https://deploy-preview-18690--prettier.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fisker fisker force-pushed the flow-parser-declare branch from e31560e to 3bfae90 Compare January 23, 2026 09:39
// @ts-expect-error -- wrong types
!(node.type === "DeclareFunction" && node.implicitDeclare) &&
// @ts-expect-error -- FIXME
!(node.type === "DeclareComponent" && node.body === null))
Copy link
Member Author

Choose a reason for hiding this comment

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

@SamChou19815 Add a flag like DeclareFunction?

Copy link
Collaborator

Choose a reason for hiding this comment

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

good idea. We will probably just switch to a single declare flag like TS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0