Refactor constructor parameters to use a TypeScript interface for TMpesaPay #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor constructor parameters to use a TypeScript interface for TMpesaPay
This commit refactors the constructor of the TMpesaPay class to use a TypeScript interface, providing a more concise and organized way to handle the class's properties. Instead of individual parameters, the constructor now takes a single object of type TMpesaPay. This change improves readability and maintainability of the code.
Refactor constructor parameters to use a TypeScript interface for TMpesaPay
The constructor of the TMpesaPay class has been refactored to use a TypeScript interface, providing a more concise and organized approach to handle the class's properties. The changes include converting individual parameters to a single object of type TMpesaPay. This modification enhances code readability and maintainability, making it easier to manage properties and their defaults.
Before:
After
By utilizing an interface, this change improves the overall structure and maintainability of the code, making it easier to extend and manage the class properties in the future.