update typescript definitions to new api
parent
f8e58dd532
commit
aadea2951a
|
@ -24,9 +24,9 @@ interface WEBxDC<T> {
|
|||
/** Returns the peer's own address.
|
||||
* This is esp. useful if you want to differ between different peers - just send the address along with the payload,
|
||||
* and, if needed, compare the payload addresses against selfAddr() later on. */
|
||||
selfAddr(): string;
|
||||
selfAddr: string;
|
||||
/** Returns the peer's own name. This is name chosen by the user in their settings, if there is nothing set, that defaults to the peer's address. */
|
||||
selfName(): string;
|
||||
selfName: string;
|
||||
/**
|
||||
* set a listener for new state updates
|
||||
* note that own state updates, that you send with {@link sendStateUpdate}, also trigger this method
|
||||
|
@ -36,7 +36,7 @@ interface WEBxDC<T> {
|
|||
* In case your Webxdc was just started,
|
||||
* you may want to reconstruct the state from the last run - and also incorporate updates that may have arrived while the app was not running.
|
||||
*/
|
||||
getAllUpdates(): RecievedStateUpdate<T>[];
|
||||
getAllUpdates(): Promise<RecievedStateUpdate<T>[]>;
|
||||
/**
|
||||
* Webxdc apps are usually shared in a chat and run independently on each peer. To get a shared state, the peers use sendUpdate() to send updates to each other.
|
||||
* @param description short, human-readable description what this update is about. this is shown eg. as a fallback text in an email program.
|
||||
|
|
Loading…
Reference in New Issue