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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to depend on modules with private declarations #994

Closed
1 task done
eladb opened this issue Nov 17, 2019 · 0 comments 路 Fixed by #995
Closed
1 task done

unable to depend on modules with private declarations #994

eladb opened this issue Nov 17, 2019 · 0 comments 路 Fixed by #995
Assignees
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. p0

Comments

@eladb
Copy link
Contributor

eladb commented Nov 17, 2019

馃悰 Bug Report

When compiling a module with jsii and it depends on another module that has a .d.ts file with a private field declaration, the compiler will issue the following error:

error TS7033: Property 'assetParameters' implicitly has type 'any', because its get accessor lacks a return type annotation.

The above error is thrown from the declaration files included with @aws-cdk/core. This technically means that it is currently impossible to author jsii modules.

Affected Languages

  • TypeScript or Javascript

General Information

  • JSII Version: 0.20.6

What is the problem?

jsii currently depends on typescript@3.6.4 which has a bug where private fields without type declarations in .d.ts files are regarded when noImplicitAny is true (which is by default for jsii). This bug is fixed by microsoft/TypeScript#33896 and released in v3.7.2.

@eladb eladb added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 17, 2019
@eladb eladb added the p0 label Nov 17, 2019
eladb pushed a commit that referenced this issue Nov 17, 2019
Due to a TypeScript [bug], it was impossible to write a jsii module
that takes a dependency on a module that has private type declarations
in their d.ts file since they are untyped by definition.

This temporary fix sets `noImplicitAny` to `false` in order to disable
this check and enable the dependency use case until we upgrade to the 3.7.x
version-line.

Fixes #994

[bug]: microsoft/TypeScript#33894
@mergify mergify bot closed this as completed in #995 Nov 17, 2019
mergify bot pushed a commit that referenced this issue Nov 17, 2019
Due to a TypeScript [bug], it was impossible to write a jsii module
that takes a dependency on a module that has private type declarations
in their d.ts file since they are untyped by definition.

This temporary fix sets `noImplicitAny` to `false` in order to disable
this check and enable the dependency use case until we upgrade to the 3.7.x
version-line.

Fixes #994

[bug]: microsoft/TypeScript#33894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. p0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants