From 1b63e441fbdf437974011302a337980cc0c4fcd6 Mon Sep 17 00:00:00 2001 From: Alvin Chan Date: Mon, 27 Nov 2017 18:05:32 -0800 Subject: [PATCH] Export Option and Observer interfaces for the Lozad package --- types/lozad/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/lozad/index.d.ts b/types/lozad/index.d.ts index eb0213f6c3..6257c47043 100644 --- a/types/lozad/index.d.ts +++ b/types/lozad/index.d.ts @@ -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 // 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;