Skip to content

Commit

Permalink
[items] Item: Add number to JSDoc for postUpdate/sendCommand
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Jan 18, 2024
1 parent c8c644a commit 903599f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions items/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class Item {
/**
* Sends a command to the Item.
*
* @param {string|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @param {string|number|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @see sendCommandIfDifferent
* @see postUpdate
*/
Expand All @@ -261,7 +261,7 @@ class Item {
/**
* Sends a command to the Item, but only if the current state is not what is being sent.
*
* @param {string|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @param {string|number|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @returns {boolean} true if the command was sent, false otherwise
* @see sendCommand
*/
Expand Down Expand Up @@ -325,7 +325,7 @@ class Item {
/**
* Posts an update to the Item.
*
* @param {string|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @param {string|number|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @see postToggleUpdate
* @see sendCommand
*/
Expand Down
2 changes: 1 addition & 1 deletion types/actions.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions types/items/items.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,19 @@ export class Item {
/**
* Sends a command to the Item.
*
* @param {string|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @param {string|number|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @see sendCommandIfDifferent
* @see postUpdate
*/
sendCommand(value: string | time.ZonedDateTime | Quantity | HostState): void;
sendCommand(value: string | number | time.ZonedDateTime | Quantity | HostState): void;
/**
* Sends a command to the Item, but only if the current state is not what is being sent.
*
* @param {string|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @param {string|number|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @returns {boolean} true if the command was sent, false otherwise
* @see sendCommand
*/
sendCommandIfDifferent(value: string | time.ZonedDateTime | Quantity | HostState): boolean;
sendCommandIfDifferent(value: string | number | time.ZonedDateTime | Quantity | HostState): boolean;
/**
* Calculates the toggled state of this Item. For Items like Color and
* Dimmer, getStateAs(OnOffType) is used and the toggle calculated off
Expand All @@ -266,11 +266,11 @@ export class Item {
/**
* Posts an update to the Item.
*
* @param {string|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @param {string|number|time.ZonedDateTime|Quantity|HostState} value the value of the command to send, such as 'ON'
* @see postToggleUpdate
* @see sendCommand
*/
postUpdate(value: string | time.ZonedDateTime | Quantity | HostState): void;
postUpdate(value: string | number | time.ZonedDateTime | Quantity | HostState): void;
/**
* Gets the names of the groups this Item is member of.
* @returns {string[]}
Expand Down
2 changes: 1 addition & 1 deletion types/items/items.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 903599f

Please sign in to comment.