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

350
Views
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
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!