- 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>
13 lines
211 B
TypeScript
13 lines
211 B
TypeScript
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); |