Create Type From Any Given Data in TypeScript

InstructorKamran Ahmed

Share this video with your friends

Send Tweet

TypeScript can infer the type of a variable by looking at the data assigned to it. It also allows you to create a reusable type that it has inferred and later reuse it in your application. In this lesson, we look at the typeof operator and see how we can use it to create reusable types from data.