<script setup lang="ts">
import { computed } from 'vue';
type Props = {
duration?: '0'|'0.5'|'1'|'1.5'|'2'|'2.5'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'10',
//^^^^^^^^^ ESLint: Prop 'duration' requires default value to be set.(vue/require-default-prop)
initialAnimation?: boolean,
additionalAnimateClasses?: string
};
const props = withDefaults(defineProps<Props>(), {
// ^^^^^^^^^^^^^^^^^^^^ Argument type DefineProps<Props, BooleanKey<Props>> is not assignable to parameter type DefineProps<Readonly<Props> & {readonly initialAnimation: boolean}, keyof Readonly<Props> & {readonly initialAnimation: boolean}>
initialAnimation: true,
additionalAnimateClasses: ''
});
Why this erros are showing? My intension is to set default value for some of the optional props
duration: undefinedfo the default value within thewithDefaultsmacro to make ESLint happy