Skip to content

Commit 184331a

Browse files
authored
breaking: stricter type for depends (#11201)
require a `:` when passing a string now closes #9763
1 parent 19be5e5 commit 184331a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/dirty-phones-report.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': major
3+
---
4+
5+
breaking: the type for `depends` now requires a `:` as part of the string

packages/kit/src/exports/public.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ export interface LoadEvent<
779779
* <button on:click={increase}>Increase Count</button>
780780
* ```
781781
*/
782-
depends(...deps: string[]): void;
782+
depends(...deps: Array<`${string}:${string}`>): void;
783783
}
784784

785785
export interface NavigationEvent<

0 commit comments

Comments
 (0)