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

351
Visualizações
Clarification about data type overloading (Union Types)

Actually I saw a line of code on router.d.ts, like

isActive(url: string | UrlTree, exact: boolean): boolean;

Then I quickly learn about it and getting some knowledge about Union Types in typescript

So I tried it to implement on my application instead of using Any

Statement 1

function(param: string | number) {    
}

Statement 2

function(param: any) {    
}

I understood my statement 1 is pretty good for limiting data type count from using any (or instead of using any)


But I know typescript is an type safe scripting language. But what about type safe is an possible, if we override datatype's? and share your more knowledge about it.

over 4 years ago · Santiago Trujillo
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