Files
SnowLuma/.pnpm-store/v11/files/18/7d13f2e68a40e9930f461d2e740665c47d4e99a6389ef9999ccaee1266052a1c7bf26cb1fd35a94edb0023e11a21c2a4b6ef24f208a813f8550d78cbd5cd47
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

9 lines
476 B
Plaintext

export namespace errorUtil {
export type ErrMessage = string | { message?: string | undefined };
export const errToObj = (message?: ErrMessage): { message?: string | undefined } =>
typeof message === "string" ? { message } : message || {};
// biome-ignore lint/suspicious/noShadowRestrictedNames: renaming churns 31 v3 call sites
export const toString = (message?: ErrMessage): string | undefined =>
typeof message === "string" ? message : message?.message;
}