Concept Flow - How TypeScript infers types automatically
Declare variable with value
TypeScript checks value type
Assign inferred type to variable
Use variable with inferred type
Type errors if used incorrectly
End
TypeScript looks at the value assigned to a variable and automatically decides its type, then uses that type to check for errors later.