Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

createServerRpc.ts

11 lines265 Bytes

1import { TSS_SERVER_FUNCTION } from '@tanstack/start-client-core'
2​
3export const createServerRpc = (
4 functionId: string,
5 splitImportFn: (...args: any) => any,
6) => {
7 return Object.assign(splitImportFn, {
8 functionId,
9 [TSS_SERVER_FUNCTION]: true,
10 })