refactor(sfc-playground): modes declaration (#3522)

This commit is contained in:
Cédric Exbrayat 2021-04-02 00:37:50 +02:00 committed by GitHub
parent 7f7dcc9f7d
commit c90fb945f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,9 +20,9 @@ import CodeMirror from '../codemirror/CodeMirror.vue'
import { store } from '../store'
import { ref } from 'vue'
type Modes = 'preview' | 'js' | 'css' | 'ssr'
const modes = ['preview', 'js', 'css', 'ssr'] as const
const modes: Modes[] = ['preview', 'js', 'css', 'ssr']
type Modes = typeof modes[number]
const mode = ref<Modes>('preview')
</script>