v1.1.0
What's Changed
- feat: type inference support for data argument by @iann838 in #130
Now you can get full type hint and type check on the data argument of every endpoint, learn more here!
export class TaskFetch extends OpenAPIRoute {
static schema = {
parameters: {
taskSlug: Path(Str, {
description: 'Task slug',
}),
},
}
async handle(request: Request, env: any, context: any, data: DataOf<typeof TaskFetch.schema>) {
// full type hint for query, path, header, and request body parameters!
data.params.taskSlug
// ...
}
}Full Changelog: v1.0.14...v1.1.0