Uh oh!
There was an error while loading. Please reload this page.
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.
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.
I think this is not valid in typescript, extending the interface with ViewProps should be enough I guess. Let me know if I am wrong though!
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.
Agree, this also probably should be
typenotinterfacetoo, as welltextshould be marked as optional and thenundefinedcan be removed from the type.Let's see what's others opinion, CC @cipolleschi, @cortinico
Uh oh!
There was an error while loading. Please reload this page.
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.
yeah, thought it might be required for codegen. I verified that codegen was working after removing the spread syntax.
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.
also, this felt a bit weird.
import type {ViewProps} from 'ViewPropTypes';Thought it should be
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';instead but typescript package is not yet upgraded, so not sure.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.
Hi, thanks for the comments!
I'm not a TypeScript expert, but I will do some checks.
Could you update the PR making the
NativePropsa type and thetextproperty optional?Uh oh!
There was an error while loading. Please reload this page.
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.
@cipolleschi thanks for checking. I could make those changes but I think current codegen requires component spec to be an interface.
I get an error while performing codegen with below types
I think @Titozzz who recently did PR in webview is using interface due to same reason.
cc @acoates-ms@ZihanChen-MSFT