Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS1036: Statements are not allowed in ambient contexts. #427

Closed
hectorccmx opened this issue Mar 26, 2020 · 5 comments
Closed

error TS1036: Statements are not allowed in ambient contexts. #427

hectorccmx opened this issue Mar 26, 2020 · 5 comments

Comments

@hectorccmx
Copy link

After upgrading to Angular 9.1.0 and using Typescript 3.8.3, I keep getting these errors when compiling with ng build --watch command:

node_modules/vanilla-lazyload/typings/lazyload.d.ts:36:1 - error TS1036: Statements are not allowed in ambient contexts.

36 if (this._observer) {
~~
node_modules/vanilla-lazyload/typings/lazyload.d.ts:37:5 - error TS1036: Statements are not allowed in ambient contexts.

37 this._observer.disconnect();
~~~~

@verlok
Copy link
Owner

verlok commented Mar 26, 2020

Hey there thank you for reporting this.
To which version of LazyLoad are you referring to?

@hectorccmx
Copy link
Author

Hello @verlok , this version:

"vanilla-lazyload": "^14.0.0"

@verlok
Copy link
Owner

verlok commented Mar 29, 2020

I added the "Help Wanted" label because I don't have the foggiest of what can cause that error on Typescript. I'll ask around and I'll let you know if I found a cause.

In the meantime, can you tell me if you get the same error using version 13.0.1 and with 12.5.1?

Thanks

@verlok
Copy link
Owner

verlok commented Mar 29, 2020

A friend helped. Thanks @cant89. You're the heart of the open-source. 😻🤟

@verlok
Copy link
Owner

verlok commented Mar 30, 2020

Fixed in 14.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants