-
Couldn't load subscription status.
- Fork 5.5k
Add getEnvironment to BaseClient #15488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
2bdb6b5
13c76b1
d0ac161
642295e
e2af32e
9d77584
98af366
69e1260
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -143,7 +143,7 @@ export class BackendClient extends BaseClient { | |||||
| token: string | ||||||
| expiresAt: number | ||||||
| }; | ||||||
| protected override projectId: string; | ||||||
| protected override projectId: string = ""; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Reconsider adding a default empty string value for The default empty string value for
Remove the default value since it's not needed: - protected override projectId: string = "";
+ protected override projectId: string;📝 Committable suggestion
Suggested change
|
||||||
|
|
||||||
| /** | ||||||
| * Constructs a new ServerClient instance. | ||||||
|
|
||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve type safety and error handling.
Several improvements can be made to enhance type safety and error handling:
anytypes with specific typesApply this diff to improve the code:
📝 Committable suggestion
🧰 Tools
🪛 ESLint
[error] 731-731: Unexpected any. Specify a different type.
(@typescript-eslint/no-explicit-any)
[error] 731-731: Unexpected any. Specify a different type.
(@typescript-eslint/no-explicit-any)
[error] 731-731: Unexpected any. Specify a different type.
(@typescript-eslint/no-explicit-any)
[error] 732-732: A linebreak is required after '['.
(array-bracket-newline)
[error] 732-732: There should be a linebreak after this element.
(array-element-newline)
[error] 732-732: A linebreak is required before ']'.
(array-bracket-newline)
[error] 733-733: Unexpected any. Specify a different type.
(@typescript-eslint/no-explicit-any)
[error] 737-737: Empty block statement.
(no-empty)