ReSharper | Templates Explorer | Live Templates | JavaScript
warning
Starting from ReSharper 2022.2, active development of productivity features for JavaScript, TypeScript, JSON, CSS, and Protobuf is suspended, and these features are disabled by default. To enable them, select the corresponding checkboxes on the Environment | Products & Features page of ReSharper options Alt+R, O: JavaScript and TypeScript, CSS Language, and Protobuf.
This topic lists all predefined live templates for JavaScript in ReSharper 2024.3. For more information about live templates, refer to Create source code using live templates.
Template
Details
ctx
Current file context
Scope Everywhere
Body
$CTX$
Parameters
CTX - Provides a list of items describing current context. This includes file name, containing type name, namespace name, etc.
nguid
Insert new GUID
Scope Everywhere
Body
$GUID$
Parameters
GUID - Generates a new Globally Unique Identifier (GUID)
do
do...while loop
Scope JS statements
Body
do{
$END$
}while($COND$)
Parameters
COND - no macro
END - The caret position after the template is applied.
dw
writeln function call
Scope JS statements
Body
document.writeln($END$);
Parameters
END - The caret position after the template is applied.
else
else statement
Scope JS statements
Body
else{
$END$
}
Parameters
END - The caret position after the template is applied.