Skip to content

Commit

Permalink
Remove typegen xsm snippet (#429)
Browse files Browse the repository at this point in the history
* Remove typegen snippet

* add changeset

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
  • Loading branch information
mellson and Andarist authored Jan 11, 2024
1 parent dfdf388 commit bd427f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .changeset/yeti-cars-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'stately-vscode': minor
'@xstate/vscode-server': minor
---

Removed "XState Typegen Machine" code snippet.
11 changes: 1 addition & 10 deletions apps/extension/client/snippets/xstate.code-snippets
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
{
"XState Machine": {
"scope": "javascript,javascriptreact,vue",
"scope": "javascript,javascriptreact,typescript,typescriptreact,vue",
"prefix": "xsm",
"body": [
"import { createMachine } from 'xstate';",
"const ${1:nameOf}Machine = createMachine({\n\tid: '${1:nameOf}',\n\tinitial: '${2:initialState}',\n\tstates: {\n\t\t${2:initialState}: {$0},\n\t}\n});"
],
"description": "Outline for XState Machine"
},
"XState Typegen Machine": {
"scope": "typescript,typescriptreact,vue",
"prefix": "xsm",
"body": [
"import { createMachine } from 'xstate';",
"const ${1:nameOf}Machine = createMachine({\n\tid: '${1:nameOf}',\n\ttsTypes: {},\n\tschema: {\n\t\tcontext: {} as { ${2:contextType} },\n\t\tevents: {} as { type: '${3:eventType}' },\n\t},\n\tcontext: {\n\t\t${4:initialContextValue},\n\t},\n\tinitial: '${5:initialState}',\n\tstates: {\n\t\t${5:initialState}: {},\n\t},\n});$0"
],
"description": "Outline for XState Typegen Machine"
}
}

0 comments on commit bd427f6

Please sign in to comment.