Typescript

How to Check TypeScript Version

TypeScript” is an extended form of JavaScript or also called a superset of JavaScript and is used for developing web and mobile applications. While working with TypeScript, it is important to know the version for ensuring compatibility with other libraries or frameworks. Moreover, reviewing the TypeScript version can reveal what features are available for programmers.

This post will describe the procedure to check the version of installed TypeScript.

How to Check TypeScript Version?

To check the version of TypeScript, it is mandatory to install the TypeScript compiler on your system. If you don’t have TypeScript installed, utilize the below command:

npm install -g typescript

If you have already installed the TypeScript compiler then, run the below command to verify the version of the TypeScript:

tsc -v

It will display the latest version number of the installed TypeScript compiler. Here, the below output shows the installed version number that is “5.0.3”:

You can also use the below command to verify the version of TypeScript:

tsc --version

Output

If you want to check all versions of the TypeScript, use the given command:

npm view typescript versions

The output shows the list of all versions of the TypeScript:

That’s all about checking the version of TypeScript.

Conclusion

To check the version of TypeScript, utilize the “tsc -v” or the “tsc –version” commands on the command prompt or the VS terminal. However, the stated commands will show the “tsc: command not found” error if TypeScript is not installed on your system. This post described the procedure for checking the version of installed TypeScript.

About the author

Farah Batool

I completed my master's degree in computer science. I am an academic researcher and love to learn and write about new technologies. I am passionate about writing and sharing my experience with the world.