refactor(medley-router): enable isolated declarations (#1199)

pull/1206/head
Jonathan Haines 2025-06-09 19:22:23 +10:00 committed by GitHub
parent e1eae2078f
commit 50aa61d9c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
'@hono/medley-router': patch
---
Add explicit `void` return type

View File

@ -15,7 +15,7 @@ export class MedleyRouter<T> implements Router<T> {
this.router = new OriginalRouter()
}
add(method: string, path: string, handler: T) {
add(method: string, path: string, handler: T): void {
const store = this.router.register(path)
store[method] = handler
}

View File

@ -4,7 +4,8 @@
"rootDir": "src",
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
"emitDeclarationOnly": false
"emitDeclarationOnly": false,
"isolatedDeclarations": true
},
"include": ["src/**/*.ts"],
"exclude": ["**/*.test.ts"],