forked from CIT/Vmeda.Online
		
	MOBILE-3320 DX: Add singleton snippet
This commit is contained in:
		
							parent
							
								
									0e41bdff75
								
							
						
					
					
						commit
						554a6d7717
					
				
							
								
								
									
										20
									
								
								.vscode/moodle.code-snippets
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.vscode/moodle.code-snippets
									
									
									
									
										vendored
									
									
								
							@ -3,10 +3,12 @@
 | 
			
		||||
        "scope": "typescript",
 | 
			
		||||
        "prefix": "massingleton",
 | 
			
		||||
        "body": [
 | 
			
		||||
 | 
			
		||||
            "import { Injectable } from '@angular/core';",
 | 
			
		||||
            "import { makeSingleton } from '@singletons';",
 | 
			
		||||
            "",
 | 
			
		||||
            "/**",
 | 
			
		||||
            " * $2.",
 | 
			
		||||
            " */",
 | 
			
		||||
            "@Injectable({ providedIn: 'root' })",
 | 
			
		||||
            "export class ${1:${TM_FILENAME_BASE}}Service {",
 | 
			
		||||
            "",
 | 
			
		||||
@ -18,5 +20,21 @@
 | 
			
		||||
            ""
 | 
			
		||||
        ],
 | 
			
		||||
        "description": "[Moodle] Create a Service Singleton"
 | 
			
		||||
    },
 | 
			
		||||
    "[Moodle] Singleton": {
 | 
			
		||||
        "scope": "typescript",
 | 
			
		||||
        "prefix": "masingleton",
 | 
			
		||||
        "body": [
 | 
			
		||||
            "/**",
 | 
			
		||||
            " * Singleton$2.",
 | 
			
		||||
            " */",
 | 
			
		||||
            "export class ${1:${TM_FILENAME_BASE}} {",
 | 
			
		||||
            "",
 | 
			
		||||
            "    $0",
 | 
			
		||||
            "",
 | 
			
		||||
            "}",
 | 
			
		||||
            ""
 | 
			
		||||
        ],
 | 
			
		||||
        "description": "[Moodle] Create a Pure Singleton"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user