1.5.36 • Published 6 months ago
@types/blazy v1.5.36
Installation
npm install --save @types/blazy
Summary
This package contains type definitions for bLazy (https://github.com/dinbror/blazy).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/blazy.
index.d.ts
// Type definitions for bLazy v1.5.2
// Project: https://github.com/dinbror/blazy
// Definitions by: Julien Paroche <https://github.com/julienpa>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Definitions based on: http://dinbror.dk/blog/blazy
declare var Blazy: Blazy;
interface Blazy {
new (options: BlazyOptions): BlazyInstance;
}
interface BlazyOptions {
breakpoints?: Breakpoint[] | undefined;
container?: string | undefined;
error?: ((ele: Element|HTMLElement, msg: string) => void) | undefined;
errorClass?: string | undefined;
loadInvisible?: boolean | undefined;
offset?: number | undefined;
saveViewportOffsetDelay?: number | undefined;
selector?: string | undefined;
separator?: string | undefined;
src?: string | undefined;
success?: ((ele: Element|HTMLElement) => void) | undefined;
successClass?: string | undefined;
validateDelay?: number | undefined;
}
interface BlazyInstance {
/**
* Revalidates document for visible images. Useful if you add images with scripting or ajax.
*/
revalidate(): void;
/**
* Forces the given element(s) to load if not collapsed. If you also want to load a collapsed/hidden elements you can add true as the second parameter.
* You can pass a single element or a list of elements. Tested with getElementById, getElementsByClassName, querySelectorAll, querySelector and jQuery selector.
*/
load(elements: Element|Element[]|HTMLElement|HTMLElement[]|HTMLCollection|NodeList, force: boolean): void;
/**
* Unbind events and resets image array.
*/
destroy(): void;
}
interface Breakpoint {
width: number;
src: string;
}
declare module 'blazy' {
export = Blazy;
}
Additional Details
- Last updated: Wed, 07 Jul 2021 21:44:58 GMT
- Dependencies: none
- Global values:
Blazy
Credits
These definitions were written by Julien Paroche.
1.5.34
8 months ago
1.5.36
6 months ago
1.5.35
7 months ago
1.5.33
3 years ago
1.5.32
4 years ago
1.5.31
6 years ago
1.5.30
7 years ago
1.5.29
8 years ago
1.5.28
8 years ago
1.5.27-alpha
8 years ago
1.5.26-alpha
8 years ago
1.5.25-alpha
8 years ago
1.5.24-alpha
8 years ago
1.5.23-alpha
8 years ago
1.5.22-alpha
8 years ago
1.5.21-alpha
8 years ago
1.5.16-alpha
8 years ago
1.5.15-alpha
8 years ago