Skip to content

Commit c90fb94

Browse files
authored
refactor(sfc-playground): modes declaration (#3522)
1 parent 7f7dcc9 commit c90fb94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/sfc-playground/src/output/Output.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import CodeMirror from '../codemirror/CodeMirror.vue'
2020
import { store } from '../store'
2121
import { ref } from 'vue'
2222
23-
type Modes = 'preview' | 'js' | 'css' | 'ssr'
23+
const modes = ['preview', 'js', 'css', 'ssr'] as const
2424
25-
const modes: Modes[] = ['preview', 'js', 'css', 'ssr']
25+
type Modes = typeof modes[number]
2626
const mode = ref<Modes>('preview')
2727
</script>
2828

0 commit comments

Comments
 (0)