UNPKG
@depup/trpc__client
Version:
latest (11.19.0-depup.0)
11.19.0-depup.0
11.18.0-depup.0
11.16.0-depup.0
11.15.1-depup.0
11.15.0-depup.0
11.14.1-depup.0
11.13.4-depup.0
11.13.3-depup.0
11.12.1-depup.0
The tRPC client library (with updated dependencies)
trpc.io
trpc/trpc
@depup/trpc__client
/
src
/
internals
/
inputWithTrackedEventId.ts
16 lines
(15 loc)
•
273 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export
function
inputWithTrackedEventId
( input: unknown, lastEventId: string | undefined, )
{
if
(!lastEventId) {
return
input
; }
if
(
input
!= null && typeof
input
!==
'object'
) {
return
input
; }
return
{ ...(
input
?? {}), lastEventId, }; }