feat(snippets): some changes

This commit is contained in:
Pavel Korytov 2022-04-14 22:59:23 +03:00
parent 9b1a3b4b43
commit cded48d484
5 changed files with 8 additions and 4 deletions

View file

@ -1,6 +1,6 @@
# key: apiq
# name: nest-api-query
# condition: (string-match-p (rx controller.ts eos) (buffer-file-name))
# condition: (string-match-p (rx "controller.ts" eos) (buffer-file-name))
# --
@ApiQuery({
name: '$1',

View file

@ -2,6 +2,6 @@
# name: private-method
# key: pm
# --
private $1 ($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
private $1($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
$0
}

View file

@ -0,0 +1,4 @@
# key: prs
# name: private-service
# --
private ${1:service}Service: ${1:$(capitalize yas-text)}Service$0

View file

@ -2,6 +2,6 @@
# name: public-async-method
# key: pam
# --
public async $1 ($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
public async $1($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
$0
}

View file

@ -1,6 +1,6 @@
# key: um
# name: public-method
# --
public $1 ($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
public $1($2)${3:$$(if (string-empty-p yas-text) "" (if (string-match-p (rx bos ":") yas-text) yas-text (format ": %s" yas-text)))} {
$0
}