File tree 10 files changed +22
-12
lines changed
10 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 2
2
// Change this to match your project
3
3
"include" : [" ../src/**/*.js" ],
4
4
"exclude" : [
5
+ " ../src/helpers.js" ,
6
+ " ../src/index.js" ,
5
7
" ../test/**" ,
6
8
" ../coverage/**" ,
7
9
" ../dist/**" ,
Original file line number Diff line number Diff line change @@ -334,11 +334,11 @@ class Item {
334
334
* Calculates the toggled state of this Item.
335
335
* For Items like Color and Dimmer, getStateAs(OnOffType) is used and the toggle calculated of that.
336
336
*
337
- * @private
337
+ * @ignore
338
338
* @returns the toggled state (e.g. 'OFF' if the Item is 'ON')
339
339
* @throws error if the Item is uninitialized or is a type that doesn't make sense to toggle
340
340
*/
341
- # getToggleState ( ) {
341
+ getToggleState ( ) {
342
342
if ( this . isUninitialized ) {
343
343
throw Error ( 'Cannot toggle uninitialized Items' ) ;
344
344
}
@@ -366,7 +366,7 @@ class Item {
366
366
if ( this . type === 'Contact' ) {
367
367
throw Error ( 'Cannot command Contact Items' ) ;
368
368
}
369
- this . sendCommand ( this . # getToggleState( ) ) ;
369
+ this . sendCommand ( this . getToggleState ( ) ) ;
370
370
}
371
371
372
372
/**
@@ -375,7 +375,7 @@ class Item {
375
375
* @throws error if the Item is uninitialized or a type that cannot be toggled
376
376
*/
377
377
postToggleUpdate ( ) {
378
- this . postUpdate ( this . # getToggleState( ) ) ;
378
+ this . postUpdate ( this . getToggleState ( ) ) ;
379
379
}
380
380
381
381
/**
Original file line number Diff line number Diff line change @@ -267,6 +267,15 @@ export class Item {
267
267
* @return {boolean } true if the command was sent, false otherwise
268
268
*/
269
269
sendDecreaseCommand ( value : number | Quantity | HostState ) : boolean ;
270
+ /**
271
+ * Calculates the toggled state of this Item.
272
+ * For Items like Color and Dimmer, getStateAs(OnOffType) is used and the toggle calculated of that.
273
+ *
274
+ * @ignore
275
+ * @returns the toggled state (e.g. 'OFF' if the Item is 'ON')
276
+ * @throws error if the Item is uninitialized or is a type that doesn't make sense to toggle
277
+ */
278
+ getToggleState ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
270
279
/**
271
280
* Sends a command to flip the Item's state (e.g. if it is 'ON' an 'OFF' command is sent).
272
281
* @throws error if the Item is uninitialized or a type that cannot be toggled or commanded
@@ -317,7 +326,6 @@ export class Item {
317
326
*/
318
327
removeTags ( ...tagNames : string [ ] ) : void ;
319
328
toString ( ) : any ;
320
- #private;
321
329
}
322
330
import metadata = require( "./metadata/metadata" ) ;
323
331
import TimeSeries = require( "./time-series" ) ;
Original file line number Diff line number Diff line change
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export type Item = {
33
33
sendCommandIfDifferent ( value : any ) : boolean ;
34
34
sendIncreaseCommand ( value : any ) : boolean ;
35
35
sendDecreaseCommand ( value : any ) : boolean ;
36
- "__#6@# getToggleState" ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
36
+ getToggleState ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
37
37
sendToggleCommand ( ) : void ;
38
38
postToggleUpdate ( ) : void ;
39
39
postUpdate ( value : any ) : void ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export type Item = {
24
24
sendCommandIfDifferent ( value : any ) : boolean ;
25
25
sendIncreaseCommand ( value : any ) : boolean ;
26
26
sendDecreaseCommand ( value : any ) : boolean ;
27
- "__#6@# getToggleState" ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
27
+ getToggleState ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
28
28
sendToggleCommand ( ) : void ;
29
29
postToggleUpdate ( ) : void ;
30
30
postUpdate ( value : any ) : void ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export type Item = {
37
37
sendCommandIfDifferent ( value : any ) : boolean ;
38
38
sendIncreaseCommand ( value : any ) : boolean ;
39
39
sendDecreaseCommand ( value : any ) : boolean ;
40
- "__#6@# getToggleState" ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
40
+ getToggleState ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
41
41
sendToggleCommand ( ) : void ;
42
42
postToggleUpdate ( ) : void ;
43
43
postUpdate ( value : any ) : void ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export type Item = {
33
33
sendCommandIfDifferent ( value : any ) : boolean ;
34
34
sendIncreaseCommand ( value : any ) : boolean ;
35
35
sendDecreaseCommand ( value : any ) : boolean ;
36
- "__#6@# getToggleState" ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
36
+ getToggleState ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ; /** @private */
37
37
sendToggleCommand ( ) : void ;
38
38
postToggleUpdate ( ) : void ;
39
39
postUpdate ( value : any ) : void ;
Original file line number Diff line number Diff line change
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export type Item = {
33
33
sendCommandIfDifferent ( value : any ) : boolean ;
34
34
sendIncreaseCommand ( value : any ) : boolean ;
35
35
sendDecreaseCommand ( value : any ) : boolean ;
36
- "__#6@# getToggleState" ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
36
+ getToggleState ( ) : "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" ;
37
37
sendToggleCommand ( ) : void ;
38
38
postToggleUpdate ( ) : void ;
39
39
postUpdate ( value : any ) : void ;
You can’t perform that action at this time.
0 commit comments