forked from imbytecat/fullstack-starter
refactor: 简化客户端类型声明并增强路由客户端类型支持
- 更新客户端类型推断并简化类型声明以支持更灵活的路由客户端使用 - 导出路由器客户端类型以支持类型安全的客户端调用。
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import type { RouterClient as ORPCRouterClient } from '@orpc/server'
|
||||
import * as todo from './handlers/todo'
|
||||
|
||||
export const router = {
|
||||
todo,
|
||||
}
|
||||
|
||||
export type RouterClient = ORPCRouterClient<typeof router>
|
||||
|
||||
Reference in New Issue
Block a user