mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
9 lines
341 B
TypeScript
9 lines
341 B
TypeScript
// Loaded from https://raw.githubusercontent.com/colinhacks/zod/654680afc2ede388e71e09104eac5a0088fe3207/deno/lib/helpers/errorUtil.ts
|
|
|
|
|
|
export namespace errorUtil {
|
|
export type ErrMessage = string | { message?: string };
|
|
export const errToObj = (message?: ErrMessage) =>
|
|
typeof message === "string" ? { message } : message || {};
|
|
}
|