1.1.3 • Published 7 months ago
@types/sonar-js v1.1.3
Installation
npm install --save @types/sonar-js
Summary
This package contains type definitions for sonar-js (https://github.com/brandonweiss/sonar-js).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sonar-js.
index.d.ts
// Type definitions for sonar-js 1.1
// Project: https://github.com/brandonweiss/sonar-js
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace Sonar;
/**
* A tiny library for detecting when a browser is scrolled to the bottom of a web page.
*
* You could use this, for example, on a blog to show a popover when a reader has finished a post,
* letting them know they can receive new posts by email if they submit their email address.
*/
declare class Sonar {
withinRangeOfPageBottom?: boolean | undefined;
constructor(window: Window);
ping(range: number, bottomFoundCallback?: Sonar.SonarCallback, bottomLostCallback?: Sonar.SonarCallback): void;
stop(): void;
}
declare namespace Sonar {
type SonarCallback = () => void;
}
export = Sonar;
Additional Details
- Last updated: Tue, 06 Jul 2021 16:35:06 GMT
- Dependencies: none
- Global values:
Sonar
Credits
These definitions were written by Piotr Błażejewicz.