Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
This condition will always return 'true' since the types have no overlap

if (this.program.segment !== Segment.Y || this.program.segment !== Segment.C) return text

There are 5 different segments and I want to check for 2 specifically, C and Y. If the segment is one of the other 3, I want to return the text. Otherwise, execute what comes after this statement.

Why is this simple OR check giving an error: This condition will always return 'true' since the types 'Segment.Y' and 'Segment.C' have no overlap. I looked at other examples on SO but I don't see how it would work here.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Got it. Just need to change it to AND instead of OR. Thank you to everyone above!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!