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
I noticed that while the BaseClient constructor's options parameter is marked as optional (options?: BaseClientConfiguration), it's always provided with a non-null value in all creation paths through createClient()[1][2]. This creates an unnecessary nullable context that leads to multiple non-null assertions (!)[1][2][3] throughout the codebase.
This change would make the code more straightforward and remove potentially confusing null-checking context for developers first encountering the codebase. The nullable parameter currently serves no practical purpose since options are always provided during client creation.
Checklist
Make the options parameter required or give default value (e.g. {}) in the BaseClient constructor
Remove non-null assertions where this.config is used
Simplify the type safety guarantees
Additional Notes
No response
The text was updated successfully, but these errors were encountered:
Description
I noticed that while the
BaseClient
constructor'soptions
parameter is marked as optional (options?: BaseClientConfiguration
), it's always provided with a non-null value in all creation paths throughcreateClient()
[1][2]. This creates an unnecessary nullable context that leads to multiple non-null assertions (!
)[1][2][3] throughout the codebase.This change would make the code more straightforward and remove potentially confusing null-checking context for developers first encountering the codebase. The nullable parameter currently serves no practical purpose since options are always provided during client creation.
Checklist
options
parameter required or give default value (e.g. {}) in theBaseClient
constructorthis.config
is usedAdditional Notes
No response
The text was updated successfully, but these errors were encountered: