- ESLint - https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
- Prettier - https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
Recommended - Set format on save and any global prettier options
| import type { FetchOptions } from 'ohmyfetch'; | |
| import { useApiMethod } from '@/enums/composables/useApi'; | |
| /** | |
| * Custom hook that makes an HTTP request to the API endpoint. | |
| */ | |
| export async function useApi<T>( | |
| path: string, | |
| opts?: FetchOptions, | |
| prefix = 'api', |
| import { Ref } from "vue" | |
| interface AsyncStateOptions<T, O> { | |
| transform?: (input: T) => O | |
| } | |
| interface AsyncStateReturnType<T> { | |
| execute: () => Promise<void>, | |
| refresh: () => Promise<void>, | |
| pending: Ref<boolean>, |
Recommended - Set format on save and any global prettier options