This commit is contained in:
2019-09-25 20:53:53 +02:00
parent c45f9a2558
commit 5690a572d3
4 changed files with 34 additions and 10 deletions
+3 -2
View File
@@ -116,9 +116,10 @@ const extractArgs = (f:Function):string[] => {
* Simple utility function to create basic {@link SubscriptionResponse}
* @param uuid optional uuid to use, otherwise defaults to uuid/v4
*/
export function makeSubResponse(uuid?:string):SubscriptionResponse{
export function makeSubResponse<T extends {} = {}>(extension:T):SubscriptionResponse & T{
return {
result: "Success",
uuid: uuid?uuid:uuidv4(),
uuid: uuidv4(),
...extension
}
}