1 2/* 3 4https://github.com/nathanchapman/vscode-javascript-snippets/blob/main/snippets/global.code-snippets 5 6*/ 7 8const jssnippetarray = { 9 "cul input": { 10 "scope": "javascript", 11 "prefix": "culin", 12 "body": 13 "export const ${1:inputname} = () => ${1:inputname}_in" 14 15 }, 16 "cul function": { // make make a block and expression type? 17 "scope": "javascript", 18 "prefix": "cul", 19 "body": "export const ${1:formulaname} = () => ${99:0 // formula body}" 20 }, 21 ///// 22 "cul function expression": { 23 "scope": "javascript", 24 "prefix": "cule", 25 "body": "export const ${1:formulaname} = () => ${99:0 // formula body}" 26 }, 27 "cul function block": { 28 "scope": "javascript", 29 "prefix": "culb", 30 "body": "export const ${1:formulaname} = () => {\n" + 31 " ${99:return 0 // formula body}\n" + 32 "}" 33 }, 34 ///// 35 "cul prev": { 36 "scope": "javascript", 37 "prefix": "prev", 38 "body": 39 "${1:call}({${2:input}_in:${2:input}() - 1})" 40 }, 41 42 43 44 45 /*"cul accumulator": { 46 "scope": "javascript", 47 "prefix": "culacc", 48 "body": 49 `export const $1 = () => { 50 if ($2() == 0) return 0; 51 else return $1({ $2_in: $2() - 1 }) + d$1(); 52 } 53 54 export const d$1 = () => $3` 55 56 },*/ 57 58 /////////////////////////// 59 60 // Declarations 61 /*"var statement": { 62 "scope": "javascript,typescript,javascriptreact,typescriptreact", 63 "prefix": "v", 64 "body": "var ${99:// Type here}", 65 "description": "var statement" 66 }, 67 "var assignment": { 68 "scope": "javascript,typescript,javascriptreact,typescriptreact", 69 "prefix": "v=", 70 "body": "var ${1:name} = ${2:value}", 71 "description": "var assignment" 72 }, 73 "let statement": { 74 "scope": "javascript,typescript,javascriptreact,typescriptreact", 75 "prefix": "l", 76 "body": "let ${99:// Type here}", 77 "description": "let statement" 78 }, 79 "let assignment": { 80 "scope": "javascript,typescript,javascriptreact,typescriptreact", 81 "prefix": "l=", 82 "body": "let ${1:name} = ${2:value}", 83 "description": "let assignment" 84 }, 85 "destructuring let assignment": { 86 "scope": "javascript,typescript,javascriptreact,typescriptreact", 87 "prefix": "dl=", 88 "body": "let {${1:name}} = ${2:value}", 89 "description": "destructuring let assignment" 90 }, 91 "const statement": { 92 "scope": "javascript,typescript,javascriptreact,typescriptreact", 93 "prefix": "co", 94 "body": "const ${99:// Type here}", 95 "description": "const statement" 96 }, 97 "const assignment": { 98 "scope": "javascript,typescript,javascriptreact,typescriptreact", 99 "prefix": "co=", 100 "body": "const ${1:name} = ${2:value}", 101 "description": "const assignment" 102 }, 103 "destructuring const assignment": { 104 "scope": "javascript,typescript,javascriptreact,typescriptreact", 105 "prefix": "dco=", 106 "body": "const {${1:name}} = ${2:value}", 107 "description": "destructuring const assignment" 108 },*/ 109 // Flow Control 110 "if statement": { // maybe add ifr (if-return)? 111 "scope": "javascript,typescript,javascriptreact,typescriptreact", 112 "prefix": "if", 113 "body": "if (${1:condition}) {\n\t${99:// Type here}\n}", 114 "description": "if statement" 115 }, 116 "else statement": { 117 "scope": "javascript,typescript,javascriptreact,typescriptreact", 118 "prefix": "el", 119 "body": "else {\n\t${99:// Type here}\n}", 120 "description": "else statement" 121 }, 122 "if/else statement": { 123 "scope": "javascript,typescript,javascriptreact,typescriptreact", 124 "prefix": "ifel", 125 "body": "if (${1:condition}) {\n\t${99:// Type here}\n} else {\n\t\n}", 126 "description": "if/else statement" 127 }, 128 "else if statement": { 129 "scope": "javascript,typescript,javascriptreact,typescriptreact", 130 "prefix": "elif", 131 "body": "else if (${1:condition}) {\n\t${99:// Type here}\n}", 132 "description": "else if statement" 133 }, 134 "ternary operator": { 135 "scope": "javascript,typescript,javascriptreact,typescriptreact", 136 "prefix": "ter", 137 "body": "${1:condition} ? ${2:expression} : ${3:expression}", 138 "description": "ternary operator" 139 }, 140 "for loop": { 141 "scope": "javascript,typescript,javascriptreact,typescriptreact", 142 "prefix": "fl", 143 "body": "for (let ${1:i} = 0, ${2:len} = ${3:iterable}.length; ${1:i} < ${2:len}; ${1:i}++) {\n\t${99:// Type here}\n}", 144 "description": "for loop" 145 }, 146 "reverse for loop": { 147 "scope": "javascript,typescript,javascriptreact,typescriptreact", 148 "prefix": "rfl", 149 "body": "for (let ${1:i} = ${2:iterable}.length - 1; ${1:i} >= 0; ${1:i}--) {\n\t${99:// Type here}\n}", 150 "description": "reverse for loop" 151 }, 152 "for in loop": { 153 "scope": "javascript,typescript,javascriptreact,typescriptreact", 154 "prefix": "fi", 155 "body": "for (let ${1:key} in ${2:array}) {\n\tif (${2:array}.hasOwnProperty(${1:key})) {\n\t\t${99:// Type here}\n\t}\n}", 156 "description": "for in loop" 157 }, 158 "for of loop (ES6)": { 159 "scope": "javascript,typescript,javascriptreact,typescriptreact", 160 "prefix": "fo", 161 "body": "for (let ${1:key} of ${2:array}) {\n\t${99:// Type here}\n}", 162 "description": "for of loop (ES6)" 163 }, 164 "while loop": { 165 "scope": "javascript,typescript,javascriptreact,typescriptreact", 166 "prefix": "wl", 167 "body": "while (${1:condition}) {\n\t${99:// Type here}\n}", 168 "description": "while loop" 169 }, 170 "try/catch": { 171 "scope": "javascript,typescript,javascriptreact,typescriptreact", 172 "prefix": "tc", 173 "body": "try {\n\t${0:// Type here}\n} catch (${1:err}) {\n\t\n}", 174 "description": "try/catch" 175 }, 176 "try/finally": { 177 "scope": "javascript,typescript,javascriptreact,typescriptreact", 178 "prefix": "tf", 179 "body": "try {\n\t${0:// Type here}\n} finally {\n\t\n}", 180 "description": "try/finally" 181 }, 182 "try/catch/finally": { 183 "scope": "javascript,typescript,javascriptreact,typescriptreact", 184 "prefix": "tcf", 185 "body": "try {\n\t${0:// Type here}\n} catch (${1:err}) {\n\t\n} finally {\n\t\n}", 186 "description": "try/catch/finally" 187 }, 188 "switch case": { 189 "scope": "javascript,typescript,javascriptreact,typescriptreact", 190 "prefix": "sw", 191 "body": "switch (${1:expr}) {\n\tcase ${2:value}:\n\t\treturn ${99:value}\n\tdefault:\n\t\treturn\n}", 192 "description": "switch case" 193 }, 194 // Functions 195 /* 196 "anonymous function": { 197 "scope": "javascript,typescript,javascriptreact,typescriptreact", 198 "prefix": "f", 199 "body": "function (${1:arguments}) {\n\t${99:// Type here}\n}", 200 "description": "anonymous function" 201 }, 202 "named function": { 203 "scope": "javascript,typescript,javascriptreact,typescriptreact", 204 "prefix": "fn", 205 "body": "function ${1:name}(${2:arguments}) {\n\t${99:// Type here}\n}", 206 "description": "named function" 207 }, 208 "immediately-invoked function expression (IIFE)": { 209 "scope": "javascript,typescript,javascriptreact,typescriptreact", 210 "prefix": "iife", 211 "body": "((${1:arguments}) => {\n\t${99:// Type here}\n})(${2})", 212 "description": "immediately-invoked function expression (IIFE)" 213 }, 214 "function apply": { 215 "scope": "javascript,typescript,javascriptreact,typescriptreact", 216 "prefix": "fa", 217 "body": "${1:fn}.apply(${2:this}, ${3:arguments})", 218 "description": "function apply" 219 }, 220 "function call": { 221 "scope": "javascript,typescript,javascriptreact,typescriptreact", 222 "prefix": "fc", 223 "body": "${1:fn}.call(${2:this}, ${3:arguments})", 224 "description": "function call" 225 }, 226 "function bind": { 227 "scope": "javascript,typescript,javascriptreact,typescriptreact", 228 "prefix": "fb", 229 "body": "${1:fn}.bind(${2:this}, ${3:arguments})", 230 "description": "function bind" 231 }, 232 "arrow function (ES6)": { 233 "scope": "javascript,typescript,javascriptreact,typescriptreact", 234 "prefix": "af", 235 "body": "(${1:arguments}) => ${2:statement}", 236 "description": "arrow function (ES6)" 237 }, 238 "arrow function with body (ES6)": { 239 "scope": "javascript,typescript,javascriptreact,typescriptreact", 240 "prefix": "afb", 241 "body": "(${1:arguments}) => {\n\t${99:// Type here}\n}", 242 "description": "arrow function with body (ES6)" 243 }, 244 "generator function (ES6)": { 245 "scope": "javascript,typescript,javascriptreact,typescriptreact", 246 "prefix": "gf", 247 "body": "function* (${1:arguments}) {\n\t${99:// Type here}\n}", 248 "description": "generator function (ES6)" 249 }, 250 "named generator function (ES6)": { 251 "scope": "javascript,typescript,javascriptreact,typescriptreact", 252 "prefix": "gfn", 253 "body": "function* ${1:name}(${2:arguments}) {\n\t${99:// Type here}\n}", 254 "description": "named generator function (ES6)" 255 },*/ 256 // Iterables 257 /* 258 "sequence of 0..n": { 259 "scope": "javascript,typescript,javascriptreact,typescriptreact", 260 "prefix": "seq", 261 "body": "[...Array(${1:length}).keys()]${99:// Type here}", 262 "description": "sequence of 0..n" 263 }, 264 "forEach loop": { 265 "scope": "javascript,typescript,javascriptreact,typescriptreact", 266 "prefix": "fe", 267 "body": "${1}
267.forEach((${2:item}) => {\n\t${99:// Type here}\n})", 268 "description": "forEach loop" 269 },*/ 270 "map": { 271 "scope": "javascript,typescript,javascriptreact,typescriptreact", 272 "prefix": "map", 273 "body": "${1}.map((${2:item}) => {\n\t${99:// Type here}\n})", 274 "description": "map" 275 }, 276 "reduce": { 277 "scope": "javascript,typescript,javascriptreact,typescriptreact", 278 "prefix": "reduce", 279 "body": "${1}.reduce((${2:previous}, ${3:current}) => {\n\t${99:// Type here}\n}${4:, initial})", 280 "description": "reduce" 281 }, 282 "filter": { 283 "scope": "javascript,typescript,javascriptreact,typescriptreact", 284 "prefix": "filter", 285 "body": "${1}.filter(${2:item} => {\n\t${99:// Type here}\n})", 286 "description": "filter" 287 }, 288 "find": { 289 "scope": "javascript,typescript,javascriptreact,typescriptreact", 290 "prefix": "find", 291 "body": "${1}.find(${2:item} => {\n\t${99:// Type here}\n})", 292 "description": "find" 293 },/* 294 // Objects and Classes 295 "object literal": { 296 "scope": "javascript,typescript,javascriptreact,typescriptreact", 297 "prefix": "ol", 298 "body": "{\n\tkv${99:// Type here}\n}", 299 "description": "object literal" 300 }, 301 "same-line object literal": { 302 "scope": "javascript,typescript,javascriptreact,typescriptreact", 303 "prefix": "slol", 304 "body": "{ kv${99:// Type here} }", 305 "description": "same-line object literal" 306 }, 307 "key/value pair": { 308 "scope": "javascript,typescript,javascriptreact,typescriptreact", 309 "prefix": "kv", 310 "body": "${1:key}: ${2:value},", 311 "description": "key/value pair" 312 }, 313 "class (ES6)": { 314 "scope": "javascript,typescript,javascriptreact,typescriptreact", 315 "prefix": "c", 316 "body": "class ${1:name} {\n\tconstructor(${2:arguments}) {\n\t\t${99:// Type here}\n\t}\n}", 317 "description": "class (ES6)" 318 }, 319 "child class (ES6)": { 320 "scope": "javascript,typescript,javascriptreact,typescriptreact", 321 "prefix": "cex", 322 "body": "class ${1:name} extends ${2:base} {\n\tconstructor(${3:arguments}) {\n\t\tsuper(${3:arguments})\n\t\t${99:// Type here}\n\t}\n}", 323 "description": "child class (ES6)" 324 }, 325 "class constructor (ES6)": { 326 "scope": "javascript,typescript,javascriptreact,typescriptreact", 327 "prefix": "ctor", 328 "body": "constructor(${1:arguments}) {\n\tsuper(${1:arguments})${99:// Type here}\n}", 329 "description": "class constructor (ES6)" 330 }, 331 "method (ES6 syntax)": { 332 "scope": "javascript,typescript,javascriptreact,typescriptreact", 333 "prefix": "m", 334 "body": "${1:method}(${2:arguments}) {\n\t${99:// Type here}\n}", 335 "description": "method (ES6 syntax)" 336 }, 337 "getter (ES6 syntax)": { 338 "scope": "javascript,typescript,javascriptreact,typescriptreact", 339 "prefix": "get", 340 "body": "get ${1:property}() {\n\t${99:// Type here}\n}", 341 "description": "getter (ES6 syntax)" 342 }, 343 "setter (ES6 syntax)": { 344 "scope": "javascript,typescript,javascriptreact,typescriptreact", 345 "prefix": "set", 346 "body": "set ${1:property}(${2:value}) {\n\t${99:// Type here}\n}", 347 "description": "setter (ES6 syntax)" 348 }, 349 "getter and setter (ES6 syntax)": { 350 "scope": "javascript,typescript,javascriptreact,typescriptreact", 351 "prefix": "gs", 352 "body": "get ${1:property}() {\n\t${99:// Type here}\n}\nset ${1:property}(${2:value}) {\n\t\n}", 353 "description": "getter and setter (ES6 syntax)" 354 }, 355 "prototypal constructor": { 356 "scope": "javascript,typescript,javascriptreact,typescriptreact", 357 "prefix": "pctor", 358 "body": "var ${1:Class} = function(${2:arguments}) {\n\t${99:// Type here}\n}", 359 "description": "prototypal constructor" 360 }, 361 "prototype method": { 362 "scope": "javascript,typescript,javascriptreact,typescriptreact", 363 "prefix": "proto", 364 "body": "${1:Class}.prototype.${2:method} = function(${3:arguments}) {\n\t${99:// Type here}\n}", 365 "description": "prototype method" 366 }, 367 "Object.assign": { 368 "scope": "javascript,typescript,javascriptreact,typescriptreact", 369 "prefix": "oa", 370 "body": "Object.assign(${1:dest}, ${2:source})", 371 "description": "Object.assign" 372 }, 373 "Object.assign copy (shallow clone)": { 374 "scope": "javascript,typescript,javascriptreact,typescriptreact", 375 "prefix": "oc", 376 "body": "Object.assign({}, ${1:original}, ${2:source})", 377 "description": "Object.assign copy (shallow clone)" 378 }, 379 // Returning values 380 "return": { 381 "scope": "javascript,typescript,javascriptreact,typescriptreact", 382 "prefix": "r", 383 "body": "return ${99:// Type here}", 384 "description": "return" 385 }, 386 "return Promise (ES6)": { 387 "scope": "javascript,typescript,javascriptreact,typescriptreact", 388 "prefix": "rp", 389 "body": "return new Promise((resolve, reject) => {\n\t${99:// Type here}\n})", 390 "description": "return Promise (ES6)" 391 }, 392 "return complex value (such as JSX components)": { 393 "scope": "javascript,typescript,javascriptreact,typescriptreact", 394 "prefix": "rc", 395 "body": "return (\n\t${99:// Type here}\n)", 396 "description": "return complex value (such as JSX components)" 397 }, 398 // Types 399 "typeof": { 400 "scope": "javascript,typescript,javascriptreact,typescriptreact", 401 "prefix": "tof", 402 "body": "typeof ${1:source} === '${2:undefined}'", 403 "description": "typeof" 404 }, 405 "instanceof": { 406 "scope": "javascript,typescript,javascriptreact,typescriptreact", 407 "prefix": "iof", 408 "body": "${1:source} instanceof ${2:Object}", 409 "description": "instanceof" 410 }, 411 // Promises 412 "promise": { 413 "scope": "javascript,typescript,javascriptreact,typescriptreact", 414 "prefix": "pr", 415 "body": "new Promise((resolve, reject) => {\n\t${99:// Type here}\n})", 416 "description": "Promise (ES6)" 417 }, 418 "promise.then": { 419 "scope": "javascript,typescript,javascriptreact,typescriptreact", 420 "prefix": "then", 421 "body": "${1:promise}.then((${2:value}) =>
421 {\n\t${99:// Type here}\n})", 422 "description": "Promise.then" 423 }, 424 "promise.catch": { 425 "scope": "javascript,typescript,javascriptreact,typescriptreact", 426 "prefix": "catch", 427 "body": "${1:promise}.catch((${2:err}) => {\n\t${99:// Type here}\n})", 428 "description": "Promise.catch" 429 }, 430 // ES6 Modules 431 "export (ES6)": { 432 "scope": "javascript,typescript,javascriptreact,typescriptreact", 433 "prefix": "ex", 434 "body": "export ${1:member}", 435 "description": "export (ES6)" 436 }, 437 "export default (ES6)": { 438 "scope": "javascript,typescript,javascriptreact,typescriptreact", 439 "prefix": "exd", 440 "body": "export default ${1:member}", 441 "description": "export default (ES6)" 442 }, 443 "import module (ES6)": { 444 "scope": "javascript,typescript,javascriptreact,typescriptreact", 445 "prefix": "im", 446 "body": "import ${1:*} from '${2:module}'", 447 "description": "import module (ES6)" 448 }, 449 "import module as (ES6)": { 450 "scope": "javascript,typescript,javascriptreact,typescriptreact", 451 "prefix": "ima", 452 "body": "import ${1:*} as ${2:name} from '${3:module}'", 453 "description": "import module as (ES6)" 454 }, 455 // Node.js 456 "Node.js style callback": { 457 "scope": "javascript,typescript,javascriptreact,typescriptreact", 458 "prefix": "cb", 459 "body": "(err, ${1:value}) => {${99:// Type here}}", 460 "description": "Node.js style callback" 461 }, 462 "require": { 463 "scope": "javascript,typescript,javascriptreact,typescriptreact", 464 "prefix": "re", 465 "body": "require('${1:module}')", 466 "description": "require" 467 }, 468 "require local": { 469 "scope": "javascript,typescript,javascriptreact,typescriptreact", 470 "prefix": "rel", 471 "body": "require('./${1:module}')", 472 "description": "require local" 473 }, 474 "require assignment": { 475 "scope": "javascript,typescript,javascriptreact,typescriptreact", 476 "prefix": "req", 477 "body": "const ${1:module} = require('${1:module}')", 478 "description": "require assignment" 479 }, 480 "require assignment local": { 481 "scope": "javascript,typescript,javascriptreact,typescriptreact", 482 "prefix": "reql", 483 "body": "const ${1:module} = require('./${1:module}')", 484 "description": "require assignment local" 485 }, 486 "destructuring require assignment": { 487 "scope": "javascript,typescript,javascriptreact,typescriptreact", 488 "prefix": "dreq", 489 "body": "const {${1:module}} = require('${1:module}')", 490 "description": "destructuring require assignment" 491 }, 492 "destructuring require assignment local": { 493 "scope": "javascript,typescript,javascriptreact,typescriptreact", 494 "prefix": "dreql", 495 "body": "const {${1:module}} = require('./${1:module}')", 496 "description": "destructuring require assignment local" 497 }, 498 "exports.member": { 499 "scope": "javascript,typescript,javascriptreact,typescriptreact", 500 "prefix": "em", 501 "body": "exports.${1:member} = ${2:value}", 502 "description": "exports.member" 503 }, 504 "module.exports": { 505 "scope": "javascript,typescript,javascriptreact,typescriptreact", 506 "prefix": "me", 507 "body": "module.exports = ${1:name}", 508 "description": "module.exports" 509 }, 510 "module exports object": { 511 "scope": "javascript,typescript,javascriptreact,typescriptreact", 512 "prefix": "meo", 513 "body": "module.exports = {\n\t${1:member}\n}", 514 "description": "module exports object" 515 }, 516 "event handler": { 517 "scope": "javascript,typescript,javascriptreact,typescriptreact", 518 "prefix": "on", 519 "body": "${1:emitter}.on('${2:event}', (${3:arguments}) => {\n\t${99:// Type here}\n})", 520 "description": "event handler" 521 }, 522 // Testing (Jest, Mocha, Jasmine, etc.) 523 "describe": { 524 "scope": "javascript,typescript,javascriptreact,typescriptreact", 525 "prefix": "desc", 526 "body": "describe('${1:description}', () => {\n\t${99:// Type here}\n})", 527 "description": "describe" 528 }, 529 "context": { 530 "scope": "javascript,typescript,javascriptreact,typescriptreact", 531 "prefix": "cont", 532 "body": "context('${1:description}', () => {\n\t${99:// Type here}\n})", 533 "description": "context" 534 }, 535 "test (synchronous)": { 536 "scope": "javascript,typescript,javascriptreact,typescriptreact", 537 "prefix": "it", 538 "body": "it('${1:description}', () => {\n\t${99:// Type here}\n})", 539 "description": "test (synchronous)" 540 }, 541 "test (asynchronous)": { 542 "scope": "javascript,typescript,javascriptreact,typescriptreact", 543 "prefix": "ita", 544 "body": "it('${1:description}', async () => {\n\t${99:// Type here}\n})", 545 "description": "test (asynchronous)" 546 }, 547 "test (callback)": { 548 "scope": "javascript,typescript,javascriptreact,typescriptreact", 549 "prefix": "itc", 550 "body": "it('${1:description}', (done) => {\n\t${99:// Type here}\n\tdone()\n})", 551 "description": "test (callback)" 552 }, 553 "before test suite": { 554 "scope": "javascript,typescript,javascriptreact,typescriptreact", 555 "prefix": "bf", 556 "body": "before(() =>
556 {\n\t${99:// Type here}\n})", 557 "description": "before test suite" 558 }, 559 "before each test": { 560 "scope": "javascript,typescript,javascriptreact,typescriptreact", 561 "prefix": "bfe", 562 "body": "beforeEach(() => {\n\t${99:// Type here}\n})", 563 "description": "before each test" 564 }, 565 "after test suite": { 566 "scope": "javascript,typescript,javascriptreact,typescriptreact", 567 "prefix": "aft", 568 "body": "after(() => {\n\t${99:// Type here}\n})", 569 "description": "after test suite" 570 }, 571 "after each test": { 572 "scope": "javascript,typescript,javascriptreact,typescriptreact", 573 "prefix": "afe", 574 "body": "afterEach(() => {\n\t${99:// Type here}\n})", 575 "description": "after each test" 576 },*/ 577 // Console 578 "console.log": { 579 "scope": "javascript,typescript,javascriptreact,typescriptreact", 580 "prefix": "cl", 581 "body": "console.log(${99:// Type here})", 582 "description": "console.log" 583 }, 584 "console.error": { 585 "scope": "javascript,typescript,javascriptreact,typescriptreact", 586 "prefix": "ce", 587 "body": "console.error(${99:// Type here})", 588 "description": "console.error" 589 }, 590 "console.warn": { 591 "scope": "javascript,typescript,javascriptreact,typescriptreact", 592 "prefix": "cw", 593 "body": "console.warn(${99:// Type here})", 594 "description": "console.warn" 595 }, 596 "console.log labeled": { 597 "scope": "javascript,typescript,javascriptreact,typescriptreact", 598 "prefix": "cll", 599 "body": "console.log('${99:// Type here}', ${99:// Type here})", 600 "description": "console.log labeled" 601 }, 602 "console.error labeled": { 603 "scope": "javascript,typescript,javascriptreact,typescriptreact", 604 "prefix": "cel", 605 "body": "console.error('${99:// Type here}', ${99:// Type here})", 606 "description": "console.error labeled" 607 }, 608 "console.warn labeled": { 609 "scope": "javascript,typescript,javascriptreact,typescriptreact", 610 "prefix": "cwl", 611 "body": "console.warn('${99:// Type here}', ${99:// Type here})", 612 "description": "console.warn labeled" 613 },/* 614 // Timers 615 "setTimeout": { 616 "scope": "javascript,typescript,javascriptreact,typescriptreact", 617 "prefix": "st", 618 "body": "setTimeout(() => {\n\t${99:// Type here}\n}, ${1:delay})", 619 "description": "setTimeout" 620 }, 621 "setInterval": { 622 "scope": "javascript,typescript,javascriptreact,typescriptreact", 623 "prefix": "si", 624 "body": "setInterval(() => {\n\t${99:// Type here}\n}, ${1:delay})", 625 "description": "setInterval" 626 }, 627 "setImmediate": { 628 "scope": "javascript,typescript,javascriptreact,typescriptreact", 629 "prefix": "sim", 630 "body": "setImmediate(() => {\n\t${99:// Type here}\n})", 631 "description": "setImmediate" 632 }, 633 "process nextTick": { 634 "scope": "javascript,typescript,javascriptreact,typescriptreact", 635 "prefix": "nt", 636 "body": "process.nextTick(() => {\n\t${99:// Type here}\n})", 637 "description": "process nextTick" 638 }, 639 // Miscellaneous 640 "insert 'use strict' statement": { 641 "scope": "javascript,typescript,javascriptreact,typescriptreact", 642 "prefix": "us", 643 "body": "'use strict'", 644 "description": "insert 'use strict' statement" 645 }*/ 646} 647 648export default jssnippetarray
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.