Stackit interview question

What is type inference in Typescript?

Interview Answer

Anonymous

15 July 2022

Type inference is the known ability of the TS compiler to infer the type of a variable without an explicit declaration: const num = 3 // type is number