GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [compiler] Validate type configs for hooks/non-hooks by josephsavona · Pull Request #30888 · react/react Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Alternative to #30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it). [ghstack-poisoned]
Alternative to #30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it). [ghstack-poisoned]
Alternative to #30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it). [ghstack-poisoned]
Alternative to #30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it). [ghstack-poisoned]
Alternative to #30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it). [ghstack-poisoned]
Alternative to #30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it). [ghstack-poisoned]
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| binding.imported, | ||
| ); | ||
| if (importedType != null) { | ||
| /* |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe factor this out into a helper?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hmm it's kind of tedious to get customize the error message if we extract to a helper, i'm gonna leave it
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (importedType != null) { | ||
| /* | ||
| * Check that hook-like export names are hook types, and non-hook names are non-hook types. | ||
| * The user-assigned alias isn't decidable by the type provider, so we ignore that for the check. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can enforce that the isHookName of the exported name and the local alias are the same?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense, but we should do that everywhere regardless of whether we have a type provider for the module or not. Let's explore that in a follow-up.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
**breaking change for canary users: Bumps peer dependency of React from `19.0.0-rc-7771d3a7-20240827` to `19.0.0-rc-94e652d5-20240912`** [diff react/react@7771d3a7...94e652d5](react/react@7771d3a...94e652d) <details> <summary>React upstream changes</summary> - react/react#30952 - react/react#30950 - react/react#30946 - react/react#30934 - react/react#30947 - react/react#30945 - react/react#30938 - react/react#30936 - react/react#30879 - react/react#30888 - react/react#30931 - react/react#30930 - react/react#30832 - react/react#30929 - react/react#30926 - react/react#30925 - react/react#30905 - react/react#30900 - react/react#30910 - react/react#30906 - react/react#30899 - react/react#30919 - react/react#30708 - react/react#30907 - react/react#30897 - react/react#30896 - react/react#30895 - react/react#30887 - react/react#30889 - react/react#30893 - react/react#30892 - react/react#30891 - react/react#30882 - react/react#30881 - react/react#30870 - react/react#30849 - react/react#30878 - react/react#30865 - react/react#30869 - react/react#30875 - react/react#30800 - react/react#30762 - react/react#30831 - react/react#30866 - react/react#30853 - react/react#30850 - react/react#30847 - react/react#30842 - react/react#30837 - react/react#30848 - react/react#30844 - react/react#30839 - react/react#30802 - react/react#30841 - react/react#30827 - react/react#30826 - react/react#30825 - react/react#30824 - react/react#30840 - react/react#30838 - react/react#30836 - react/react#30819 - react/react#30816 - react/react#30814 - react/react#30813 - react/react#30812 - react/react#30811 </details> --------- Co-authored-by: vercel-release-bot <[email protected]>
Alternative to react#30868. The goal is to ensure that the types coming out of moduleTypeProvider are valid wrt to hook typing. If something is named like a hook, then it must be typed as a hook (or don't type it). ghstack-source-id: 3e8b5a0 Pull Request resolved: react#30888
9df57a01
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.