x
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 后端 OpenAPI schema 类型快捷引用
|
||||
*
|
||||
* 类型由 `npm run gen:api` 从后端 openapi-inventory.json 自动生成(见 ./api.ts)。
|
||||
* 后端字段变更后重新生成即可,前端类型自动同步,杜绝手写类型漂移。
|
||||
*
|
||||
* 用法:Schema<'FinanceSummaryResponse'>、Schema<'SalesOrderResponse'>[]
|
||||
*/
|
||||
import type { components } from './api'
|
||||
|
||||
export type Schema<K extends keyof components['schemas']> = components['schemas'][K]
|
||||
Reference in New Issue
Block a user