M1 Task 1: 创建 4 层数据抽象层的骨架文件 - errors.ts: ApiError + GraphQLErrorCode 枚举 - types.ts: Pagination / PaginatedResult / UseQueryResult / UseMutationResult - internal.ts: normalizeError 把 ApolloError 转为 ApiError - index.ts: barrel 出口
11 lines
235 B
TypeScript
11 lines
235 B
TypeScript
/**
|
||
* API 层统一出口
|
||
*
|
||
* widget 通过 `import { useParentChildren } from "@/lib/api"` 调用。
|
||
* 各 domain 文件在 M2 阶段逐步加入。
|
||
*
|
||
* 关联:spec §2.2
|
||
*/
|
||
export * from "./errors";
|
||
export * from "./types";
|