Skip to content

Commit 1432695

Browse files
committed
Better typings
1 parent cb2b137 commit 1432695

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/lib/FxParallax.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export { classes as class }
1212
* - value of 0 effectively makes the element scroll fixed with the page
1313
*/
1414
export let factor = 0.75
15-
/** @type {Object|undefined} bindable reference to this component */
15+
/** @type {HTMLImageElement|undefined} bindable reference to <img> element */
1616
export let ref = undefined
1717
1818
let mounted = false

src/lib/FxReveal.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { onMount } from 'svelte'
55
66
/** @type {Object[]} imagetools import */
77
export let src = []
8-
/** @type {Object|undefined} bindable reference to this component */
8+
/** @type {HTMLImageElement|undefined} bindable reference to <img> element */
99
export let ref = undefined
1010
1111
let sources = []

src/lib/SvelteImg.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export let height = undefined
1111
export let loading = 'lazy'
1212
/** @type {'async'|'auto'|'sync'} */
1313
export let decoding = 'async'
14-
/** @type {Object|undefined} bindable reference to this component */
14+
/** @type {HTMLImageElement|undefined} bindable reference to <img> element */
1515
export let ref = undefined
1616
1717
const priority = ['heic', 'heif', 'avif', 'webp', 'jpeg', 'jpg', 'png', 'gif', 'tiff']

src/lib/_observe.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
/** @type {IntersectionObserver} */
12
let observer
23

4+
/** @param {Element} node */
35
export default function (node) {
46
observer =
57
observer ||

0 commit comments

Comments
 (0)