holden321
holden321

Reputation: 1183

PHPStorm: Unresolved variable/type; how to resolve?

Where should I find or how to create a library to remove the warnings about unresolved variables/types?

Examples:

var fs=window.webkitRequestFileSystem; //Unresolved variable webkitRequestFileSystem

var audio=new Audio(); //Unresolved type Audio

Upvotes: 2

Views: 6359

Answers (2)

Dicky Tsang
Dicky Tsang

Reputation: 6343

Just a ONE-LINE solution

var audio = document.createElement('audio');

Upvotes: -2

CrazyCoder
CrazyCoder

Reputation: 402581

Download the Closure Compiler.

Unpack the .js files from externs.zip, there will be fileapi.js file, add this file to the JavaScript libraries in PhpStorm to get the code completion and resolution.

You may want to create a library with all these .js files in case you are using other APIs.

Upvotes: 3

Related Questions