Skip to content

Commit 1834aa2

Browse files
committed
types: make 'emits' type strong
1 parent 4ab37d1 commit 1834aa2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ export default defineComponent({
4747
{ [key in ModelValueProp]: {} }
4848
& { mode: { type: PropType<Mode> } }
4949
& { [key in typeof boolAttrs[number]]: { type: PropType<boolean>; default: undefined } },
50-
emits: [updateModelValue, 'update:mode'],
50+
emits: {
51+
[updateModelValue](_payload: any) {
52+
return true
53+
},
54+
'update:mode': function (_payload: Mode) {
55+
return true
56+
},
57+
},
5158
setup(props, { attrs, emit, expose }) {
5259
const currentInstance = getCurrentInstance()?.proxy
5360
const jsonEditor = ref()

0 commit comments

Comments
 (0)