This commit is contained in:
Daniel Flanagan 2024-12-27 11:08:59 -06:00
parent 7825dda25e
commit 7b35f4d490
2 changed files with 10 additions and 0 deletions

3
rpc.ts
View file

@ -25,3 +25,6 @@ export const rpcs = {
return toUser(user)
},
}
export type LyricsRPCs = typeof rpcs
export const rpcNames = Object.keys(rpcs)

7
rpcClient.ts Normal file
View file

@ -0,0 +1,7 @@
import { genCalls } from 'saurpc'
import { LyricsRPCs, rpcNames } from '@lyrics/rpc.ts'
export const client = genCalls<LyricsRPCs>(
rpcNames,
'http://localhost:8000/api/rpc',
)