From 0c14e63808b2d4ca8469bc1fac99512201ac1a3a Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Thu, 13 Jun 2024 23:51:30 +0200 Subject: [PATCH] feat: :label: add new utility types for session handling --- src/session/mod.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/session/mod.ts b/src/session/mod.ts index 17c6b59..7917237 100644 --- a/src/session/mod.ts +++ b/src/session/mod.ts @@ -1,3 +1,4 @@ +import type { PageProps } from '$fresh/server.ts' import { getCookies } from '@std/http/cookie' type SessionEntry = { @@ -6,6 +7,13 @@ type SessionEntry = { value: T } +export interface SessionState { + session: Session +} + +export type SessionPageProps> = + PageProps + export class SessionStore { static #store = new Map()