Skip to content

Commit 260ee99

Browse files
committed
fix for types
1 parent f594a39 commit 260ee99

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/domain/utils/global-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const getUser = () => {
3939
return user
4040
}
4141

42-
export const globalStorageMiddleware: unstable_MiddlewareFunction = async ({ context }, next) => {
42+
export const globalStorageMiddleware: unstable_MiddlewareFunction<Response> = async ({ context }, next) => {
4343
const authSession = getAuthSessionFromContext(context)
4444
const userData = authSession.get("user")
4545
const user = userData?.email ? await getUserByEmail(userData.email) : null

app/root.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,7 @@ export const ErrorBoundary = () => {
8787
</div>
8888
)
8989
}
90-
// @ts-expect-error
91-
export const unstable_middleware: unstable_MiddlewareFunction[] = [authSessionMiddleware, globalStorageMiddleware]
90+
export const unstable_middleware: unstable_MiddlewareFunction<Response>[] = [
91+
authSessionMiddleware,
92+
globalStorageMiddleware,
93+
]

0 commit comments

Comments
 (0)