ecyrbe / zodios

typescript http client and server with zod validation

Home Page:https://www.zodios.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Body and response types should be exported

localhosted opened this issue · comments

Because the types aren't exported we have to resort to manually doing some ungodly type shenanigans like:

export type DashboardList = Awaited<
  ReturnType<typeof api.dashboardList>
>['data']['item'];

export type AdminProductListParams = Parameters<typeof adminApi.productList>[0];

Having to do this mannually defeates the purpose of auto generating from swagger

commented

They are utility types, check the docs : https://www.zodios.org/docs/api/typescript