Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a;
- if(true)
- a = 4
- else
- a = "lol"
- var b: number = a // IMPLICIT CONVERSION from any to number
- function staticCheck(a: number)
- {
- alert("dynamic types")
- }
- staticCheck(b) // no compile error
Add Comment
Please, Sign In to add comment