fix(core): update

This commit is contained in:
Philipp Kunz 2022-10-26 22:39:39 +02:00
parent fa40e3a5dc
commit aced21a968
2 changed files with 3 additions and 3 deletions

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 {