HonoH
Hono9mo ago
shcwork

RPC client shows 'any'

Hi, I currently working on getting frontend api with types. But when I do it, it shows

Element implicitly has an 'any' type because expression of type '":shift_date"' can't be used to index type 'ClientRequest<{ [x: `$${Lowercase<string>}`]: { input: any; output: any; outputFormat: string; status: StatusCode; }; }>'.
  Property ':shift_date' does not exist on type 'ClientRequest<{ [x: `$${Lowercase<string>}`]: { input: any; output: any; outputFormat: string; status: StatusCode; }; }>'


in /server/app.ts I did define routes as the docs recommended.

const apiRoutes = app
  .basePath("/api")
  .route("/attendance", attendanceRoute)
export default app;
export type ApiRoutes = typeof apiRoutes;
2Q.png
9k.png
9k.png
Was this page helpful?