Skip to content

Commit e4eeec6

Browse files
committed
refactor
1 parent 1b5bfdf commit e4eeec6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/editor/FileSelector.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const pending = ref<boolean | string>(false)
1515
* This is a display name so it should always strip off the `src/` prefix.
1616
*/
1717
const pendingFilename = ref('Comp.vue')
18-
const showTsConfig = inject('tsconfig') as Ref<boolean>
19-
const showImportMap = inject('import-map') as Ref<boolean>
18+
const showTsConfig = inject<Ref<boolean>>('tsconfig')
19+
const showImportMap = inject<Ref<boolean>>('import-map')
2020
const files = computed(() =>
2121
Object.entries(store.state.files)
2222
.filter(

src/monaco/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ export function loadMonacoEnv(store: Store) {
8585
languages.register({ id: 'vue', extensions: ['.vue'] })
8686
languages.register({ id: 'javascript', extensions: ['.js'] })
8787
languages.register({ id: 'typescript', extensions: ['.ts'] })
88-
languages.onLanguage('vue', reloadVue.bind(undefined, store))
88+
languages.onLanguage('vue', () => reloadVue(store))
8989
}

src/monaco/vue.worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-ignore
22
import * as worker from 'monaco-editor-core/esm/vs/editor/editor.worker'
3-
import * as monaco from 'monaco-editor-core'
3+
import type * as monaco from 'monaco-editor-core'
44
import * as ts from 'typescript'
55
import { Config, resolveConfig } from '@vue/language-service'
66
import { createLanguageService } from '@volar/monaco/worker'

src/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class ReplStore implements Store {
189189
}
190190
}
191191

192-
initTsConfig() {
192+
private initTsConfig() {
193193
if (!this.state.files[tsconfigFile]) {
194194
this.setTsConfig(tsconfig)
195195
}

0 commit comments

Comments
 (0)