Cannot find name 'chrome'



How to solve this problem :

  1. Run npm i @types/chrome
  2. Add /// <reference types="chrome"/> to the top of file.