I am using the Vue3 Store pattern as described here. https://vuejs.org/guide/scaling-up/state-management.html#simple-state-management-with-reactivity-api
My store However is a Typescript file, as I would like to add type safety to my store.
I can't really find how to add that...
import {reactive} from "vue";
export const ColorService = reactive({
loading: false,
toggleLoading(): void {
this.loading = !this.loading;
}
});
How can I add type safety for loading to make sure it is a boolean?