Refactor: Update Mechanism Type to Use SASLMechanism #1745
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.
Description
This pull request updates the
Mechanism
type by changing the type of themechanism
property fromstring
toSASLMechanism
. This change improves type safety and enforces consistency with the defined SASL mechanisms within the codebase.Fixes #1744
Motivation and Context
By using the dedicated
SASLMechanism
type instead of a generic string, we ensure that only valid SASL mechanism values are used. This reduces the potential for errors and clarifies the intent of the type definition, aligning it with the overall type system of KafkaJS.How Has This Been Tested?
Types of Changes
Checklist
Additional Notes
Feel free to provide any feedback or request further modifications as needed. Thank you for considering this improvement!