🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

wot-typescript-definitions

Package Overview
Dependencies
Maintainers
4
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wot-typescript-definitions - npm Package Compare versions

Comparing version

to
0.5.0-SNAPSHOT.6

16

index.d.ts
import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';

@@ -145,3 +146,3 @@ export as namespace WoT;

* A Thing instance must have an id and a name and its Interactions do have forms and
* functions to interact (get/set/run/subscribe/emit).
* functions to interact (read/write/invoke/subscribe/emit).
*/

@@ -169,8 +170,9 @@ export interface ThingInstance extends ThingFragment {

{
get(): Promise<any>;
set(value: any): Promise<void>;
read(): Promise<any>;
write(value: any): Promise<void>;
subscribe(next?: (value: any) => void, error?: (error: any) => void, complete?: () => void): Subscription;
}
/** Represents an interactable Thing Action */
export interface ThingAction extends ThingInteraction, ActionFragment {
run(parameter?: any): Promise<any>;
invoke(parameter?: any): Promise<any>;
}

@@ -181,3 +183,5 @@

export interface ThingEvent extends ThingInteraction, EventFragment {
emit(data?: any): void;
subscribe(next?: (value: any) => void, error?: (error: any) => void, complete?: () => void): Subscription;
// FIXME emit should be only on ExposedThings' ThingEvents - therefore move emit() to ExposedThing?
emit?(data?: any): void;
}

@@ -187,3 +191,3 @@

export interface ConsumedThing extends ThingInstance {
// TODO: subscribe
// none defined
}

@@ -190,0 +194,0 @@

{
"name": "wot-typescript-definitions",
"version": "0.5.0-SNAPSHOT.5",
"version": "0.5.0-SNAPSHOT.6",
"description": "TypeScript definitions for the W3C WoT Scripting API",

@@ -5,0 +5,0 @@ "author": "the thingweb community",