mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Export Option and Observer interfaces for the Lozad package
This commit is contained in:
Vendored
+13
-13
@@ -1,25 +1,25 @@
|
||||
// Type definitions for lozad 1.0
|
||||
// Type definitions for lozad 1.1
|
||||
// Project: https://github.com/ApoorvSaxena/lozad.js
|
||||
// Definitions by: York Yao <https://github.com/plantain-00>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface Option {
|
||||
rootMargin?: string;
|
||||
threshold?: number;
|
||||
load?(element: HTMLElement | HTMLCanvasElement): void;
|
||||
}
|
||||
|
||||
interface Observer {
|
||||
observe(): void;
|
||||
}
|
||||
|
||||
declare function lozad(selector?: string, options?: Option): Observer;
|
||||
|
||||
declare namespace lozad {
|
||||
interface Option {
|
||||
rootMargin?: string;
|
||||
threshold?: number;
|
||||
load?(element: HTMLElement | HTMLCanvasElement): void;
|
||||
}
|
||||
|
||||
interface Observer {
|
||||
observe(): void;
|
||||
}
|
||||
|
||||
const prototype: {
|
||||
};
|
||||
}
|
||||
|
||||
declare function lozad(selector?: string, options?: lozad.Option): lozad.Observer;
|
||||
|
||||
export as namespace lozad;
|
||||
|
||||
export = lozad;
|
||||
|
||||
Reference in New Issue
Block a user