Vmeda.Online/.vscode/moodle.code-snippets

41 lines
1.1 KiB
Plaintext
Raw Normal View History

{
"[Moodle] Service Singleton": {
"scope": "typescript",
"prefix": "massingleton",
"body": [
"import { Injectable } from '@angular/core';",
"import { makeSingleton } from '@singletons';",
"",
2021-01-14 11:40:03 +00:00
"/**",
" * $2.",
" */",
"@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"
2021-01-14 11:40:03 +00:00
},
"[Moodle] Singleton": {
"scope": "typescript",
"prefix": "masingleton",
"body": [
"/**",
" * Singleton$2.",
" */",
"export class ${1:${TM_FILENAME_BASE}} {",
"",
" $0",
"",
"}",
""
],
"description": "[Moodle] Create a Pure Singleton"
}
}