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

Changed type of ignoreInVersions in visWidgets #2629

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/types-dev/objects.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@ declare global {
name: string;
url: string;
components: string[];
/** The vis widget does not support the listed major versions of vis */
ignoreInVersions: number[];
}

type PaidLicenseType = 'paid' | 'commercial' | 'limited';
Expand Down Expand Up @@ -699,7 +697,10 @@ declare global {
unsafePerm?: true;
/** The available version in the ioBroker repo. */
version: string;
visWidgets?: Record<string, VisWidget>;
/** The vis widget does not support the listed major versions of vis */
visWidgets?: Record<string, VisWidget> | { ignoreInVersions?: number[] };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now you can either define via widgets or ignore I do not think it is the intention. See also my previous comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it works in vis like this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay, please confirm:

Valid:

....
"visWidgets": {
    "ignoreInVersions": [2]
}
.... 

Valid:

....
"visWidgets": {
    "mySuperWidget": { ... }
}
.... 

Invalid:

....
"visWidgets": {
    "mySuperWidget": { ... },
    "ignoreInVersions": [2]
},
.... 

Maybe add some type tests to types-public package in index.test-d.ts to ensure it works like intended.

/** If `true`, the adapter will be started if any value is written into `system.adapter.<name>.<instance>.wakeup. Normally, the adapter should stop after processing the event. */
wakeup?: boolean;
/** Include the adapter version in the URL of the web adapter, e.g. `http://ip:port/1.2.3/material` instead of `http://ip:port/material` */
webByVersion?: boolean;
/** Whether the web server in this adapter can be extended with plugin/extensions */
Expand Down