release: WRNexusJS 0.6.0
This commit is contained in:
@@ -231,6 +231,92 @@ const BLOCK_COMPLETIONS = [
|
||||
documentation: "Declare styles for the current WRN declaration.",
|
||||
snippet: ["style {", " $0", "}"].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "import type",
|
||||
detail: "WRN v0.6 TypeScript type import",
|
||||
snippet: 'import type { ${1:PublicUser} } from "${2:@/types/user.ts}"\n\n$0',
|
||||
},
|
||||
{
|
||||
label: "outputs",
|
||||
detail: "Typed callable component outputs",
|
||||
snippet: [
|
||||
"outputs {",
|
||||
" ${1:confirm}(payload: ${2:ConfirmPayload})",
|
||||
" ${3:cancel}()",
|
||||
"}",
|
||||
].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "client function",
|
||||
detail: "Browser-only typed function",
|
||||
snippet: ["client ${1|,async |}function ${2:name}(${3}): ${4:void} {", " $0", "}"].join(
|
||||
"\n",
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "server function",
|
||||
detail: "Server-only typed function",
|
||||
snippet: ["server ${1|,async |}function ${2:name}(${3}): ${4:void} {", " $0", "}"].join(
|
||||
"\n",
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "shared function",
|
||||
detail: "Server-and-browser typed function",
|
||||
snippet: ["shared function ${1:name}(${2}): ${3:void} {", " $0", "}"].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "state block",
|
||||
detail: "Grouped typed reactive state",
|
||||
snippet: ["state {", ' ${1:name}: ${2:string} = ${3:""}', "}"].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "client state",
|
||||
detail: "Browser-only state block",
|
||||
snippet: ["client state {", " ${1:menuOpen}: boolean = false", "}"].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "server state",
|
||||
detail: "Server-only state block",
|
||||
snippet: ["server state {", " ${1:sessionId}: string | null = null", "}"].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "global store",
|
||||
detail: "Request-scoped global store",
|
||||
snippet: [
|
||||
"global store ${1:UserStore} {",
|
||||
" state {",
|
||||
" ${2:user}: ${3:PublicUser | null} = null",
|
||||
" }",
|
||||
"",
|
||||
" computed {",
|
||||
" ${4:authenticated}: boolean = ${2:user} !== null",
|
||||
" }",
|
||||
"}",
|
||||
].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "page store",
|
||||
detail: "Route-scoped page store",
|
||||
snippet: [
|
||||
"page store ${1:PageStore} {",
|
||||
" state {",
|
||||
" ${2:loading}: boolean = false",
|
||||
" }",
|
||||
"}",
|
||||
].join("\n"),
|
||||
},
|
||||
{
|
||||
label: "persist",
|
||||
detail: "Include-only store persistence",
|
||||
snippet: [
|
||||
"persist {",
|
||||
' storage = "${1|memory,session,local|}"',
|
||||
' include = ["${2:field}"]',
|
||||
" version = ${3:1}",
|
||||
"}",
|
||||
].join("\n"),
|
||||
},
|
||||
];
|
||||
|
||||
const ATTRIBUTE_COMPLETIONS = [
|
||||
|
||||
Reference in New Issue
Block a user