From 9576701d8532b9697df62c96d7c8676afd985b2d Mon Sep 17 00:00:00 2001
From: Andrew G. Dunn <andrew@dunn.dev>
Date: Mon, 02 Mar 2026 16:31:53 +0000
Subject: [PATCH] fix: await micromorph() to prevent race condition with nav event handlers (#2323)

---
 index.d.ts |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/index.d.ts b/index.d.ts
index 4a93f16..9011ee3 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -5,7 +5,11 @@
 
 // dom custom event
 interface CustomEventMap {
-  nav: CustomEvent<{ url: CanonicalSlug }>
+  prenav: CustomEvent<{}>
+  nav: CustomEvent<{ url: FullSlug }>
+  themechange: CustomEvent<{ theme: "light" | "dark" }>
+  readermodechange: CustomEvent<{ mode: "on" | "off" }>
 }
 
+type ContentIndex = Record<FullSlug, ContentDetails>
 declare const fetchData: Promise<ContentIndex>

--
Gitblit v1.10.0