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
chore: add undefined type to principalAccount (#33055)
### Reason for this change
When using TypeScript option exactOptionalPropertyTypes: true` we get the following error. All implementations of `IPrincipal` have the type `string | undefined` so this is change will apply it at the base
```
Type 'AccountPrincipal' is not assignable to type 'IPrincipal' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'principalAccount' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.ts(2375)
```
### Description of changes
Changed type definition of IPrincipal `principalAccount`
### Describe any new or updated permissions being added
N/A
### Description of how you validated changes
### Checklist
- [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments