#14529·kit

Cannot pass params to `resolve` without `(group)`

Author: hyunbinseoCreated Sep 25, 2025Updated Sep 10, 2026
Labelstypes / typescript

Describe the bug

(group) seems to be optional in resolve() as patched in https://github.com/sveltejs/kit/commit/1cd93cd7b29fde3c8d28a920bc9d02292ce8bbc7

However, the patch is incomplete and should be reverted.

svelte
<script>
  import { resolve } from '$app/paths';
</script>

<!-- 1: Works as expected. -->
<a href={resolve('/(group)/[slug]', { slug: 'hello' })}>label</a>

<!-- 2: Works as expected. -->
<!-- Expected 2 arguments, but got 1. js(2554) -->
<a href={resolve('/(group)/[slug]')}>label</a>

<!-- 3: Shouldn't this error? -->
<a href={resolve('/[slug]')}>label</a>

<!-- 4: This shows an incorrect error -->
<!-- Expected 1 arguments, but got 2. js(2554) -->
<a href={resolve('/[slug]', { slug: 'hello' })}>label</a>

More context:

Reproduction

https://github.com/hyunbinseo/svelte-kit-14529

System Info

bash
System:
  OS: Windows 11 10.0.26100
  CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V
  Memory: 4.69 GB / 31.48 GB
Binaries:
  Node: 24.8.0 - ~\AppData\Local\fnm_multishells\32968_1758767770845\node.EXE
  Yarn: 1.22.22 - ~\AppData\Local\fnm_multishells\32968_1758767770845\yarn.CMD
  npm: 11.6.0 - ~\AppData\Local\fnm_multishells\32968_1758767770845\npm.CMD
  pnpm: 10.17.1 - ~\AppData\Local\fnm_multishells\32968_1758767770845\pnpm.CMD
Browsers:
  Edge: Chromium (140.0.3485.54)
npmPackages:
  @sveltejs/adapter-auto: ^6.0.0 => 6.1.0
  @sveltejs/kit: ^2.22.0 => 2.43.4
  @sveltejs/vite-plugin-svelte: ^6.0.0 => 6.2.1
  svelte: ^5.0.0 => 5.39.6
  vite: ^7.0.4 => 7.1.7

Severity

annoyance

Additional Information

No response