DefinitelyTyped/types/jquery.appear/index.d.ts
Anderson Friaça 83d106420f Types for JQuery Appear (#23896)
* Types for JQuery Appear

* Adjustments

* Adjustments
2018-02-27 07:30:44 -08:00

38 lines
791 B
TypeScript

// Type definitions for JQuery Appear 1.0
// Project: https://github.com/bas2k/jquery.appear
// Definitions by: Anderson Friaça <https://github.com/AndersonFriaca>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery" />
export interface Options<T> {
/**
* Data to pass into callback
*/
data?: T;
/**
* Callback is called only in first appear
*/
one?: boolean;
/**
* X accuracy
*/
accX?: number;
/**
* Y accuracy
*/
accY?: number;
}
declare global {
interface JQuery {
/**
* Initialize appear plugin
*/
appear<T>(callback: ((element: HTMLElement, data: T) => void), options?: Options<T>): JQuery;
}
}