@geckos.io/common
Advanced tools
Comparing version 1.5.0 to 1.6.0
import EventEmitter from 'eventemitter3'; | ||
import { Data, ChannelId, EventName, RoomId } from './typings'; | ||
import { Data, ChannelId, EventName, RoomId } from './types'; | ||
export declare class Bridge { | ||
eventEmitter: EventEmitter<string | symbol, any>; | ||
eventEmitter: EventEmitter<string | symbol>; | ||
emit(eventName: EventName, data?: Data, connection?: { | ||
@@ -10,3 +10,3 @@ senderId?: ChannelId; | ||
}): void; | ||
on(eventName: EventName, cb: Function): EventEmitter<string | symbol, any>; | ||
on(eventName: EventName, cb: Function): EventEmitter<string | symbol>; | ||
removeAllListeners(): void; | ||
@@ -13,0 +13,0 @@ } |
@@ -21,6 +21,2 @@ "use strict"; | ||
}; | ||
// this is never used | ||
// removeListener(eventName: EventName, emitted: EventEmitter.ListenerFn, context = undefined) { | ||
// this.eventEmitter.removeListener(eventName, emitted, context) | ||
// } | ||
Bridge.prototype.removeAllListeners = function () { | ||
@@ -27,0 +23,0 @@ this.eventEmitter.removeAllListeners(); |
@@ -1,2 +0,2 @@ | ||
import { RawMessage, Data } from './typings'; | ||
import { RawMessage, Data } from './types'; | ||
declare const isRawMessage: (data: Data | RawMessage) => boolean; | ||
@@ -3,0 +3,0 @@ declare const isObject: (data: Data) => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isJSONString = exports.isObject = exports.isRawMessage = void 0; | ||
var typings_1 = require("./typings"); | ||
var types_1 = require("./types"); | ||
var isRawMessage = function (data) { | ||
return typeof data === 'string' || data instanceof ArrayBuffer || data instanceof typings_1.ArrayBufferView; | ||
return typeof data === 'string' || data instanceof ArrayBuffer || data instanceof types_1.ArrayBufferView; | ||
}; | ||
@@ -8,0 +8,0 @@ exports.isRawMessage = isRawMessage; |
@@ -1,4 +0,4 @@ | ||
import { Data, RawMessage, EventName } from './typings'; | ||
import { Data, RawMessage, EventName } from './types'; | ||
declare const SendMessage: (dataChannel: RTCDataChannel, maxMessageSize: number | undefined, eventName: EventName, data?: Data | RawMessage | null) => any; | ||
export default SendMessage; | ||
//# sourceMappingURL=sendMessage.d.ts.map |
{ | ||
"name": "@geckos.io/common", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "The common module for @geckos.io/server and @geckos.io/client.", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22773
42
324