Skip to content

docs(native): properly type camera example usage #3771

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

Closed
wants to merge 2 commits into from

Conversation

brandyscarney
Copy link
Member

No description provided.

danielcregg and others added 2 commits July 24, 2024 14:37
Updating to prevent error message "Type 'string | undefined' is not assignable to type 'string'. 
Type 'undefined' is not assignable to type 'string.'" means that you are trying to assign a value that could be either a string or undefined to a variable that expects a string. In this case, you are trying to assign the value of imageUrl to the imageSrc variable, but imageUrl could be undefined if the user does not take a picture.
My solution is to change the type of the imageSrc variable to string | undefined.
@brandyscarney brandyscarney marked this pull request as ready for review July 24, 2024 18:37
@brandyscarney brandyscarney requested a review from a team as a code owner July 24, 2024 18:37
@brandyscarney brandyscarney requested a review from joselrio July 24, 2024 18:37
@brandyscarney brandyscarney enabled auto-merge (squash) July 24, 2024 18:38
Copy link

vercel bot commented Jul 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2024 6:41pm

@brandyscarney
Copy link
Member Author

I created this because there were issues with the Vercel deployment on #3175 but it ended up working so merging that PR instead.

auto-merge was automatically disabled July 24, 2024 18:48

Pull request was closed

@brandyscarney brandyscarney deleted the docs-native-typing-fix branch July 24, 2024 18:49
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