-
Notifications
You must be signed in to change notification settings - Fork 245
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
jsii build succeeds when using Omit<T, K> #1707
Comments
nija-at
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 2, 2020
RomainMuller
added
p2
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Jun 2, 2020
RomainMuller
added a commit
that referenced
this issue
Jun 2, 2020
When using the `Omit<T, K>` helper type (a mapped type) on an exported API, `jsii` should detect this and fail, instead of allowing the application to compile. An additional bug caused use of this type to result in a successful exit code from `jsii`, while the `.jsii` file was never written. This has also been fixed. Fixes #1707
mergify bot
pushed a commit
that referenced
this issue
Jun 8, 2020
When using the `Omit<T, K>` helper type (a mapped type) on an exported API, `jsii` should detect this and fail, instead of allowing the application to compile. An additional bug caused use of this type to result in a successful exit code from `jsii`, while the `.jsii` file was never written. This was caused by the mapped types symbols not having a `valueDeclaration`, triggering an attempt to read `undefined.parent`, which threw an exception caught by the `Compiler` class, but not signaled back to the caller. Fixes #1707 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Is there any chance to support Omit in the future? |
mergify bot
pushed a commit
to cdklabs/cdk-monitoring-constructs
that referenced
this issue
Mar 5, 2022
Ref: https://github.com/cdklabs/cdk-watchful/blob/main/src/aspect.ts The concept of `MyMonitoringOptions` for every monitoring is needed because `Omit` is not supported by JSII. Please refer this issue and the comment on the linked PR for the way to handle that. aws/jsii#1707 Opened an issue to add aspects for other left-out resources: #41
@mrgrain pointed me at https://github.com/mrgrain/jsii-struct-builder, which could help others looking to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug Report
What is the problem?
jsii does not support the
Omit
type but jsii build does not fail. It's likely that the jsii compiler is ignoring theOmit
type.Props class uses
Omit
utility type - PR commitSuccessful build (account: 260708760616) - https://us-east-1.console.aws.amazon.com/codesuite/codebuild/260708760616/projects/AutoBuildProject6AEA49D1-qxepHUsryhcu/build/AutoBuildProject6AEA49D1-qxepHUsryhcu%3A531f3f72-e613-425b-b692-c041b756d515?region=us-east-1
The text was updated successfully, but these errors were encountered: