Skip to content

Commit b1a5a84

Browse files
committed
fix: typing yet again
1 parent 0a8d1ac commit b1a5a84

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Component.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ import { globalAttrs, globalProps } from './install'
1818

1919
export type Mode = 'tree' | 'text' | 'table'
2020

21-
type ModalValueProp = typeof isVue3 extends true ? 'modelValue' : 'value'
22-
type UpdateModalValue = typeof isVue3 extends true ? 'update:modelValue' : 'input'
23-
24-
const modelValueProp: ModalValueProp = (isVue3 ? 'modelValue' : 'value') as any
25-
const updateModelValue: UpdateModalValue = (isVue3 ? 'update:modelValue' : 'input') as any
21+
const modelValueProp: any = isVue3 ? 'modelValue' : 'value'
22+
const updateModelValue: any = isVue3 ? 'update:modelValue' : 'input'
2623

2724
const boolAttributes = [
2825
'mainMenuBar',
@@ -38,7 +35,7 @@ export default defineComponent({
3835
name,
3936
inheritAttrs: true,
4037
props: {
41-
[modelValueProp]: {},
38+
[modelValueProp as any]: {},
4239
mode: {
4340
type: String as PropType<Mode>,
4441
},

0 commit comments

Comments
 (0)