Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda