Replies: 1 comment
-
We can't use union types due to how jsii works to support other languages - however we do often validate props to ensure that the configurations will not conflict and cause failure at deployment. If there's a specific validation we can implement for Queue, we'd love to have an issue tracking that / a PR to fix that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all! 👋
I wish CDK types had stronger types on resources props - and searched on issues but couldn't find anything related.
Currently, one can define this and only learn its invalid at runtime, when stack is being deployed:
Typescript CDK could leverage the language's discriminated unions to avoid errors like the one above at compile time.
For example:
I know the doc specifies
Only applies to FIFO queues
, but even better than doc is a compilation error, like so:Does anyone know whether there's an issue to address this?
Is anyone interested in such improvement across the codebase?
Edit: fix the type structure introducing
AbstractQueueProps
Beta Was this translation helpful? Give feedback.
All reactions