Predefined Live Templates for TypeScript
This topic lists all predefined live templates for TypeScript in ReSharper 2016.2. For more information about live templates, see Creating Source Code Using Live Templates
Template | Details |
---|---|
ctx
|
Current file context $CTX$
|
nguid
|
Insert new GUID $GUID$
|
do (Imported JScript Snippets) |
Code snippet for do...while loop do {
$END$
} while($COND$) |
dw (Imported JScript Snippets) |
Code snippet for a writeln function call document.writeln($END$); |
else (Imported JScript Snippets) |
Code snippet for an else statement else {
$END$
} |
for (Imported JScript Snippets) |
Code snippet for a for loop for ($VARKIND$ $VAR$ = 0; $VAR$ < $LENGTH$; $VAR$++){
$END$
}
|
forin (Imported JScript Snippets) |
Code snippet for a for...in loop for ($VARKIND$ $VAR$ in $ARRAY$){
$END$
}
|
forr (Imported JScript Snippets) |
Code snippet for a reverse for loop for ($VARKIND$ $VAR$=$LENGTH$-1;$VAR$ >=0; $VAR$--){
$END$
}
|
fun
|
Create TypeScript function function($parameters$){
$END$
} |
function (Imported JScript Snippets) |
Code snippet for a function function $name$($parameters$){
$END$
} |
if (Imported JScript Snippets) |
Code snippet for an if statement if ($COND$){
$END$
} |
while (Imported JScript Snippets) |
Code snippet for a while loop while ($COND$){
$END$
} |
with (Imported JScript Snippets) |
Code snippet for a with statement with ($EXPR$){
$END$
} |
switch (Imported JScript Snippets) |
Code snippet for a switch statement switch ($EXPR$){
case $CASE1$:
$END$
default:
} |
try (Imported JScript Snippets) |
Code snippet for a try catch statement try {
$END$
} catch (e) {
} |
itar
|
Iterate an array for (var $INDEX$=0;$INDEX$<$ARRAY$.length;$INDEX$++){
var $VAR$ = $ARRAY$[$INDEX$];$END$
}
|
forof (Imported JScript Snippets) |
Code snippet for a for-of loop for ($VARKIND$ $VAR$ of $ARRAY$){
$END$
}
|
ctor (Imported TypeScript Snippets) |
Code snippet for default constructor declaration with body constructor() { $END$ } |
class (Imported TypeScript Snippets) |
Code snippet for class class $Name$ {
$END$
} |
module (Imported TypeScript Snippets) |
Code snippet for module module $Name$ {
$END$
} |
interface (Imported TypeScript Snippets) |
Code snippet for interface interface I$Name$ {
$END$
} |
enum (Imported TypeScript Snippets) |
Code snippet for enum enum $Name$ {
$END$
} |
nidx (Imported TypeScript Snippets) |
Code snippet for number indexer annotation [index: number]: $Type$;
|
sidx (Imported TypeScript Snippets) |
Code snippet for string indexer annotation [index: string]: $Type$;
|
prop (Imported TypeScript Snippets) |
Code snippet for property get $Name$():$Type$ {$BODY1$}
set $Name$(value:$Type$) {$END$} |