Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/great-ears-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: update `match` parameter type
4 changes: 2 additions & 2 deletions packages/kit/src/runtime/app/paths/client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @import { AssetPath, RouteId, RouteIdWithSearchOrHash, Path, PathnameWithSearchOrHash, ResolvedPathname, RouteParams } from '$app/types' */
/** @import { AssetPath, RouteId, RouteIdWithSearchOrHash, PathnameWithSearchOrHash, ResolvedPathname, RouteParams } from '$app/types' */
/** @import { ResolveArgs } from './types.js' */
import { base, assets, hash_routing, match_implementation } from './internal/client.js';
import { resolve_route } from '../../../utils/routing.js';
Expand Down Expand Up @@ -92,7 +92,7 @@ export function resolve(...args) {
* ```
* @since 2.52.0
*
* @param {Path | URL | (string & {})} url
* @param {URL | string} url
* @returns {Promise<{ [K in RouteId]: { id: K; params: RouteParams<K>; } }[RouteId] | null>}
*/
export function match(url) {
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/src/runtime/app/paths/internal/client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @import { RouteId, Path } from '$app/types' */
/** @import { RouteId } from '$app/types' */
import { payload } from '../../../client/payload.js';

export const base = payload.base ?? __SVELTEKIT_PATHS_BASE__;
Expand All @@ -9,7 +9,7 @@ export const hash_routing = __SVELTEKIT_HASH_ROUTING__;
/**
* We make this configurable per-environment so that it's possible to import `$app/paths`
* into a service worker without importing the entire client
* @param {Path | URL | (string & {})} _url
* @param {URL | string} _url
* @returns {Promise<{ [K in RouteId]: { id: K; params: import('$app/types').RouteParams<K>; } }[RouteId] | null>}
*/
// eslint-disable-next-line @typescript-eslint/require-await
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3275,7 +3275,7 @@ declare module '$app/navigation' {
}

declare module '$app/paths' {
import type { AssetPath, RouteIdWithSearchOrHash, PathnameWithSearchOrHash, ResolvedPathname, Path, RouteId, RouteParams } from '$app/types';
import type { AssetPath, RouteIdWithSearchOrHash, PathnameWithSearchOrHash, ResolvedPathname, RouteId, RouteParams } from '$app/types';
/**
* Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.
*
Expand Down Expand Up @@ -3332,7 +3332,7 @@ declare module '$app/paths' {
* @since 2.52.0
*
* */
export function match(url: Path | URL | (string & {})): Promise<{ [K in RouteId]: {
export function match(url: URL | string): Promise<{ [K in RouteId]: {
id: K;
params: RouteParams<K>;
}; }[RouteId] | null>;
Expand Down
Loading