Compare commits
2 Commits
b4e406b468
...
343fda1172
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 343fda1172 | |
Derrick Hammer | 701a3190ae |
|
@ -26,10 +26,10 @@ export default class HyperswarmWeb extends EventEmitter {
|
|||
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
||||
private _processOrQueueAction;
|
||||
private _processQueuedActions;
|
||||
join(topic: Uint8Array, opts?: {}): any;
|
||||
joinPeer(publicKey: Uint8Array): any;
|
||||
leave(topic: Uint8Array): any;
|
||||
leavePeer(publicKey: Uint8Array): any;
|
||||
join(topic: Uint8Array, opts?: {}): void;
|
||||
joinPeer(publicKey: Uint8Array): void;
|
||||
leave(topic: Uint8Array): void;
|
||||
leavePeer(publicKey: Uint8Array): void;
|
||||
status(publicKey: Uint8Array): any;
|
||||
topics(): string[];
|
||||
flush(): Promise<any>;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAW5C,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,YAAY,MAAM,eAAe,CAAC;AAGzC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IACrD,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,gBAAgB,CAAuB;IAE/C,OAAO,CAAC,gBAAgB,CAAsB;gBAClC,IAAI,GAAE,GAAQ;IAO1B,IAAI,WAAW,IAAI,UAAU,CAE5B;IAED,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAIP,gBAAgB;YAmEhB,iBAAiB;IAYzB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ7D,IAAI,MAAM,IAAI,MAA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G,EAAE,KAAK,IAAI,GACjC,UAAU;IAIb,cAAc,CACZ,SAAS,EAAE,MAAM,GAAG,MAAM,EAC1B,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GACjC,IAAI;IAGP,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO;IAIzD,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI;IAI1E,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,qBAAqB;IAQtB,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,KAAK,GAAG,IAAI;IAGxC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI;IAGrC,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAG9B,SAAS,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI;IAGtC,MAAM,CAAC,SAAS,EAAE,UAAU;IAG5B,MAAM,IAAI,MAAM,EAAE;IAGZ,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;IAGrB,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;CAGnC"}
|
|
@ -143,16 +143,16 @@ export default class HyperswarmWeb extends EventEmitter {
|
|||
this._queuedEmActions = [];
|
||||
}
|
||||
join(topic, opts = {}) {
|
||||
return this._activeRelay?.join(topic, opts);
|
||||
return this._processOrQueueAction("join", ...arguments);
|
||||
}
|
||||
joinPeer(publicKey) {
|
||||
return this._activeRelay?.joinPeer(publicKey);
|
||||
return this._processOrQueueAction("joinPeer", ...arguments);
|
||||
}
|
||||
leave(topic) {
|
||||
return this._activeRelay?.leave(topic);
|
||||
return this._processOrQueueAction("leave", ...arguments);
|
||||
}
|
||||
leavePeer(publicKey) {
|
||||
return this._activeRelay?.leavePeer(publicKey);
|
||||
return this._processOrQueueAction("leavePeer", ...arguments);
|
||||
}
|
||||
status(publicKey) {
|
||||
return this._activeRelay?.status(publicKey);
|
||||
|
|
16
src/index.ts
16
src/index.ts
|
@ -198,17 +198,17 @@ export default class HyperswarmWeb extends EventEmitter {
|
|||
this._queuedEmActions = [];
|
||||
}
|
||||
|
||||
public join(topic: Uint8Array, opts = {}) {
|
||||
return this._activeRelay?.join(topic, opts);
|
||||
public join(topic: Uint8Array, opts = {}): void {
|
||||
return this._processOrQueueAction("join", ...arguments);
|
||||
}
|
||||
public joinPeer(publicKey: Uint8Array) {
|
||||
return this._activeRelay?.joinPeer(publicKey);
|
||||
public joinPeer(publicKey: Uint8Array): void {
|
||||
return this._processOrQueueAction("joinPeer", ...arguments);
|
||||
}
|
||||
public leave(topic: Uint8Array) {
|
||||
return this._activeRelay?.leave(topic);
|
||||
public leave(topic: Uint8Array): void {
|
||||
return this._processOrQueueAction("leave", ...arguments);
|
||||
}
|
||||
public leavePeer(publicKey: Uint8Array) {
|
||||
return this._activeRelay?.leavePeer(publicKey);
|
||||
public leavePeer(publicKey: Uint8Array): void {
|
||||
return this._processOrQueueAction("leavePeer", ...arguments);
|
||||
}
|
||||
public status(publicKey: Uint8Array) {
|
||||
return this._activeRelay?.status(publicKey);
|
||||
|
|
Loading…
Reference in New Issue