nuxt-authorization
Version:
Authorization module for managing permissions on the Nuxt app and the Nitro server.
26 lines (22 loc) • 533 B
TypeScript
declare module '#app' {
interface NuxtApp {
$authorization: {
resolveClientUser: <User extends Record<string, any>>() => Promise<User | null>
}
}
}
declare module 'vue' {
interface ComponentCustomProperties {
$authorization: {
resolveClientUser: <User extends Record<string, any>>() => Promise<User | null>
}
}
}
declare module 'h3' {
interface H3EventContext {
$authorization: {
resolveServerUser: <User extends Record<string, any>>() => Promise<User | null>
}
}
}
export {}