@@ -47,6 +47,8 @@ export type ItemMetadata = {
47
47
value : string ;
48
48
configuration : any ;
49
49
} ;
50
+ export type ZonedDateTime = import ( '@js-joda/core' ) . ZonedDateTime ;
51
+ export type Instant = import ( '@js-joda/core' ) . Instant ;
50
52
export type Quantity = import ( '../quantity' ) . Quantity ;
51
53
/**
52
54
* Helper function to ensure an Item name is valid. All invalid characters are replaced with an underscore.
@@ -240,19 +242,19 @@ export class Item {
240
242
/**
241
243
* Sends a command to the Item.
242
244
*
243
- * @param {string|number|time. ZonedDateTime|Quantity|HostState } value the value of the command to send, such as 'ON'
245
+ * @param {string|number|ZonedDateTime|Instant |Quantity|HostState } value the value of the command to send, such as 'ON'
244
246
* @see sendCommandIfDifferent
245
247
* @see postUpdate
246
248
*/
247
- sendCommand ( value : string | number | time . ZonedDateTime | Quantity | HostState ) : void ;
249
+ sendCommand ( value : string | number | ZonedDateTime | Instant | Quantity | HostState ) : void ;
248
250
/**
249
251
* Sends a command to the Item, but only if the current state is not what is being sent.
250
252
*
251
- * @param {string|number|time. ZonedDateTime|Quantity|HostState } value the value of the command to send, such as 'ON'
253
+ * @param {string|number|ZonedDateTime|Instant |Quantity|HostState } value the value of the command to send, such as 'ON'
252
254
* @returns {boolean } true if the command was sent, false otherwise
253
255
* @see sendCommand
254
256
*/
255
- sendCommandIfDifferent ( value : string | number | time . ZonedDateTime | Quantity | HostState ) : boolean ;
257
+ sendCommandIfDifferent ( value : string | number | ZonedDateTime | Instant | Quantity | HostState ) : boolean ;
256
258
/**
257
259
* Increase the value of this Item to the given value by sending a command, but only if the current state is less than that value.
258
260
*
@@ -290,11 +292,11 @@ export class Item {
290
292
/**
291
293
* Posts an update to the Item.
292
294
*
293
- * @param {string|number|time. ZonedDateTime|Quantity|HostState } value the value of the command to send, such as 'ON'
295
+ * @param {string|number|ZonedDateTime|Instant |Quantity|HostState } value the value of the command to send, such as 'ON'
294
296
* @see postToggleUpdate
295
297
* @see sendCommand
296
298
*/
297
- postUpdate ( value : string | number | time . ZonedDateTime | Quantity | HostState ) : void ;
299
+ postUpdate ( value : string | number | ZonedDateTime | Instant | Quantity | HostState ) : void ;
298
300
/**
299
301
* Gets the names of the groups this Item is member of.
300
302
* @returns {string[] }
@@ -331,8 +333,5 @@ import metadata = require("./metadata/metadata");
331
333
import TimeSeries = require( "./time-series" ) ;
332
334
import ItemPersistence = require( "./item-persistence" ) ;
333
335
import ItemSemantics = require( "./item-semantics" ) ;
334
- declare namespace time {
335
- type ZonedDateTime = import ( '@js-joda/core' ) . ZonedDateTime ;
336
- }
337
336
export { metadata , TimeSeries } ;
338
337
//# sourceMappingURL=items.d.ts.map
0 commit comments