motoko 3.3.1 → 3.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -366,6 +366,60 @@
366
366
  "#err($0)"
367
367
  ]
368
368
  },
369
+ "Debug Block": {
370
+ "prefix": [
371
+ "debug-block"
372
+ ],
373
+ "body": [
374
+ "debug {",
375
+ "\t$0",
376
+ "};"
377
+ ]
378
+ },
379
+ "Print": {
380
+ "prefix": [
381
+ "debug-print"
382
+ ],
383
+ "body": [
384
+ "Debug.print(debug_show ($0));"
385
+ ]
386
+ },
387
+ "Trap": {
388
+ "prefix": [
389
+ "debug-trap"
390
+ ],
391
+ "body": [
392
+ "Debug.trap(\"$0\");"
393
+ ]
394
+ },
395
+ "Set Timer": {
396
+ "prefix": [
397
+ "set-timer"
398
+ ],
399
+ "body": [
400
+ "let ${$1:id} = Timer.setTimer(#seconds ${$2:0}, func () {",
401
+ "\t$0",
402
+ "});"
403
+ ]
404
+ },
405
+ "Recurring Timer": {
406
+ "prefix": [
407
+ "recurring-timer"
408
+ ],
409
+ "body": [
410
+ "let ${$1:id} = Timer.recurringTimer(#seconds ${$2:0}, func () {",
411
+ "\t$0",
412
+ "});"
413
+ ]
414
+ },
415
+ "Cancel Timer": {
416
+ "prefix": [
417
+ "cancel-timer"
418
+ ],
419
+ "body": [
420
+ "Timer.cancelTimer(${$1:id});"
421
+ ]
422
+ },
369
423
  "Array to Blob": {
370
424
  "prefix": [
371
425
  "array-2-blob"
@@ -421,5 +475,21 @@
421
475
  "body": [
422
476
  "Principal.fromActor(${1:actor})"
423
477
  ]
478
+ },
479
+ "Principal to Actor": {
480
+ "prefix": [
481
+ "principal-2-actor"
482
+ ],
483
+ "body": [
484
+ "actor (Principal.toText(${1:principal})) : actor { $2 }"
485
+ ]
486
+ },
487
+ "Text to Actor": {
488
+ "prefix": [
489
+ "text-2-actor"
490
+ ],
491
+ "body": [
492
+ "actor (${1:text}) : actor { $2 }"
493
+ ]
424
494
  }
425
495
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motoko",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "description": "Compile and run Motoko smart contracts in Node.js or the browser.",
5
5
  "author": "Ryan Vandersmith (https://github.com/rvanasa)",
6
6
  "license": "Apache-2.0",