Skip to content

Commit

Permalink
jsr unhappy, bring back middleware declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs224 committed May 10, 2024
1 parent 2f58e4b commit e5cb862
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jcs224/hono-sessions",
"version": "0.5.0",
"version": "0.5.1",
"exports": "./mod.ts"
}
2 changes: 1 addition & 1 deletion deps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type { Context } from 'npm:hono@^4.0.0'
export type { Context, MiddlewareHandler } from 'npm:hono@^4.0.0'
export { createMiddleware } from 'npm:hono@^4.0.0/factory'
export { getCookie, setCookie } from 'npm:hono@^4.0.0/cookie'
export type { CookieOptions } from 'npm:hono@^4.0.0/utils/cookie'
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCookie, setCookie, createMiddleware } from '../deps.ts'
import { getCookie, setCookie, createMiddleware, MiddlewareHandler } from '../deps.ts'
import Store from './store/Store.ts'
import CookieStore from './store/CookieStore.ts'
import { Session, SessionData, encrypt, decrypt } from '../mod.ts'
Expand All @@ -13,7 +13,7 @@ interface SessionOptions {
}

/** Function that returns a Hono-compatible session middleware */
export function sessionMiddleware(options: SessionOptions) {
export function sessionMiddleware(options: SessionOptions): MiddlewareHandler {

const store = options.store
const encryptionKey = options.encryptionKey
Expand Down

0 comments on commit e5cb862

Please sign in to comment.