Transcript from the "Implicit Typing" Lesson
>> Mike North: So one of the great strengths of the TypeScript compiler is that is uses implicit typing. Unlike other strongly typed programming languages, we don't necessarily need to define the type upfront in our code. In this situation here, we've got teacher's age equals 34, and we know 34 is a number.
[00:00:23] So we have enough information to say teacher age, that variable's type is number. If we then, try to assign teacher age to another value that's not a number, we're gonna get an error. And, what we're looking at here, is the idea of type equivalents, right? It basically, is trying to figure out if this string thing can be converted into a number, somehow.
[00:00:48] And without any additional information, like in this case, we would need to explicitly parse int or something, right? To make that conversion work. So, this is one of the first things you'll see about TypeScript, that after assigning, after a variable gets a type, you're not allowed to change that type.
[00:01:07] And again, we'll type, a the result of a the assignment.
[00:01:25] There's a great blog post about it comes up, called Hidden Classes In Chrome that describes some of the stuff that I was just talking about. The hot code versus hot and cold paths [LAUGH]