Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

116
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda