Commit cc491df
authored
fix(mixins-preview): cannot use string literal types for
### Issue # (if applicable)
```
@aws-cdk.mixins-preview.aws_logs.S3LogsDelivery-example.ts:19:3 - error TS2322: Type '"permissionsVersion"' is not assignable to type '"V1" | "V2" | undefined'.
19 permissionsVersion: 'permissionsVersion',
~~~~~~~~~~~~~~~~~~
@aws-cdk.mixins-preview.aws_logs.S3LogsDeliveryProps-example.ts:16:3 - error TS2322: Type '"permissionsVersion"' is not assignable to type '"V1" | "V2" | undefined'.
16 permissionsVersion: 'permissionsVersion',
~~~~~~~~~~~~~~~~~~
/codebuild/output/src37859859/src/packages/@aws-cdk/mixins-preview/lib/services/aws-logs/logs-delivery.ts:54:12
54 readonly permissionsVersion?: 'V1' | 'V2';
~~~~~~~~~~~~~~~~~~
The expected type comes from property 'permissionsVersion' which is declared here on type 'S3LogsDeliveryProps'
[jsii-rosetta] [WARN] 2 diagnostics from assemblies with 'strict' mode on (and 368 more non-strict diagnostics)
```
### Reason for this change
String literal types are not allowed in our pipeline.
### Description of changes
Replaced the string literal type with an enum.
### Describe any new or updated permissions being added
n/a
### Description of how you validated changes
Existing tests.
### Checklist
- [x] 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*S3LogsDeliveryProps.permissionsVersion (#36197)1 parent f431021 commit cc491df
File tree
2 files changed
+19
-5
lines changed- packages/@aws-cdk/mixins-preview
- lib/services/aws-logs
- test/services/aws-logs
2 files changed
+19
-5
lines changedLines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
| |||
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
54 | | - | |
| 68 | + | |
55 | 69 | | |
56 | 70 | | |
57 | 71 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
0 commit comments