make makeUnique more unique

This commit is contained in:
2020-01-19 02:56:04 +01:00
parent ae843d341e
commit daf9ccc133
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ export class RPCSocket implements I.Socket{
this[i.owner][i.name] = f
this[i.owner][i.name].bind(this)
})
return <RPCSocket & T.RPCInterface<T>> <any> this
return <RPCSocket & T.RPCInterface<T>> (this as any)
}
/**
+1 -1
View File
@@ -62,9 +62,9 @@ export function rpcHooker<SubResT = {}>(socket: I.Socket, exporter:I.RPCExporter
const RPCs = [...exporter.exportRPCs()]
const suffix = makeUnique?"-"+uuidv4().substr(0,4):""
return RPCs.map(rpc => rpcToRpcinfo(rpc, owner, sesame))
.map(info => {
const suffix = makeUnique?"-"+uuidv4().substr(0,4):""
const ret:any = info
ret.uniqueName = info.name+suffix