Skip to content

Commit

Permalink
[items] Fix PersistedItem extending PersistedState type defs (#399)
Browse files Browse the repository at this point in the history
Fixes #398.
Regression from #396.

---------

Signed-off-by: Andy <[email protected]>
  • Loading branch information
Dopeyr authored Nov 10, 2024
1 parent 90313a3 commit aaa5a80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/items/item-persistence.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@ class PersistedState {

/**
* Class representing an instance of {@link https://www.openhab.org/javadoc/latest/org/openhab/core/persistence/historicitem org.openhab.core.persistence.HistoricItem}.
* Extends {@link items.PersistedState}.
*
* @extends items.PersistedState
* @extends PersistedState
* @memberof items
* @hideconstructor
*/
class PersistedItem extends PersistedState {
/**
* Create an PersistedItem, wrapping a native openHAB HistoricItem.
* Create a PersistedItem, wrapping a native openHAB HistoricItem.
* @param {*} rawHistoricItem {@link https://www.openhab.org/javadoc/latest/org/openhab/core/persistence/historicitem org.openhab.core.persistence.HistoricItem}
* @hideconstructor
*/
Expand Down
12 changes: 3 additions & 9 deletions types/items/item-persistence.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,18 +537,13 @@ declare namespace items {
declare const TimeSeries: any;
/**
* Class representing an instance of {@link https://www.openhab.org/javadoc/latest/org/openhab/core/persistence/historicitem org.openhab.core.persistence.HistoricItem}.
* Extends {@link items.PersistedState}.
*
* @extends items.PersistedState
* @extends PersistedState
* @memberof items
* @hideconstructor
*/
declare class PersistedItem {
/**
* Create an PersistedItem, wrapping a native openHAB HistoricItem.
* @param {*} rawHistoricItem {@link https://www.openhab.org/javadoc/latest/org/openhab/core/persistence/historicitem org.openhab.core.persistence.HistoricItem}
* @hideconstructor
*/
constructor(rawHistoricItem: any);
declare class PersistedItem extends PersistedState {
rawHistoricItem: any;
/**
* Timestamp of persisted Item.
Expand All @@ -562,7 +557,6 @@ declare class PersistedItem {
* @returns {time.Instant}
*/
get instant(): JSJoda.Instant;
toString(): string;
}
/**
* @typedef {import('@js-joda/core').ZonedDateTime} time.ZonedDateTime
Expand Down
2 changes: 1 addition & 1 deletion types/items/item-persistence.d.ts.map

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

0 comments on commit aaa5a80

Please sign in to comment.