Skip to content

Commit 5f50f38

Browse files
authored
fix: correct FeatureMetadata imports and resolve unknown type error in FeatureSelector (#39)
1 parent b1bafa0 commit 5f50f38

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/FeatureSelector.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { ref, computed } from "vue";
3-
import { useFeatures, type FeatureMetadata } from "../composables/useFeatures";
3+
import { useFeatures } from "../composables/useFeatures";
4+
import type { FeatureMetadata, FeatureOption } from "../types";
45
import SearchableSelect from "./SearchableSelect.vue";
56
67
const props = defineProps<{
@@ -53,7 +54,8 @@ function toggleFeature(feature: FeatureMetadata) {
5354
const defaults: Record<string, any> = {};
5455
if (feature.options) {
5556
Object.entries(feature.options).forEach(([key, opt]) => {
56-
if (opt.default !== undefined) defaults[key] = opt.default;
57+
const option = opt as FeatureOption;
58+
if (option.default !== undefined) defaults[key] = option.default;
5759
});
5860
}
5961
newFeatures[feature.id] = defaults;

0 commit comments

Comments
 (0)