You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
595 B
17 lines
595 B
import type { KnownConfigKey, KnownConfigValue } from "../service/config/registry";
|
|
|
|
declare module "h3" {
|
|
interface H3EventContext {
|
|
auth: {
|
|
getCurrent: () => Promise<{ id: number; username: string } | null>;
|
|
requireUser: () => Promise<{ id: number; username: string }>;
|
|
};
|
|
config: {
|
|
getGlobal: <K extends KnownConfigKey>(key: K) => Promise<KnownConfigValue<K>>;
|
|
getUser: <K extends KnownConfigKey>(key: K) => Promise<KnownConfigValue<K> | undefined>;
|
|
get: <K extends KnownConfigKey>(key: K) => Promise<KnownConfigValue<K>>;
|
|
};
|
|
}
|
|
}
|
|
|
|
export {};
|
|
|