I'm trying to use the Clipboard API
which already works in browsers, but PhpStorm doesn't know of it.
What does it take to make PhpStorm recognise it? I've set the JavaScript-language version in the project-settings to ECMAScript 6
.
Thanks to Lena for the right direction, I've found a way so sort it.
Under Settings > Javascript > Libraries
click on Download
. Select dom-clipboard-api
from the list and click download and install
.
The library stub consists of this: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/dom-clipboard-api/index.d.ts
I needed to invalidate caches and restart PhpStorm, but afterwards it worked as I expected.