Export Option and Observer interfaces for the Lozad package

This commit is contained in:
Alvin Chan
2017-11-27 18:10:59 -08:00
parent dc0c4811d4
commit 1b63e441fb
+13 -13
View File
@@ -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;