@types/arrive
Version:
TypeScript definitions for arrive
97 lines (82 loc) • 2.81 kB
Markdown
# Installation
> `npm install --save @types/arrive`
# Summary
This package contains type definitions for arrive (https://github.com/uzairfarooq/arrive).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/arrive.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/arrive/index.d.ts)
````ts
// required for declare global to work
export {};
interface Options {
fireOnAttributesModification?: boolean | undefined;
onceOnly?: boolean | undefined;
existing?: boolean | undefined;
}
type ArriveSignature = (
element: string,
handlerOrOptions: ((this: Element, element: Element) => void) | Options,
handler?: (this: Element, element: Element) => void,
) => void;
type UnbindArriveSignature = (
elementOrHandler?: string | ((this: Element, element: Element) => void),
handler?: (this: Element, element: Element) => void,
) => void;
type LeaveSignature = (
element: string,
handlerOrOptions: ((this: Element, element: Element) => void) | Options,
handler?: (this: Element) => void,
) => void;
type UnbindLeaveSignature = (
elementOrHandler?: string | ((this: Element, element: Element) => void),
handler?: (this: Element, element: Element) => void,
) => void;
declare global {
// tslint:disable-next-line no-unnecessary-class
class Arrive {
static unbindAllArrive: () => void;
static unbindAllLeave: () => void;
}
interface Document {
arrive: ArriveSignature;
unbindArrive: UnbindArriveSignature;
leave: LeaveSignature;
unbindLeave: UnbindLeaveSignature;
}
interface JQuery {
arrive: ArriveSignature;
unbindArrive: UnbindArriveSignature;
leave: LeaveSignature;
unbindLeave: UnbindLeaveSignature;
}
interface Window {
arrive: ArriveSignature;
unbindArrive: UnbindArriveSignature;
leave: LeaveSignature;
unbindLeave: UnbindLeaveSignature;
}
interface NodeList {
arrive: ArriveSignature;
unbindArrive: UnbindArriveSignature;
leave: LeaveSignature;
unbindLeave: UnbindLeaveSignature;
}
interface Element {
arrive: ArriveSignature;
unbindArrive: UnbindArriveSignature;
leave: LeaveSignature;
unbindLeave: UnbindLeaveSignature;
}
interface HTMLCollectionBase {
arrive: ArriveSignature;
unbindArrive: UnbindArriveSignature;
leave: LeaveSignature;
unbindLeave: UnbindLeaveSignature;
}
}
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:04 GMT
* Dependencies: none
# Credits
These definitions were written by [Vijay Pemmaraju](https://github.com/vijaypemmaraju).