Files
NapCatQQ/.pnpm-store/v3/files/4d/e156ef5c6c9af24fa11b2995510e9d8a90f7ba92954320f78741fc5e3e854de1bf00a977461fc82a6fffc036c9f53d4832725c76122e006bff4f5a662f6ba7
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
601 B
Plaintext

import type { BaseQueryFn } from './baseQueryTypes'
export const _NEVER = /* @__PURE__ */ Symbol()
export type NEVER = typeof _NEVER
/**
* Creates a "fake" baseQuery to be used if your api *only* uses the `queryFn` definition syntax.
* This also allows you to specify a specific error type to be shared by all your `queryFn` definitions.
*/
export function fakeBaseQuery<ErrorType>(): BaseQueryFn<
void,
NEVER,
ErrorType,
{}
> {
return function () {
throw new Error(
'When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.',
)
}
}