Skip to content

Ternary operator type daemon failed #56407

Description

@vaynevayne

🔎 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

Activity

  1. fatcerberus commented on Nov 15, 2023

    @fatcerberus

    sigh #9998

  2. MartinJohns commented on Nov 15, 2023

    @MartinJohns
    Contributor

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

  3. RyanCavanaugh commented on Nov 15, 2023

    @RyanCavanaugh
    Member

    Duplicate #11498

    "daemon" ?

  4. typescript-bot commented on Nov 18, 2023

    @typescript-bot
    Contributor

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

  5. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions