WebStorm 2019.2 Help

Viewing Method Parameter Information

Parameter hints show the names of parameters in methods and functions.

In TypeScript and JavaScript, parameter hints are by default shown right in the editor making your code easier to read.

ws_typescript_parameter_hints.png

You can turn off parameter hints in the editor and view them in a popup.

ws_view_parameter_info.png

Finally, you can configure WebStorm to show a tooltip with parameter hints for the method selected from the suggestion list for completion.

Configure parameter hints in the editor

By default, parameter hints are shown only for values that are literals or function expressions but not for named objects.

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | General | Appearance. The Appearance page opens.

  2. Click Configure next to the Show parameter name hint checkbox (the checkbox is selected by default).

  3. In the Configure Parameter Name Hints dialog that opens, select the Show name for all arguments checkbox in the Options area.

  4. To turn off parameter hints in the editor, clear the Show parameter name hints checkbox.

View the parameter hints for a method in a popup

Place the caret anywhere within the call of the method or function and press Ctrl+P or choose View | Parameter Info from the main menu.

Configure the appearance and behavior of parameter hints in popups

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | General | Code Completion.

  2. To have a complete method or function signature shown rather than a list of required types, select the Show full method signatures checkbox in the Parameter info area.

  3. To have the list of parameter types for the called method or function shown automatically after a certain delay, select the Auto pop-up (in ms) checkbox and specify the time period in milliseconds.

  4. If applicable, select the Show parameter name hints on completion checkbox.

Configure inlay hints

An Inlay Hint is a type hint that is displayed next to the definition of a variable or a function and shows the type of this variable or the return type of this function.

  • To configure inlay hints for JavaScript:

    1. In the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | Inlay Hints | JavaScript.

    2. Use the controls on the page to enable or disable inlay hints for functions, parameters, variables, and fields. Check the preview in the bottom area.

  • To configure inlay hints for TypeScript:

    1. In the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | Inlay Hints | TypeScript.

    2. Use the controls on the page to enable or disable inlay hints for functions, parameters, variables, and fields. Check the preview in the bottom area.

Last modified: 17 September 2019

See Also