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(custom-resources): correct JSDoc deprecated property names in ProviderProps (#35110)
Fixes#35049
The deprecated 'role' property in ProviderProps interface had incorrect JSDoc @deprecated comment referencing non-existent property names:
- frameworkOnEventLambdaRole (incorrect)
- frameworkIsCompleteLambdaRole (incorrect)
- frameworkOnTimeoutLambdaRole (incorrect)
Updated to reference the correct property names:
- frameworkOnEventRole
- frameworkCompleteAndTimeoutRole
This improves developer experience by providing accurate migration guidance when using the deprecated role property.
## Issue # (if applicable)
Closes#35049.
## Reason for this change
The JSDoc `@deprecated` comment for the `role` property in the `ProviderProps` interface contained incorrect property names that don't exist in the interface. This misleads developers who are trying to migrate away from the deprecated property, causing confusion and potential implementation errors.
## Description of changes
**Files Modified:**
- `packages/aws-cdk-lib/custom-resources/lib/provider-framework/provider.ts` (line 126)
**Changes Made:**
Updated the JSDoc `@deprecated` comment from:
```typescript
@deprecated - Use frameworkOnEventLambdaRole, frameworkIsCompleteLambdaRole, frameworkOnTimeoutLambdaRole
```
To:
```typescript
@deprecated - Use frameworkOnEventRole, frameworkCompleteAndTimeoutRole
```
**Why these changes address the issue:**
- The corrected property names (`frameworkOnEventRole` and `frameworkCompleteAndTimeoutRole`) actually exist in the `ProviderProps` interface
- These are the proper replacement properties that developers should use instead of the deprecated `role` property
- The fix aligns the documentation with the actual API, preventing developer confusion
**Alternatives considered:**
- No alternatives were considered as this is a straightforward documentation correction to match existing interface properties
**Design decisions:**
- This is purely a documentation fix with no functional changes
- The corrected property names were verified against the actual interface definition and existing test cases
## Describe any new or updated permissions being added
No new or updated IAM permissions are needed. This is a documentation-only change that corrects JSDoc comments.
## Description of how you validated changes
**Build Validation:**
- ✅ Module builds successfully (`yarn build` in custom-resources)
- ✅ JSII compilation passes without errors
- ✅ ESLint passes without warnings
**Property Name Verification:**
- ✅ Confirmed `frameworkOnEventRole` exists in the `ProviderProps` interface (lines 147-154)
- ✅ Confirmed `frameworkCompleteAndTimeoutRole` exists in the `ProviderProps` interface (lines 156-166)
- ✅ Verified these properties are used in existing unit tests (`packages/aws-cdk-lib/custom-resources/test/provider-framework/provider.test.ts`)
**Documentation Impact:**
- ✅ JSDoc comments now reference actual interface properties
- ✅ Generated language bindings will reflect corrected documentation
- ✅ IDE tooltips will show accurate migration guidance
## 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*
0 commit comments