Skip to content

Commit

Permalink
chore(types): make prop descriptions consistent with source
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Dec 29, 2021
1 parent 5944a6b commit e3cb2e7
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions types/IntersectionObserver.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down

0 comments on commit e3cb2e7

Please sign in to comment.