The language server surfaces the SFCC API's documentation right where you are typing - no switching to the docs site to remember a method signature or what an argument expects
Hover
Hover over a symbol to see a formatted card with its kind, type signature, and documentation
var OrderMgr = require('dw/order/OrderMgr');
OrderMgr.getOrder('00001');
// ^ hover shows the signature and JSDoc for getOrder()A hover card includes:
- Kind & signature - e.g.
(method) OrderMgr.getOrder(orderNo: string): Order - Documentation - the official JSDoc description, rendered as Markdown, with
@param,@returns,@example, and@deprecatedtags - Resolved links -
{@link …}references in the docs become clickable
Hover works on the whole dw.* API, on your own functions and variables (showing their inferred types and any JSDoc you wrote), and on symbols brought in via require() or importScript
Signature Help
As you fill in a function call, signature help pops up to show the parameter list and highlights the argument you are currently typing
var URLUtils = require('dw/web/URLUtils');
URLUtils.url('Product-Show', 'pid', product.ID);
// └─ signature help shows each parameter and bolds the active oneSignature help:
- Triggers automatically on
(and,, and can be re-invoked withCmd/Ctrl+Shift+Space - Shows per-parameter documentation pulled from
@paramtags - Steps through overloads when an API method has more than one signature
- Works for the
dw.*API and for your own JSDoc-documented functions
Inlay Hints
Inlay hints display non-editable context between your source tokens. Enable Editor: Inlay Hints Enabled in VS Code to show the hints supplied by the scripting service
| Hint category | Current server defaults |
|---|---|
| Parameter names at call sites | Enabled for all parameter categories, subject to the TypeScript service's placement rules |
| Function-like return types | Enabled |
| Property declaration types | Enabled |
| Inferred variable types | Disabled |
/** @param {number} amount @param {string} currency */
function formatAmount(amount, currency) {
return amount.toFixed(2) + ' ' + currency;
}
var label = formatAmount(50, 'USD');The call can display amount: and currency: next to its arguments, and the function can display its inferred return type. Those labels are editor overlays, not text inserted into the file. Explicit annotations or redundant names can affect which hints appear
Inlay hints wait for the semantic project to be ready. The SFCC server has its own hint preferences; changing the built-in TypeScript extension's preferences does not necessarily change these defaults