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
function(param: string | number) {
}
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.