mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
38 lines
791 B
TypeScript
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;
|
|
}
|
|
}
|