webex-js-sdk icon indicating copy to clipboard operation
webex-js-sdk copied to clipboard

chore(common): apply decorators function

Open Coread opened this issue 3 months ago • 2 comments

COMPLETES #< INSERT LINK TO ISSUE >

This pull request addresses

Decorators cause lots of errors in VScode due to the way they are trying to apply to ampersand state objects.

by making the following changes

I've created a new function to apply the decorators manually. This avoids the need to physically decorate the code and so the linting works again.

Change Type

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Documentation update
  • [x] Tooling change
  • [ ] Internal code refactor

The following scenarios were tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

I certified that

  • [ ] I have read and followed contributing guidelines

  • [ ] I discussed changes with code owners prior to submitting this pull request

  • [ ] I have not skipped any automated checks

  • [ ] All existing and new tests passed

  • [ ] I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

Summary by CodeRabbit

  • New Features

    • Introduced the applyDecorators function for applying decorators to methods, enhancing functionality.
    • Enhanced the Device class with centralized decorator application for improved readability.
  • Bug Fixes

    • Updated method signatures for refresh and register for clearer parameter naming.
  • Tests

    • Added a test suite for the applyDecorators function to ensure correct functionality.

Coread avatar Nov 21 '24 11:11 Coread