Skip to content

Commit

Permalink
allow use of string value for CharacteristicEventTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed May 7, 2020
1 parent 671a7e2 commit 0dc7c6e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/Characteristic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ export type CharacteristicGetCallback<T = Nullable<CharacteristicValue>> = (erro
export type CharacteristicSetCallback = (error?: Error | null, value?: CharacteristicValue) => void

type Events = {
[CharacteristicEventTypes.CHANGE]: (change: CharacteristicChange) => void;
[CharacteristicEventTypes.GET]: (cb: CharacteristicGetCallback, context?: any, connectionID?: SessionIdentifier) => void;
[CharacteristicEventTypes.SET]: (value: CharacteristicValue, cb: CharacteristicSetCallback, context?: any, connectionID?: SessionIdentifier) => void;
[CharacteristicEventTypes.SUBSCRIBE]: VoidCallback;
[CharacteristicEventTypes.UNSUBSCRIBE]: VoidCallback;
["change"]: (change: CharacteristicChange) => void;
["get"]: (cb: CharacteristicGetCallback, context?: any, connectionID?: SessionIdentifier) => void;
["set"]: (value: CharacteristicValue, cb: CharacteristicSetCallback, context?: any, connectionID?: SessionIdentifier) => void;
["subscribe"]: VoidCallback;
["unsubscribe"]: VoidCallback;
}

/**
Expand Down

0 comments on commit 0dc7c6e

Please sign in to comment.