nuxt-authorization
Version:
Authorization module for managing permissions on the Nuxt app and the Nitro server.
30 lines (29 loc) • 1.36 kB
TypeScript
import type { Component } from 'vue';
import type { BouncerAbility, BouncerArgs } from '../../utils/index.js';
export interface BouncerProps<Ability extends BouncerAbility<any>> {
ability: Ability | Ability[];
args?: BouncerArgs<Ability> | BouncerArgs<Ability>[];
as?: string | Component;
}
export interface BouncerEmits {
}
export interface BouncerSlots {
default?: (props: {
can: boolean;
}) => any;
can?: (props?: object) => any;
cannot?: (props?: object) => any;
}
declare const _default: <Ability extends BouncerAbility<any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & BouncerProps<Ability> & Partial<{}>> & import("vue").PublicProps;
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
attrs: any;
slots: BouncerSlots;
emit: unknown;
}>) => import("vue").VNode & {
__ctx?: Awaited<typeof __VLS_setup>;
};
export default _default;
type __VLS_PrettifyLocal<T> = {
[K in keyof T]: T[K];
} & {};