Skip to content

Commit 95ab2ab

Browse files
committed
fix: actually fix editor type lol
1 parent 304e935 commit 95ab2ab

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

src/Repl.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import SplitPane from './SplitPane.vue'
33
import Output from './output/Output.vue'
44
import { Store, ReplStore, SFCOptions } from './store'
55
import { provide, toRef } from 'vue'
6-
import type EditorComponentType from './editor/types'
6+
import type { EditorComponentType } from './editor/types'
77
import EditorContainer from './editor/EditorContainer.vue'
88
99
export interface Props {

src/editor/EditorContainer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Message from '../Message.vue'
44
import { debounce } from '../utils'
55
import { inject } from 'vue'
66
import { Store } from '../store'
7-
import type EditorComponentType from './types'
7+
import type { EditorComponentType } from './types'
88
99
const props = defineProps<{
1010
editorComponent: EditorComponentType

src/editor/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ interface EditorEmits {
1313
(e: 'change', code: string): void
1414
}
1515

16-
type EditorComponentType = Component<EditorProps, EditorEmits> & {
16+
export type EditorComponentType = Component<EditorProps, EditorEmits> & {
1717
editorType: 'monaco' | 'codemirror'
1818
}
1919

20-
export default EditorComponentType
20+
declare const EditorComponent: EditorComponentType
21+
22+
export default EditorComponent

src/output/Output.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Preview from './Preview.vue'
33
import { Store } from '../store'
44
import { inject, ref, computed } from 'vue'
55
import type { OutputModes } from './types'
6-
import type EditorComponentType from '../editor/types'
6+
import type { EditorComponentType } from '../editor/types'
77
88
const props = defineProps<{
99
editorComponent: EditorComponentType

test/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createApp, h, watchEffect } from 'vue'
22
import { Repl, ReplStore } from '../src'
33
import MonacoEditor from '../src/editor/MonacoEditor.vue'
44
// import CodeMirrorEditor from '../src/editor/CodeMirrorEditor.vue'
5-
import EditorComponentType from '../src/editor/types'
5+
import { EditorComponentType } from '../src/editor/types'
66
;(window as any).process = { env: {} }
77

88
const App = {

0 commit comments

Comments
 (0)