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

An accessot cannot be declared in an ambient context. #140

Closed
pabloalbella opened this issue Apr 24, 2020 · 3 comments
Closed

An accessot cannot be declared in an ambient context. #140

pabloalbella opened this issue Apr 24, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@pabloalbella
Copy link

pabloalbella commented Apr 24, 2020

ERROR in ../node_modules/angular-google-charts/lib/components/chart-editor/chart-editor.component.d.ts:13:9 - error TS1086: An accessor cannot be declared in an ambient context.

13     get initialized$(): import("rxjs").Observable<google.visualization.ChartEditor>;
           ~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/chart-wrapper/chart-wrapper.component.d.ts:25:9 - error TS1086: An accessor cannot be declared in an ambient context.

25     get chart(): google.visualization.ChartBase | null;
           ~~~~~
../node_modules/angular-google-charts/lib/components/chart-wrapper/chart-wrapper.component.d.ts:26:9 - error TS1086: An accessor cannot be declared in an ambient context.

26     get wrapperReady$(): import("rxjs").Observable<google.visualization.ChartWrapper>;
           ~~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/chart-wrapper/chart-wrapper.component.d.ts:27:9 - error TS1086: An accessor cannot be declared in an ambient context.

27     get chartWrapper(): google.visualization.ChartWrapper | null;
           ~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/chart-wrapper/chart-wrapper.component.d.ts:28:9 - error TS1086: An accessor cannot be declared in an ambient context.

28     set chartWrapper(wrapper: google.visualization.ChartWrapper);
           ~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/control-wrapper/control-wrapper.component.d.ts:79:9 - error TS1086: An accessor cannot be declared in an ambient context.

79     get wrapperReady$(): import("rxjs").Observable<google.visualization.ControlWrapper>;
           ~~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/control-wrapper/control-wrapper.component.d.ts:80:9 - error TS1086: An accessor cannot be declared in an ambient context.

80     get controlWrapper(): google.visualization.ControlWrapper | null;
           ~~~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/google-chart/google-chart.component.d.ts:82:9 - error TS1086: An accessor cannot be declared in an ambient context.

82     get chart(): google.visualization.ChartBase | null;
           ~~~~~
../node_modules/angular-google-charts/lib/components/google-chart/google-chart.component.d.ts:83:9 - error TS1086: An accessor cannot be declared in an ambient context.

83     get wrapperReady$(): import("rxjs").Observable<google.visualization.ChartWrapper>;
           ~~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/google-chart/google-chart.component.d.ts:84:9 - error TS1086: An accessor cannot be declared in an ambient context.

84     get chartWrapper(): google.visualization.ChartWrapper;
           ~~~~~~~~~~~~
../node_modules/angular-google-charts/lib/components/google-chart/google-chart.component.d.ts:85:9 - error TS1086: An accessor cannot be declared in an ambient context.

85     set chartWrapper(wrapper: google.visualization.ChartWrapper);
           ~~~~~~~~~~~~

** Angular Live Development Server is listening on localhost:4044, open your browser on http://localhost:4044/ **
i 「wdm」: Failed to compile.

To reproduce

Angular 8
npm install angular-google-charts
ng serve

@pabloalbella pabloalbella added the bug Something isn't working label Apr 24, 2020
@forrestswork
Copy link

forrestswork commented Apr 26, 2020

confirmed error on angular google charts v1.1.3 angular 8.2.13

@FERNman
Copy link
Owner

FERNman commented Apr 26, 2020

This happens because Typescript treats accessors differently since v3.7. See microsoft/TypeScript#33939 for more information.
Until this is fixed, we'll probably have to stick to Typescript 3.6.

@PicchiSeba
Copy link

PicchiSeba commented Jul 18, 2022

A bit late to the party, I'm know.
I just wanted to know if you managed to make it work w/ Angular 8. I'm currently stuck and not in the position to upgrade to a newer version of Angular.

Forgot to mention i am using the latest version of this package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants