Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit f838c06

Browse files
author
v1rtl
committed
fix rg type errors
1 parent ecc1fa9 commit f838c06

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

app.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export class App<
222222

223223
const path = typeof base === 'string' ? base : '/'
224224

225-
let regex: { keys: string[] | boolean; pattern: RegExp } | undefined
225+
let regex: any
226226

227227
for (const fn of fns) {
228228
if (fn instanceof App) {
@@ -263,7 +263,8 @@ export class App<
263263
find(url: string, method: string) {
264264
return this.middleware.filter((m) => {
265265
if (!m.path) m.path = '/'
266-
m.regex = m.type === 'mw' ? rg(m.path, true) : rg(m.path)
266+
267+
m.regex = (m.type === 'mw' ? rg(m.path, true) : rg(m.path)) as { pattern: RegExp; keys: false }
267268

268269
return (m.method ? m.method === method : true) && m.regex?.pattern.test(url)
269270
})

deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export type { Req, Res }
2121

2222
export { serve, Server } from 'https://deno.land/std@0.97.0/http/server.ts'
2323

24-
export { Router, pushMiddleware } from 'https://esm.sh/@tinyhttp/router@1.3.1'
24+
export { Router, pushMiddleware } from 'https://esm.sh/@tinyhttp/router@1.3.3'

egg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"entry": "./mod.ts",
55
"description": "0-legacy, tiny & fast web framework as a replacement of Express",
66
"homepage": "https://github.com/talentlessguy/tinyhttp-deno",
7-
"version": "0.1.3",
7+
"version": "0.1.4",
88
"files": [
99
"./*.ts",
1010
"./utils/*.ts",

0 commit comments

Comments
 (0)