Compare commits

...

2 Commits

Author SHA1 Message Date
b80346d742 2.0.12 2022-10-26 22:39:40 +02:00
aced21a968 fix(core): update 2022-10-26 22:39:39 +02:00
3 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@apiglobal/typedsocket",
"version": "2.0.11",
"version": "2.0.12",
"private": false,
"description": "a typedrequest extension supporting websockets",
"main": "dist_ts/index.js",

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedsocket',
version: '2.0.11',
version: '2.0.12',
description: 'a typedrequest extension supporting websockets'
}

View File

@@ -126,13 +126,13 @@ export class TypedSocket {
this.socketServerOrClient = socketServerOrClientArg;
}
public addTag(keyArg: string, payloadArg: any) {
public addTag<T extends plugins.typedrequestInterfaces.ITag = any>(nameArg: T['name'], payloadArg: T['payload']) {
if (
this.side === 'client' &&
this.socketServerOrClient instanceof plugins.smartsocket.SmartsocketClient
) {
this.socketServerOrClient.socketConnection.addTag({
id: keyArg,
id: nameArg,
payload: payloadArg,
});
} else {