-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(core): allow embedding condition expression as strings #2007
Conversation
Expose the underlying `toString` in the `IConditionExpression` interface so they can be embedded as string values in jsii languages. Fixes #1984
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not implicitly expose toString() for all objects, like is true in Java?
That's a good point. I will follow up with a PR in jsii to address this: aws/jsii#380 I still think it makes sense to call this out here explicitly given the string tokensization behavior, no? |
I suppose |
* "just work" since conditions are eventually tokens that implement `toString`, | ||
* in order for jsii languages like Java to proxy this to jsii. | ||
*/ | ||
toString(): string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this instead have extended some IToken
interface? I wonder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
Expose the underlying
toString
in theIConditionExpression
interfaceso they can be embedded as string values in jsii languages.
Fixes #1984
Pull Request Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.