In Javascript, we already have a vanilla operator which can be used to find the type of anything: typeof let x = "hello world"; console.log(typeof x); // Returns "string" With being a strongly typed language, takes on a slightly different meaning. Although all the ’ functionality remains the same, it also gets some additional, useful features. Let's look at how works in TypeScript. TypeScript typeof basic Javascript types typeof typeof How typeof works in TypeScript The most basic application of in TypeScript is the creation of new basic types. If we are defining our own , we can use to copy the type of an existing item. A simple example where we take a , and create a custom type off the back of it looks like this: typeof custom types in TypeScript typeof number let x = 1234; // Custom type aNumber type aNumber = typeof x; This can be useful if variable types may vary, and we want to match a specific variable. It can also be useful when creating custom types that have many properties where the properties should match existing variable types: let x = 1234; let y = "string"; // Custom type aNumber type myType = { name: typeof y, age: typeof x, } As you can see, basically gives us a way to differentiate between the and of an existing object. It can also be combined with quite intuitively, to get the returned value of a function, to ensure type consistency when expecting values from functions: typeof value type ReturnType function myFunction(x: string, y: string) { return { firstName: x, lastName: y } } type nameType = ReturnType<typeof myFunction>; , so check that out if you want to learn more. Similarly, . I have covered ReturnType in more detail in this article you can learn more about TypeScript here Also Published here