wot-typescript-definitions
Advanced tools
Comparing version
@@ -124,3 +124,3 @@ export as namespace WoT; | ||
/** Observable for subscribing to TD changes */ | ||
onTDChange(name: string): Observable<any>; | ||
onTDChange(): Observable<any>; | ||
} | ||
@@ -187,3 +187,22 @@ | ||
interface ThingBuilder { | ||
export interface ExposedThing extends ConsumedThing { | ||
/** Start serving external requests for the Thing. */ | ||
start(): Promise<void> | ||
/** Stop serving external requests for the Thing. */ | ||
stop(): Promise<void> | ||
/** Generates the Thing Description given the properties, Actions and Event defined for this object. If a directory argument is given, make a request to register the Thing Description with the given WoT repository by invoking its register Action. */ | ||
register(directory: USVString): Promise<void> | ||
/** If a directory argument is given, make a request to unregister the Thing Description with the given WoT repository by invoking its unregister Action. Then, and in the case no arguments were provided to this function, stop the Thing and remove the Thing Description. */ | ||
unregister(directory: USVString): Promise<void> | ||
/** Emits an the event initialized with the event name specified by the eventName argument and data specified by the payload argument. */ | ||
emitEvent(eventName: string, payload: any): Promise<void> | ||
/** | ||
@@ -219,19 +238,1 @@ * Adds a Property defined by the argument and updates the Thing Description | ||
} | ||
export interface ExposedThing extends ConsumedThing, ThingBuilder { | ||
/** Start serving external requests for the Thing. */ | ||
start(): Promise<void> | ||
/** Stop serving external requests for the Thing. */ | ||
stop(): Promise<void> | ||
/** Generates the Thing Description given the properties, Actions and Event defined for this object. If a directory argument is given, make a request to register the Thing Description with the given WoT repository by invoking its register Action. */ | ||
register(directory?: USVString): Promise<void> | ||
/** If a directory argument is given, make a request to unregister the Thing Description with the given WoT repository by invoking its unregister Action. Then, and in the case no arguments were provided to this function, stop the Thing and remove the Thing Description. */ | ||
unregister(directory?: USVString): Promise<void> | ||
/** Emits an the event initialized with the event name specified by the eventName argument and data specified by the payload argument. */ | ||
emitEvent(eventName: string, payload: any): Promise<void> | ||
} |
{ | ||
"name": "wot-typescript-definitions", | ||
"version": "0.4.0-SNAPSHOT.6", | ||
"version": "0.4.0-SNAPSHOT.7", | ||
"description": "Typescript definitions for the WoT scripting API", | ||
@@ -5,0 +5,0 @@ "main": "index.d.ts", |
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
12562
-0.4%209
-0.95%