Step 1: Getting the definitions
The definitions are available from this repository: https://github.com/jensarps/indexeddb-types. You can clone or download the repository, or just download the IndexedDB.js file.
Step 2: Telling your IDE to use it as a library
This will work different among IDEs, but will probably pretty similar and straightforward. This is how it works for WebStorm and PHPStorm:
There, click the “Add…” button which will open the following window:
Type “IndexedDB” as name and select “Global” as visibility. Next, click on the “Attach…” button to open up a file dialog:
Navigate to the IndexedDB.js file, select it and click “OK”. The Library window now should look like this:
Click “Apply” or “OK” and your done.
Step 3: Fun and Profit