src/lib/myScript/common/abstractWSMessage.ts
Abstract WebSocket recognition message
constructor(obj: any)
|
Creates an instance of AbstractWSMessage.
Parameters :
|
getType |
getType()
|
Get the message type
Returns:
string
|
type |
type: |
export abstract class AbstractWSMessage {
type: string;
/**
* Creates an instance of AbstractWSMessage.
* @param {any} [obj]
*
* @memberof AbstractWSMessage
*/
constructor(obj?) {
this.type = obj && obj.type || '';
}
/**
* Get the message type
*
* @method getType
* @returns {String}
*/
getType(): string {
return this.type;
};
}