DEV Community

Discussion on: Infer in TypeScript, the Great and Powerful

Collapse
 
vallerydelexy profile image
vallerydelexy

your writing is hard to digest.

you lost me at "TypeScript infers a type quite smoothly β€” it's a number."

which doesnt seem to explain what is infer nor what it has to do with "let a = 10;"

Collapse
 
artemmalko profile image
Artem Malko

I'll try to fix my style in the future, thx for the feedback.

The main idea was to tell you about infer by using some simple concepts.

you lost me at "TypeScript infers a type quite smoothly β€” it's a number."

Please, correct me if I'm wrong, the problem is, that I used a word infers here?) By the way, try to read some more. I'm pretty sure, you'll get the idea.

Collapse
 
vallerydelexy profile image
vallerydelexy

yeah, the word infer are like alien to me,
as im not native english speaker.

youre using the word infer to explain infer.

Thread Thread
 
artemmalko profile image
Artem Malko • Edited

Yes, it can confuse you)

There are two ideas behind this word: exact mean β€” to make a decision about something, based on some facts and the keyword infer.

let a = 5;
Enter fullscreen mode Exit fullscreen mode

This is the most simple example of the infer process. This example is used to explain the concept of inferring in TypeScript.

Some comments have been hidden by the post's author - find out more