Installation
npm install --save @types/scroll-into-view
Summary
This package contains type definitions for scroll-into-view (https://github.com/KoryNunn/scroll-into-view).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scroll-into-view.
declare namespace __ScrollIntoView {
interface Settings {
time?: number | undefined;
ease?: ((value: number) => number) | undefined;
validTarget?: ((target: HTMLElement, parentsScrolled: number) => boolean) | undefined;
align?: Alignment | undefined;
isScrollable?:
| ((target: HTMLElement, defaultIsScrollable: (target: HTMLElement) => boolean) => boolean)
| undefined;
isWindow?: ((target: HTMLElement) => boolean) | undefined;
cancellable?: boolean | undefined;
maxSynchronousAlignments?: number | undefined;
debug?: boolean | undefined;
}
interface Alignment {
top?: number | undefined;
left?: number | undefined;
topOffset?: number | undefined;
leftOffset?: number | undefined;
lockX?: boolean | undefined;
lockY?: boolean | undefined;
}
type callbackParameterType = "complete" | "canceled";
type Callback = (type: callbackParameterType) => void;
interface ScrollIntoView {
(target: HTMLElement, callback?: __ScrollIntoView.Callback): void;
(target: HTMLElement, settings: __ScrollIntoView.Settings, callback?: __ScrollIntoView.Callback): void;
}
}
declare module "scroll-into-view" {
var scrollIntoView: __ScrollIntoView.ScrollIntoView;
export = scrollIntoView;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by zivni, Thibaut, and goodCycle.