Specify props without intermediate interface

This commit is contained in:
guerler
2023-05-03 14:23:28 -04:00
committed by Assunta DeSanto
parent 460183d17b
commit 099d11ca03
2 changed files with 14 additions and 15 deletions
@@ -3,17 +3,18 @@ import { computed, type ComputedRef } from "vue";
import FormDrilldownList from "./FormDrilldownList.vue";
import { getAllValues, type Option, type Value } from "./utilities";
export interface FormDrilldownProps {
id: string;
value?: Value;
options: Array<Option>;
multiple: boolean;
}
const props = withDefaults(defineProps<FormDrilldownProps>(), {
value: null,
multiple: true,
});
const props = withDefaults(
defineProps<{
id: string;
value?: Value;
options: Array<Option>;
multiple: boolean;
}>(),
{
value: null,
multiple: true,
}
);
const emit = defineEmits<{
(e: "input", value: Value): void;
@@ -4,14 +4,12 @@ import { BFormCheckbox, BFormRadio } from "bootstrap-vue";
import { getAllValues, type Option } from "./utilities";
import FormDrilldownList from "./FormDrilldownList.vue";
export interface Props {
const props = defineProps<{
currentValue: string[];
option: Option;
handleClick: Function;
multiple: boolean;
}
const props = defineProps<Props>();
}>();
const showChildren = ref(false);