-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Typing improvements to preload PR (#7841)
* feat: Improve typings on data-sveltekit attributes * feat: improved constants * Update packages/kit/src/runtime/client/utils.js Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com> * remove dev guard from validateAttributeValue * snake_case * dot notation * shorter name so prettier doesnt butcher the code * shorter name * get typechecking working * neaten * oops * tweak Co-authored-by: Rich Harris <richard.a.harris@gmail.com> Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com> Co-authored-by: Rich Harris <hello@rich-harris.dev>
- Loading branch information
1 parent
e3428a2
commit bd470a3
Showing
4 changed files
with
55 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export const SCROLL_KEY = 'sveltekit:scroll'; | ||
export const INDEX_KEY = 'sveltekit:index'; | ||
|
||
export const PRIORITY_TAP = 1; | ||
export const PRIORITY_HOVER = 2; | ||
export const PRIORITY_VIEWPORT = 3; | ||
export const PRIORITY_PAGE = 4; | ||
export const PRELOAD_PRIORITIES = /** @type {const} */ ({ | ||
tap: 1, | ||
hover: 2, | ||
viewport: 3, | ||
page: 4, | ||
off: -1 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.