Skip to content
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

[typing] Added types to adapter.ts #2922

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

GermanBluefox
Copy link
Contributor

@GermanBluefox GermanBluefox commented Sep 24, 2024

Added some typing to adapter.ts
mostly for 'adapter.systemConfig' (I thought that it is content of 'systetm.config' object)

Tests

  • I have added tests to test this feature
  • It is not possible to test this feature

@GermanBluefox
Copy link
Contributor Author

This PR is really easy to merge and it is manageable

@@ -1437,8 +1454,7 @@ export class AdapterClass extends EventEmitter {
options?: Record<string, any> | null,
): Promise<(ioBroker.AnyObject | null)[]> {
try {
const res = await this.#objects!.getObjects(keys, options);
return res;
return this.#objects!.getObjects(keys, options);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will lead the catch not being functional anymore, can we please minimize PRs to the things we actually want to achieve with them. Personally I don't know what the goal of the adapter.ts changes is as none really rely on the added types.

@@ -272,11 +279,12 @@
"jsonlOptions": {
"$ref": "#/definitions/JsonlOptions"
},
"maxQueue": {
"type": "number",
"description": "do not let messages grow without a limit"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

descriptions seem to start with an uppercase letter in general.

@@ -513,6 +521,10 @@
},
"jsonlOptions": {
"$ref": "#/definitions/JsonlOptions"
},
"maxQueue": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as used multiple times could be put into a definition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants