-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
[compiler] Option to only compile component syntax #29864
Conversation
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. [ghstack-poisoned]
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -499,23 +499,28 @@ function getReactFunctionType( | |||
return getComponentOrHookLike(fn, hookPattern) ?? "Other"; | |||
} | |||
} | |||
|
|||
// Component and hook declarations are known components/hooks | |||
let explicitSyntax: ReactFunctionType | null = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: syntaxKind
? kindFromSyntax
? my brain reads this as a boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! small nit, up to you
Comparing: 270229f...0024710 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. [ghstack-poisoned]
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. ghstack-source-id: d957cc73f7cf646794f80f50f81e9df41ee56aab Pull Request resolved: #29864
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. [ghstack-poisoned]
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. ghstack-source-id: d957cc73f7cf646794f80f50f81e9df41ee56aab Pull Request resolved: #29864
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. [ghstack-poisoned]
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. [ghstack-poisoned]
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option. ghstack-source-id: 579ac9f0fa01d8cdb6a0b8f9923906a0b37662f3 Pull Request resolved: #29864
Stack from ghstack (oldest at bottom):
Summary: Projects which have heavily adopted Flow component syntax may wish to enable the compiler only for components and hooks that use the syntax, rather than trying to guess which functions are components and hooks. This provides that option.