Skip to content

Commit 29fb1e1

Browse files
committed
types: don't use Function or {} as a type
1 parent 5d4328f commit 29fb1e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default defineComponent({
4040
]),
4141
),
4242
} as {
43-
[key in ModelValueProp]: {}
43+
[key in ModelValueProp]: object
4444
} & { mode: { type: PropType<Mode> } } & {
4545
[key in typeof boolAttrs[number]]: {
4646
type: PropType<boolean>
@@ -90,7 +90,7 @@ export default defineComponent({
9090
emit('update:mode', mode)
9191
}
9292

93-
const mergeFunction = (previousValue: Function, currentValue: Function) => (...args: any) => {
93+
const mergeFunction = (previousValue: (...args: any) => unknown, currentValue: (...args: any) => unknown) => (...args: any) => {
9494
previousValue(...args)
9595
currentValue(...args)
9696
}
@@ -165,8 +165,8 @@ export default defineComponent({
165165
(newAttrs) => {
166166
// Functions need to be merged again
167167
const defaultFunctionAttrs: {
168-
onChange?: Function
169-
onChangeMode?: Function
168+
onChange?: (...args: any) => unknown
169+
onChangeMode?: (...args: any) => unknown
170170
} = {}
171171
if (newAttrs.onChange) {
172172
defaultFunctionAttrs.onChange = onChange

0 commit comments

Comments
 (0)