Skip to content
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

Ternary operator type daemon failed #56407

Closed
vaynevayne opened this issue Nov 15, 2023 · 4 comments
Closed

Ternary operator type daemon failed #56407

vaynevayne opened this issue Nov 15, 2023 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@vaynevayne
Copy link

🔎 Search Terms

any

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions 4.9.5 and 4.9.5_____
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

No response

💻 Code

i had use confition like item.data && typeof item.data === 'object' , but ts error still exist

<div 
     options={
                      
                          (item.data && typeof item.data === 'object'
                            ? Object.keys(item.data).map((key) => ({
                                label: key,
                                value: item.data[key],
                              }))
                            : null)
                        }
</div>

🙁 Actual behavior

<div 
     options={
                      
                          (item.data && typeof item.data === 'object'
                            ? Object.keys(item.data).map((key) => ({
                                label: key,
                                value: item.data[key],
                              }))
                            : null)
                        }
</div>

🙂 Expected behavior

image

Additional information about the issue

No response

@fatcerberus
Copy link

sigh #9998

@MartinJohns
Copy link
Contributor

Good news everyone! The expected behavior is the actual behavior.

@RyanCavanaugh
Copy link
Member

Duplicate #11498

"daemon" ?

@typescript-bot
Copy link
Collaborator

This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

5 participants