WebStorm 2022.1 Help

Inlay Hints

Inlay hints appear in the editor and provide you with additional information about your code to make it easier to read.

  • Parameter hints appear next to a parameter in a function call and show you the name of the parameter from the function definition.

    Parameter hints in JavaScript
  • Return type hints for chained methods are inferred from a JSDoc comment or based on the static analysis of your code. Return type hints are by default shown for chained methods that are split between multiple lines and return at least 2 different types.

    Return types for chained methods
  • Type annotations show a variable type or a function return type next to their definition. Type annotations are inferred from JSDoc comments or static analysis of your code.

    Type hints in JavaScript
  • URL path inlay hints appear at URL mappings and allow you to quickly access the related actions.

In inlay hints settings you can configure which types of information you want to get in hints.

Enable inlay hints

  1. Open the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | Inlay Hints, and select the checkboxes next to the languages, technologies, and contexts for which you want WebStorm to show inlay hints.

  2. Configure inlay hints for specific languages and technologies on the pages below. See View inlay hints and View inlay hints

Change inlay hints appearance

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | Color Scheme | Language Defaults, then select Inline hints.

  2. Select the inlay hint type and state, and configure the font color and effects as required.

Last modified: 05 May 2022