youtuber-blog/src/fastify.d.ts

22 lines
534 B
TypeScript
Raw Normal View History

2024-04-21 22:41:38 +00:00
import {OAuth2Namespace} from "@fastify/oauth2";
import type { db } from "./db";
import type { Redis } from "./utils";
declare module "fastify" {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface FastifyRequest {
2024-04-21 22:41:38 +00:00
// db: typeof db;
// redis: typeof Redis;
session?: {
id: string,
user_id: string,
google_access_token: string,
google_refresh_token: string,
expires_at: Date
}
}
interface FastifyInstance {
googleOAuth2: OAuth2Namespace
}
}