From 54187923da8b76057c2a804090bc7e8115bf2e69 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Mon, 30 Mar 2020 00:22:26 +0200 Subject: [PATCH] Fixed error TS1036. Closes #427 --- CHANGELOG.md | 4 ++++ README.md | 12 ++++++------ package.json | 2 +- typings/lazyload.d.ts | 4 ---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 436b1675..8f5d56d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Version 14 +#### 14.0.1 + +- Fixed error TS1036: Statements are not allowed in ambient contexts. Closes #427 + #### 14.0.0 🎉 **Major refactoring and performance improvement!** diff --git a/README.md b/README.md index 899a998a..2c7c9f7e 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ Please note that the video poster can be lazily loaded too. ## 👩‍💻 Getting started - Script -The latest, recommended version of LazyLoad is **14.0.0**. +The latest, recommended version of LazyLoad is **14.0.1**. ### To polyfill or not to polyfill IntersectionObserver? @@ -128,14 +128,14 @@ If you prefer to load a polyfill, the regular LazyLoad behaviour is granted. The easiest way to use LazyLoad is to include the script from a CDN: ```html - + ``` Or, with the IntersectionObserver polyfill: ```html - + ``` Then, in your javascript code: @@ -168,7 +168,7 @@ Include RequireJS: Then `require` the AMD version of LazyLoad, like this: ```js -var lazyLoadAmdUrl = "https://cdn.jsdelivr.net/npm/vanilla-lazyload@14.0.0/dist/lazyload.amd.min.js"; +var lazyLoadAmdUrl = "https://cdn.jsdelivr.net/npm/vanilla-lazyload@14.0.1/dist/lazyload.amd.min.js"; var polyfillAmdUrl = "https://cdn.jsdelivr.net/npm/intersection-observer-amd@2.0.1/intersection-observer-amd.js"; /// Dynamically define the dependencies @@ -214,7 +214,7 @@ Then include the script. ```html ``` @@ -247,7 +247,7 @@ Then include the script. ```html ``` diff --git a/package.json b/package.json index 78380028..79a651cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vanilla-lazyload", - "version": "14.0.0", + "version": "14.0.1", "description": "A fast, lightweight script to load images as they enter the viewport. SEO friendly, it supports responsive images (both srcset + sizes and picture) and progressive JPEG", "main": "dist/lazyload.min.js", "module": "dist/lazyload.esm.js", diff --git a/typings/lazyload.d.ts b/typings/lazyload.d.ts index a6a9f776..ada54e37 100644 --- a/typings/lazyload.d.ts +++ b/typings/lazyload.d.ts @@ -32,7 +32,3 @@ interface ILazyLoad { } declare var LazyLoad: ILazyLoad; export default LazyLoad; - -if (this._observer) { - this._observer.disconnect(); -}