fix(source-react-runtime): handle React types in props without skippi…#112
Merged
Conversation
…ng components When a component's props contain types typia can't resolve (React.ReactNode, React.ReactElement, etc.), fall back to the TS type checker to extract prop schemas instead of skipping the component entirely. This ensures all components get __xydUniform metadata — React-typed props show their actual type name (e.g. "ReactNode") instead of being lost. - Add per-component retry with TS type checker fallback - Add fallbackExtractSchema and tsTypeToJsonSchema helpers - Fix boolean detection (TS represents boolean as true|false union) - Add -2.vite-lib.react-types-resilience test fixture
✅ Deploy Preview for xyd-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for xyd-website canceled.
|
✅ Deploy Preview for xyd-apidocs-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Adds -3.vite-app.iframe-multi-entry test: a Vite app with two HTML entries where the main app loads an iframe pointing to a separate React app entry. Verifies __xydUniform is injected across both entries, including components with React types in props (UserCard with ReactElement/ReactNode) via the type checker fallback.
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.
…ng components
When a component's props contain types typia can't resolve (React.ReactNode, React.ReactElement, etc.), fall back to the TS type checker to extract prop schemas instead of skipping the component entirely. This ensures all components get __xydUniform metadata — React-typed props show their actual type name (e.g. "ReactNode") instead of being lost.