Skip to content

Commit 016d891

Browse files
committed
Add information about use of inlay hints for JS/TS
1 parent 0da0da0 commit 016d891

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
96.3 KB
Loading

docs/javascript/write-and-edit-code.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,21 @@ Right-click on `render` and choose **Peek Definition** from the content menu. Or
9191

9292
Close the peeked definition window by choosing the small box with an "x" at the top right of the pop-up window.
9393

94+
::: moniker range=">=vs-2022"
95+
## View inlay hints
96+
97+
Inlay hints show additional information about source code that is rendered inline. This is usually used to show inferred types, parameter names, and other implicit information from your code directly in your editor.
98+
99+
![Inlay hints](../javascript/media/vs-2022/write-code-inlay-hints.png)
100+
101+
To configure inlay hints:
102+
103+
1. Go to **Tools > Options > Text Editor > All Languages > Inlay Hints**, and select an option for viewing inlay hints.
104+
105+
1. Go to **Tools > Options > Text Editor > JavaScript/TypeScript > Advanced > General** and configure the inlay hints you want to hide or show.
106+
107+
::: moniker-end
108+
94109
## Use code snippets
95110

96111
Visual Studio provides useful *code snippets* that you can use to quickly and easily generate commonly used code blocks. [Code snippets](../ide/code-snippets.md) are available for different programming languages including JavaScript. Let's add a `for` loop to your code file.

0 commit comments

Comments
 (0)