Skip to content

Commit

Permalink
breaking: stricter type for depends (#11201)
Browse files Browse the repository at this point in the history
require a `:` when passing a string now
closes #9763
  • Loading branch information
dummdidumm authored Dec 7, 2023
1 parent 19be5e5 commit 184331a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dirty-phones-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': major
---

breaking: the type for `depends` now requires a `:` as part of the string
2 changes: 1 addition & 1 deletion packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ export interface LoadEvent<
* <button on:click={increase}>Increase Count</button>
* ```
*/
depends(...deps: string[]): void;
depends(...deps: Array<`${string}:${string}`>): void;
}

export interface NavigationEvent<
Expand Down

0 comments on commit 184331a

Please sign in to comment.