Closed abaumg closed 10 months ago
When passing :select-attribute or :drag-attribute properties, TypeScript complains about missing properties.
:select-attribute
:drag-attribute
Example from the docs:
<template> <VDatePicker v-model="date" :select-attribute="selectAttribute" /> </template> <script setup> import { ref } from 'vue'; const date = ref(new Date()); const selectAttribute = ref({ dot: true }); </script>
TypeScript complains about missing properties:
Type '{ dot: boolean; }' is missing the following properties from type 'AttributeConfig': key, hashcode, content, highlight, and 7 more.
This PR makes all AttributeConfig properties optional (by using TS's Partial<> utility type) and fixes the above type error.
AttributeConfig
Partial<>
Good catch. Thanks for the contribution.
When passing
:select-attribute
or:drag-attribute
properties, TypeScript complains about missing properties.Example from the docs:
TypeScript complains about missing properties:
Type '{ dot: boolean; }' is missing the following properties from type 'AttributeConfig': key, hashcode, content, highlight, and 7 more.
This PR makes all
AttributeConfig
properties optional (by using TS'sPartial<>
utility type) and fixes the above type error.