Telegram_2018-03-25T20

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2018 > 03 > 25 >

Telegram_2018-03-25T20

Telegram link

 

2018-03-25T20:53:37

 

Typeof is nearly useless and youd have to manually check it every where. It cant even differentiate objects, and in several cases it can return wrong value.

 


 

Telegram link

 

2018-03-25T20:55:32

 

But if you are passing objects around TS generated functions, TS should prevent that, no?

 


 

Telegram link

 

2018-03-25T20:56:31

 

It cant in all cases because its still a superset of js, not a cross complier.

 


 

Telegram link

 

2018-03-25T20:57:44

 

What I mean is: If you have Method1(obj1) calling Method2(obj2), both TS methods, TS should guarantee that obj1 and obj2 are compatible