Quick fixes

Visual Studio Code can detect some errors and automatically fix them using a set of features known as quick fixes.

Visual Studio Code will display a bulb icon on the left-hand side of our code near some error. If we click on the bulb icon, Visual Studio Code will display all the available quick fixes. If we select one of the available quick fixes, Visual Studio Code will perform the necessary changes to solve the problem automatically:

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.