Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 28, 2024
1 parent ad9b669 commit fe92903
Show file tree
Hide file tree
Showing 5 changed files with 434 additions and 372 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
"vue-tsc": "catalog:"
},
"resolutions": {
"esbuild": "^0.23.1"
"esbuild": "^0.23.1",
"typescript": "catalog:",
"vite": "catalog:"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
Expand Down
12 changes: 5 additions & 7 deletions packages/devtools-ui-kit/src/components/NSwitch.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<script setup lang="ts">
import { useVModel } from '@vueuse/core'
const props = withDefaults(
withDefaults(
defineProps<{
modelValue?: boolean
disabled?: boolean
}>(),
{
modelValue: false,
disabled: false,
},
)
const emit = defineEmits<{ (...args: any): void }>()
const checked = useVModel(props, 'modelValue', emit, { passive: true })
const checked = defineModel('modelValue', {
type: Boolean,
default: false,
})
</script>

<template>
Expand Down
6 changes: 5 additions & 1 deletion packages/devtools-ui-kit/src/components/NTextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ const props = withDefaults(
},
)
const emit = defineEmits<{ (...args: any): void }>()
const emit = defineEmits<{
(name: 'keydown', event: KeyboardEvent): void
(name: 'keyup', event: KeyboardEvent): void
(name: 'change', event: Event): void
}>()
const input = useVModel(props, 'modelValue', emit, { passive: true })
</script>

Expand Down
Loading

0 comments on commit fe92903

Please sign in to comment.