You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject Props arguments that have a property with the same name as a function parameter #268
That works fine in TypeScript, but in languages where we want to "lift" a final props parameter into arguments to the function itself (like for example, keyword arguments in Python), this will fail because it will generate code like:
Which is an error, because there is a collision on the "real" function parameter names, and the lifted parameter names, and you can't have two parameters with the same name.
Ideally the JSII compiler would reject this method signature, and require one of the two names to change. Alternatively, if there were a way to either opt-in or opt-out of the lifting of MyProps into keyword arguments, that could also allow people a way to resolve this without requiring them to choose different names, they would just not lift that particular data type into keyword arguments.
Activity
fix: require distinct argument and property names
fix: require distinct argument and property names (#272)
v0.7.8
v0.7.8 (#273)