refactor router system and update version
- Simplified Route class by removing validator functionality - Added AppRouteContext type for better type safety - Added forward method to RouteContext for response handling - Replaced queryRoute with run method for consistency - Improved Server class with proper cleanup methods - Updated Mini class to extend QueryRouterServer properly - Removed lodash-es dependency and nanoid random import - Added deprecation warnings for older methods - Enhanced route handling and middleware execution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
13
src/test/app-type.ts
Normal file
13
src/test/app-type.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { App } from '../app.ts'
|
||||
|
||||
const app = new App<{ f: string }>();
|
||||
|
||||
app.route({
|
||||
path: 't',
|
||||
run: async (ctx) => {
|
||||
// ctx.r
|
||||
ctx.app;
|
||||
}
|
||||
}).define(async (ctx) => {
|
||||
ctx.f = 'hello';
|
||||
}).addTo(app);
|
||||
Reference in New Issue
Block a user