npm.io
1.1.3 • Published 2 years ago

@types/sonar-js

Licence
MIT
Version
1.1.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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

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, 07 Nov 2023 1536 GMT
  • Dependencies: none

Credits

These definitions were written by Piotr Błażejewicz.