The CompositePrincipal signature is inconvenient to use #2327
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
feature-request
A feature should be added or improved.
Describe the bug
The
new CompositePrincipal()
constructor accepts a list ofPolicyPrinciple
s as arguments. I'd like to be able to refactor my code to pass an array of principals, but the type is fighting me.I realize there is a tradeoff here, since logically we'd like to have at least 1 principal in a composite principal. However, I feel that the benefit of a type error for
new iam.CompositePrincipal()
(rather than a synth-time error) is less than the benefit of being able to pass an array as arguments.To Reproduce
Expected behavior
No type errors.
Version:
The text was updated successfully, but these errors were encountered: