File

src/lib/myScript/common/abstractWSMessage.ts

Description

Abstract WebSocket recognition message

Constructor

constructor(obj: any)

Creates an instance of AbstractWSMessage.

Parameters :
  • obj

    *

Methods

getType
getType()

Get the message type

Returns: string

Properties

type
type: string
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;
	};
}

results matching ""

    No results matching ""