From e3cb2e74bf9b00ed1c4d413a92db1bca44bde11d Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Wed, 29 Dec 2021 14:56:32 -0800 Subject: [PATCH] chore(types): make prop descriptions consistent with source --- types/IntersectionObserver.svelte.d.ts | 32 ++++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/types/IntersectionObserver.svelte.d.ts b/types/IntersectionObserver.svelte.d.ts index aeeac31..2a7e695 100644 --- a/types/IntersectionObserver.svelte.d.ts +++ b/types/IntersectionObserver.svelte.d.ts @@ -5,44 +5,56 @@ export type Entry = null | IntersectionObserverEntry; export interface IntersectionObserverProps { /** + * The HTML Element to observe. * @default null */ element?: null | HTMLElement; /** + * Set to `true` to unobserve the element + * after it intersects the viewport. + * @default false + */ + once?: boolean; + + /** + * `true` if the observed element + * is intersecting the viewport. + * @default false + */ + intersecting?: boolean; + + /** + * Specify the containing element. + * Defaults to the browser viewport. * @default null */ root?: null | HTMLElement; /** + * Margin offset of the containing element. * @default "0px" */ rootMargin?: string; /** + * Percentage of element visibility to trigger an event. + * Value must be between 0 and 1. * @default 0 */ threshold?: number; /** + * Observed element metadata. * @default null */ entry?: null | Entry; /** - * @default false - */ - intersecting?: boolean; - - /** + * `IntersectionObserver` instance. * @default null */ observer?: null | IntersectionObserver; - - /** - * @default false - */ - once?: boolean; } export default class SvelteIntersectionObserver extends SvelteComponentTyped<