1 | import type { ConfigProvider } from '@adonisjs/core/types';
|
2 | import type { GuardConfigProvider, GuardFactory } from './types.js';
|
3 |
|
4 |
|
5 |
|
6 | export type ResolvedAuthConfig<KnownGuards extends Record<string, GuardFactory | GuardConfigProvider<GuardFactory>>> = {
|
7 | default: keyof KnownGuards;
|
8 | guards: {
|
9 | [K in keyof KnownGuards]: KnownGuards[K] extends GuardConfigProvider<infer A> ? A : KnownGuards[K];
|
10 | };
|
11 | };
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | export declare function defineConfig<KnownGuards extends Record<string, GuardFactory | GuardConfigProvider<GuardFactory>>>(config: {
|
18 | default: keyof KnownGuards;
|
19 | guards: KnownGuards;
|
20 | }): ConfigProvider<ResolvedAuthConfig<KnownGuards>>;
|