chore: developer cleanup (#300)

* new PR tasks

* add homebox to know words

* formatting

* bump deps

* generate db models

* ts errors

* drop id

* fix accessor

* drop unused time field

* change CI

* add expected error

* add type check

* resolve serveral type errors

* hoise in CI
This commit is contained in:
Hayden 2023-02-17 21:41:01 -09:00 committed by GitHub
parent 88f9ff90d4
commit bd321af29f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
142 changed files with 817 additions and 1200 deletions

View file

@ -28,7 +28,7 @@
<li v-for="(obj, idx) in filtered" :key="idx">
<div type="button" @click="select(obj)">
<slot name="display" v-bind="{ item: obj }">
{{ usingObjects ? obj[itemText] : obj }}
{{ extractor(obj, itemText) }}
</slot>
</div>
</li>
@ -94,6 +94,14 @@
}
);
function extractor(obj: string | ItemsObject, key: string | number): string {
if (typeof obj === "string") {
return obj;
}
return obj[key] as string;
}
const value = useVModel(props, "modelValue", emit);
const usingObjects = computed(() => {
@ -135,6 +143,7 @@
value.value = "";
return;
}
// @ts-ignore
value.value = obj;
} else {
if (obj === value.value) {
@ -142,6 +151,7 @@
return;
}
// @ts-ignore
value.value = obj;
}
}