The method waitUntil does not exist in the route context.
To reproduce:
Create a new project, create a new route and add this code:
const someLongRunningOperation = async () => {
return new Promise((resolve) => {
setTimeout(() => {
resolve('done');
}, 10000);
});
};
router.post('/', async (c) => {
c.waitUntil(async () => {
await someLongRunningOperation();
});
return c.json({ success: true });
});
error
Property 'waitUntil' does not exist on type 'Context<Env<Record<string, never>>, "/", BlankInput>'.ts(2339)