refactor: fix typescript warnings

This commit is contained in:
Settel 2022-07-31 22:56:53 +02:00
parent 5b50d3e525
commit fa53502901
2 changed files with 13 additions and 8 deletions

View File

@ -1,13 +1,14 @@
import { useUserinfoStore } from "@/stores/UserinfoStore" import { useUserinfoStore } from "@/stores/UserinfoStore"
import { $fetch } from 'ohmyfetch'
export interface useAuth { export interface useAuth {
login(authCode: string): Promise<void> login(authCode: string): Promise<void>
logout(): Promise<void> logout(): Promise<void>
isAuthenticated(): Promise<boolean> isAuthenticated(): Promise<boolean>
loadUserInfo(): Promise<boolean> loadUserInfo(): Promise<void>
} }
export default () => { export default (): useAuth => {
const userInfoStore = useUserinfoStore() const userInfoStore = useUserinfoStore()
return { return {

View File

@ -1,8 +1,12 @@
// https://v3.nuxtjs.org/concepts/typescript
{ {
"include": ["src/**/*"], "include": [
// https://v3.nuxtjs.org/concepts/typescript "src/**/*"
],
"extends": "./.nuxt/tsconfig.json", "extends": "./.nuxt/tsconfig.json",
"types": [ "compilerOptions": {
"@pinia/nuxt" "types": [
] "@pinia/nuxt"
} ]
},
}