-
Notifications
You must be signed in to change notification settings - Fork 6
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: add optionalPrams properties in JSON data #59
fix: add optionalPrams properties in JSON data #59
Conversation
This PR does not introduce any breaking change. But in a future major version, optional params should be removed from param |
Can we please consider moving away from json, this template is getting crazy. |
I'm still struggling with the conditional in the code block, especially since the optional param is wrapped in strings, which would result in Do you all think, we could give optional params a default value? Maybe something like this?
The code block has to get transformed somewhere, correct?
|
yeah indeed, let's stringify the input at code replacement time then. This way, integrations relying on runtime code won't break |
wouldn't that be a breaking change if some users are using |
I think this warrants a larger discussion but I'm beginning to agree. I'll start a Discord thread about this and maybe we can figure out a cleaner way to do all of this. |
couple additions needed in the index.ts file (filter for // add this lines)
|
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.
🚀
fix #58
Hey 👋 this PR move optional params into an
optionalParam
array. It also adds default values tocode
.This should allow integrations to avoid adding default values that can be handled by tpc or google scripts.