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 accessor cannot be declared in an ambient context #4839

Closed
ph55 opened this issue May 24, 2020 · 1 comment
Closed

An accessor cannot be declared in an ambient context #4839

ph55 opened this issue May 24, 2020 · 1 comment
Labels
needs triage This issue has not been looked into

Comments

@ph55
Copy link

ph55 commented May 24, 2020

Bug Report

After upgrading Nest from 6.10.11 to 7.0.13 typescript errors thrown on build:

node_modules/@nestjs/common/http/http.service.d.ts:13:9 - error TS1086: An accessor cannot be declared in an ambient context.

13     get axiosRef(): AxiosInstance;
           ~~~~~~~~

node_modules/@nestjs/core/helpers/http-adapter-host.d.ts:21:9 - error TS1086: An accessor cannot be declared in an ambient context.

21     set httpAdapter(httpAdapter: T);
           ~~~~~~~~~~~

node_modules/@nestjs/core/helpers/http-adapter-host.d.ts:28:9 - error TS1086: An accessor cannot be declared in an ambient context.

28     get httpAdapter(): T;
           ~~~~~~~~~~~

node_modules/@nestjs/core/injector/container.d.ts:19:9 - error TS1086: An accessor cannot be declared in an ambient context.

19     get applicationConfig(): ApplicationConfig | undefined;
           ~~~~~~~~~~~~~~~~~

node_modules/@nestjs/core/injector/instance-wrapper.d.ts:33:9 - error TS1086: An accessor cannot be declared in an ambient context.

33     get id(): string;
           ~~

node_modules/@nestjs/core/injector/instance-wrapper.d.ts:34:9 - error TS1086: An accessor cannot be declared in an ambient context.

34     set instance(value: T);

...

Seems that #3513 still the case even after microsoft/TypeScript#33939 closed

Environment


Nest version: 7.0.13

 
For Tooling issues:
- Node version: 14.3.0
- Platform:  Mac
@ph55 ph55 added the needs triage This issue has not been looked into label May 24, 2020
@kamilmysliwiec
Copy link
Member

Please, update your TypeScript package to the latest version. Unfortunately, TS team introduced a breaking change and they're not willing to revert it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

2 participants