diff --git a/packages/svelte2tsx/src/helpers/sveltekit.ts b/packages/svelte2tsx/src/helpers/sveltekit.ts index 3a5d79bc9..d312fb7bc 100644 --- a/packages/svelte2tsx/src/helpers/sveltekit.ts +++ b/packages/svelte2tsx/src/helpers/sveltekit.ts @@ -212,7 +212,7 @@ function upserKitRouteFile( !api.hasTypeDefinition ) { const pos = api.node.parameters[0].getEnd(); - const inserted = surround(`: import('./$types').RequestHandler`); + const inserted = surround(`: import('./$types').RequestEvent`); insert(pos, inserted); }