MOBILE-3320 DX: Add project snippets for vscode

main
Noel De Martin 2020-12-10 11:11:18 +01:00
parent 012d211d10
commit 0f86372020
1 changed files with 22 additions and 0 deletions

22
.vscode/moodle.code-snippets vendored 100644
View File

@ -0,0 +1,22 @@
{
"[Moodle] Service Singleton": {
"scope": "typescript",
"prefix": "massingleton",
"body": [
"import { Injectable } from '@angular/core';",
"import { makeSingleton } from '@singletons';",
"",
"@Injectable({ providedIn: 'root' })",
"export class ${1:${TM_FILENAME_BASE}}Service {",
"",
" $0",
"",
"}",
"",
"export class ${1:${TM_FILENAME_BASE}} extends makeSingleton(${1:${TM_FILENAME_BASE}}Service) {}",
""
],
"description": "[Moodle] Create a Service Singleton"
}
}