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

TS1086: An accessor cannot be declared in an ambient context #308

Closed
Rominet13 opened this issue Mar 18, 2021 · 3 comments
Closed

TS1086: An accessor cannot be declared in an ambient context #308

Rominet13 opened this issue Mar 18, 2021 · 3 comments

Comments

@Rominet13
Copy link

Hello

First thanks for RX-STOMP !

I 'm using angular 8, and get the following check error with the new 1.1.0 version of RX-STOMP.

The error log:
"
ERROR in ../../node_modules/@stomp/rx-stomp/esm6/rx-stomp.d.ts:124:9 - error TS1086: An accessor cannot be declared in an ambient context.

124 get stompClient(): Client;
~~~~~~~~~~~
../../node_modules/@stomp/rx-stomp/esm6/rx-stomp.d.ts:193:9 - error TS1086: An accessor cannot be declared in an ambient context.

193 get active(): boolean;
"

I can skip it with :
"compilerOptions": {
"skipLibCheck": true,

Is there another solution ? (upgrade typescript maybe ? Angular 8 is limited to "typescript": "~3.5.3")

@kum-deepak
Copy link
Member

kum-deepak commented Mar 22, 2021

The current release of rx-stomp is compiled using Typescript 3.2.1. I had frozen that version to avoid this issue a while back. I have been using this library with Angular 7, 9, and 10 without this issue. However, if anyone faces the same issue I know only of the bypass that you are already using.

@kum-deepak
Copy link
Member

It seems typescript dependency had gotten relaxed - maybe by - dependabot. Version 3.9.99 was getting used. As part of release 1.1.2, typescript is contained back to 3.6.x. Hopefully, it should work without the workaround now.

Leaving this issue open for reports of it working/failing.

@Rominet13
Copy link
Author

Wonderfull it works without the workaround.
Great thank you !

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

No branches or pull requests

2 participants