owltide/composables/session.ts
Hornwitser 8c8f340553 Type false session as null
Make the typing for the session work again by telling TypeScript the
false value is actually null.
2025-03-09 15:50:18 +01:00

9 lines
229 B
TypeScript

export const useAccountSession = () => useFetch(
"/api/auth/session",
{
transform: (input) => input === undefined ? false as any as null: input,
getCachedData(key, nuxtApp) {
return nuxtApp.payload.data[key];
},
}
);