-
-
Notifications
You must be signed in to change notification settings - Fork 187
/
typescript.json
37 lines (37 loc) · 1.09 KB
/
typescript.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"SvelteKit Endpoint": {
"prefix": "kitEndpoint",
"description": "SvelteKit Endpoint",
"body": [
"export const ${1|GET,POST,PUT,PATCH,DELETE|}: RequestHandler = async ($2) => {",
"\t$3",
"\treturn new Response();",
"};"
]
},
"SvelteKit Actions": {
"prefix": "kitActions",
"description": "SvelteKit Actions",
"body": ["export const actions: Actions = {", "\t$1", "};"]
},
"SvelteKit Load": {
"prefix": "kitLoad",
"description": "SvelteKit Load",
"body": [
"export const load: ${1|PageLoad,PageServerLoad,LayoutLoad,LayoutServerLoad|} = async ($2) => {",
"\t$3",
"};"
]
},
"SvelteKit Param Matcher": {
"prefix": "kitParamMatcher",
"description": "SvelteKit Param Matcher",
"body": [
"import type { ParamMatcher } from '@sveltejs/kit';",
"",
"export const match: ParamMatcher = (param) => {",
"\treturn $1;",
"};"
]
}
}