Skip to content

Commit bbd8fa0

Browse files
committed
chore: create singleton snippet
1 parent fa137c0 commit bbd8fa0

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.vscode/flamework-snippets.code-snippets

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@
4747
]
4848
},
4949

50+
"Singleton": {
51+
"prefix":[ "singleton", "ston"],
52+
"description": "Create a singleton",
53+
"body": [
54+
"import type { OnStart } from \"@flamework/core\";",
55+
"",
56+
"import { Singleton } from \"shared/dependencies\";",
57+
"",
58+
"@Singleton()",
59+
"export class ${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g} implements OnStart {",
60+
"\tpublic onStart(): void {",
61+
"\t\t$0",
62+
"\t}",
63+
"}",
64+
]
65+
},
66+
5067
"UI Component": {
5168
"prefix":[ "uicomponent" ],
5269
"description": "Create a UI component",

0 commit comments

Comments
 (0)