Created
July 28, 2021 23:56
-
-
Save AlexCR97/3eed16cd30d8ad34de857cb12f8b96b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Eslint Disable": { | |
"prefix": "eslint", | |
"body": "/* eslint-disable */", | |
}, | |
"Simple log": { | |
"prefix": "cl", | |
"description": "Simple log", | |
"body": [ | |
"console.log($1);" | |
], | |
}, | |
"Error log": { | |
"prefix": "cle", | |
"description": "Error log", | |
"body": [ | |
"console.error(\"$1\");" | |
], | |
}, | |
"Log with string message": { | |
"prefix": "cls", | |
"description": "Log with string message", | |
"body": [ | |
"console.log(\"$1\");" | |
], | |
}, | |
"Log with message and variable": { | |
"prefix": "clm", | |
"description": "Log with message and variable", | |
"body": [ | |
"console.log(\"$1\", $2);" | |
], | |
}, | |
"Log showing variable value": { | |
"prefix": "clv", | |
"description": "Log showing variable value", | |
"body": [ | |
"console.log(\"$1:\", $1);" | |
], | |
}, | |
"Angular inject HttpClient": { | |
"prefix": "inhttp", | |
"body": [ | |
"private http: HttpClient,", | |
] | |
}, | |
"Angular inject Router": { | |
"prefix": "inrouter", | |
"body": [ | |
"private router: Router,", | |
] | |
}, | |
"Angular inject ApiService": { | |
"prefix": "inapi", | |
"body": [ | |
"private api: ApiService,", | |
] | |
}, | |
"Angular inject AuthService": { | |
"prefix": "inauth", | |
"body": [ | |
"private auth: AuthService,", | |
] | |
}, | |
"Angular inject ValidatorService": { | |
"prefix": "inval", | |
"body": [ | |
"private validators: ValidatorService,", | |
] | |
}, | |
"Angular 2-way binding": { | |
"prefix": "twb", | |
"body": [ | |
"private _$1: $2;", | |
"get $1() { return this._$1 }", | |
"@Input() set $1($1: $2) { this._$1 = $1 }", | |
"@Output() $1Change = new EventEmitter<$2>();", | |
] | |
}, | |
"Angular Ngb modal imports": { | |
"prefix": "ngmodal-i", | |
"description": "Ngb modal imports", | |
"body": [ | |
"import { Component, Input, OnInit } from '@angular/core';", | |
"import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';", | |
], | |
}, | |
"Angular Ngb modal body": { | |
"prefix": "ngmodal-b", | |
"description": "Ngb modal body", | |
"body": [ | |
"", | |
"@Input() title = \"Title\";", | |
"", | |
"constructor(", | |
"\tprivate modal: NgbActiveModal,", | |
") {}", | |
"", | |
"ngOnInit() {}", | |
"", | |
"onCloseClicked() {", | |
"\tthis.modal.close();", | |
"}", | |
"", | |
"onConfirmClicked() {", | |
"\t", | |
"}", | |
"", | |
], | |
}, | |
"Data Class": { | |
"prefix": "dclass", | |
"body": [ | |
"export class $1 {", | |
"\t$2", | |
"}" | |
], | |
}, | |
"Property": { | |
"prefix": "prop", | |
"body": "$1: $2;" | |
}, | |
"Property Any": { | |
"prefix": "propany", | |
"body": "$1: any;" | |
}, | |
"Property Array": { | |
"prefix": "proparr", | |
"body": "$1: $2[];" | |
}, | |
"Property Number": { | |
"prefix": "propnum", | |
"body": "$1: number;" | |
}, | |
"Property String": { | |
"prefix": "propstr", | |
"body": "$1: string;" | |
}, | |
"TypeScript Getter": { | |
"prefix": "getter", | |
"body": "get $1() { return $2; }" | |
}, | |
"TypeScript Setter": { | |
"prefix": "setter", | |
"body": "set $1(value: $2) { $3 = value; }" | |
}, | |
"TypeScript Getter and Setter": { | |
"prefix": "getset", | |
"body": [ | |
"get $1() { return $2; }", | |
"set $1(value: $3) { $2 = value; }" | |
] | |
}, | |
"HTML template string": { | |
"prefix": "html", | |
"body": [ | |
"/*html*/`", | |
"\t", | |
"`", | |
] | |
}, | |
"HTML template string const": { | |
"prefix": "htmlc", | |
"body": [ | |
"const template = /*html*/`", | |
"", | |
"`", | |
] | |
}, | |
"CSS string const": { | |
"prefix": "cssc", | |
"body": [ | |
"const styles = [/*css*/`", | |
"", | |
"`];", | |
] | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment