fix(build): tighten TypeScript compatibility and update project build configuration
This commit is contained in:
@@ -22,7 +22,7 @@ export type TSocketConnectionSide = 'server' | 'client';
|
||||
* interface for constructor of class SocketConnection
|
||||
*/
|
||||
export interface ISocketConnectionConstructorOptions {
|
||||
alias: string;
|
||||
alias?: string;
|
||||
authenticated: boolean;
|
||||
side: TSocketConnectionSide;
|
||||
smartsocketHost: Smartsocket | SmartsocketClient;
|
||||
@@ -43,7 +43,7 @@ export let allSocketConnections = new plugins.lik.ObjectMap<SocketConnection>();
|
||||
* class SocketConnection represents a websocket connection
|
||||
*/
|
||||
export class SocketConnection {
|
||||
public alias: string;
|
||||
public alias?: string;
|
||||
public side: TSocketConnectionSide;
|
||||
public authenticated: boolean = false;
|
||||
public smartsocketRef: Smartsocket | SmartsocketClient;
|
||||
@@ -97,6 +97,10 @@ export class SocketConnection {
|
||||
}
|
||||
|
||||
private handleFunctionCall(messageData: interfaces.ISocketMessage<interfaces.IFunctionCallPayload>): void {
|
||||
if (!messageData.id) {
|
||||
logger.log('warn', 'received function call without request id');
|
||||
return;
|
||||
}
|
||||
const requestData: ISocketRequestDataObject<any> = {
|
||||
funcCallData: {
|
||||
funcName: messageData.payload.funcName,
|
||||
@@ -124,6 +128,10 @@ export class SocketConnection {
|
||||
}
|
||||
|
||||
private handleFunctionResponse(messageData: interfaces.ISocketMessage<interfaces.IFunctionCallPayload>): void {
|
||||
if (!messageData.id) {
|
||||
logger.log('warn', 'received function response without request id');
|
||||
return;
|
||||
}
|
||||
const responseData: ISocketRequestDataObject<any> = {
|
||||
funcCallData: {
|
||||
funcName: messageData.payload.funcName,
|
||||
|
||||
Reference in New Issue
Block a user