leros
leros

Reputation: 577

WebStorm not remembering type hints

I'm using WebStorm with plain JavaScript. It's inferring types, but then seems to forget the type immediately. Once I call a function, it seems to pick up the type again. See the screenshot below.

Is there a way to make this work better? I'd be glad to manually provide the type hint.

enter image description here

Upvotes: 0

Views: 155

Answers (1)

user12662727
user12662727

Reputation: 26

Looks like you're using 'fluent-ffmpeg'. You can install TypeScript typings for it, that will improve code assistance a lot, in pure JS.

Just add "@types/fluent-ffmpeg" to your 'devDependencies'. After npm install, WebStorm will behave much better, as it will use the typings for code assistance.

Upvotes: 1

Related Questions