Merge pull request #21790 from chaucerbao/master

Export Option and Observer interfaces for the Lozad package
This commit is contained in:
Armando Aguirre
2017-11-28 16:46:51 -08:00
committed by GitHub
+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;