The properties are created dynamically, that's why WebStorm is not able to resolve them during static code analysis.
To work out the issue, you need installing yargs
typings (@types/yargs
): hit Alt+Enter
on "yargs"
in require("yargs")
, choose Install Typescript definitions for better type information:
This should help: