refactor: fix typescript warnings
This commit is contained in:
parent
5b50d3e525
commit
fa53502901
@ -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 {
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
{
|
|
||||||
"include": ["src/**/*"],
|
|
||||||
// https://v3.nuxtjs.org/concepts/typescript
|
// https://v3.nuxtjs.org/concepts/typescript
|
||||||
|
{
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
],
|
||||||
"extends": "./.nuxt/tsconfig.json",
|
"extends": "./.nuxt/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
"types": [
|
"types": [
|
||||||
"@pinia/nuxt"
|
"@pinia/nuxt"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user