You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto-generate useTasksApi from TasksApi at runtime
Add buildApiHook and ApiHook<Api> to protocol.ts so that useTasksApi
can be derived from the TasksApi definition object with zero manual sync.
- Add ApiHook<Api> mapped type that derives request, command, and
notification subscription signatures from an API definition
- Add buildApiHook() that iterates API entries by kind at runtime,
dispatching to ipc.request/command/onNotification
- Replace ~60 lines of manual method listings in useTasksApi with a
single buildApiHook(TasksApi, useIpc()) call
- Update 5 consumer call sites from positional args to params objects
- Inline intermediate const declarations in api.ts into TasksApi object
- Remove unused ParamsOf and ResponseOf utility types
0 commit comments