Skip to content

Commit

Permalink
types: add proper prop types
Browse files Browse the repository at this point in the history
  • Loading branch information
OrbisK committed Nov 28, 2024
1 parent bb34a2d commit 2c34fd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/UseMediaRecorder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useMediaRecorder } from '@orbisk/vue-use-media-recorder'
const props = defineProps({
constraints: {
type: Object,
type: Object as PropType<MediaStreamConstraints>,
required: true,
validator(value: any): boolean {
validator(value: MediaStreamConstraints) {
if (!value?.audio && !value?.video) {
console.error('constraints must have at least one of audio or video')
return false
Expand All @@ -14,7 +14,7 @@ const props = defineProps({
},
},
mediaRecorderOptions: {
type: Object,
type: Object as PropType<MediaRecorderOptions>,
default: () => ({}),
},
})
Expand Down

0 comments on commit 2c34fd4

Please sign in to comment.