Skip to content

waitUntil does not exist in route context #628

@pec1985

Description

@pec1985

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions