Incremental Loading and other breaking V3 changes#16
Open
UncleSamSwiss wants to merge 23 commits intomainfrom
Open
Incremental Loading and other breaking V3 changes#16UncleSamSwiss wants to merge 23 commits intomainfrom
UncleSamSwiss wants to merge 23 commits intomainfrom
Conversation
Closes #11
Jey-Cee
reviewed
Feb 16, 2026
But also make clear that common.messagebox should be replaced by common.supportedMessages.custom
Mainly, progress was completely wrong on the client side because types were not reusable
GermanBluefox
approved these changes
Feb 25, 2026
| export type DeviceId = string | number | ComplexDeviceId; | ||
|
|
||
| export type ValueOrObject<T> = T | { objectId: string; property: string }; | ||
| export type ValueOrState<T, M = { [value: string | number]: string }> = T | { stateId: string; mapping?: M }; |
Collaborator
There was a problem hiding this comment.
With the notation [value: string | number]: X we could add the additional information about what is meant with key. Isn't it?
Collaborator
Author
There was a problem hiding this comment.
We always want a mapping from ioBroker state value to the type of the ValueOrState. That was the reason I changed the mapping to Record<string | number, T>. Otherwise every time we have to say how the mapping should look like.
True, we can't force the mapping to contain every possible value of T (in case it is a string union or similar), but turning the mapping around (i.e. Record<T, string | number>) seems weird and doesn't work for boolean.
Keeping M = { [value: string | number]: string } would force every mapping to be "redefined".
v2 is already used by matter@1.0.0 and we would cause breaking API changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The "sibling" of this PR for the GUI components is: ioBroker/dm-gui-components#247
Caution
The next release of dm-utils should have version 3.0.0 to make clear, this is a breaking change and that it is using version 3 of the message protocol.