swc/crates/swc_bundler/tests/.cache/untrusted/f575b9cb3e9d34a889fda6a60f9351ba9bf03a9f.ts

26 lines
846 B
TypeScript
Raw Normal View History

// Loaded from https://raw.githubusercontent.com/colinhacks/zod/654680afc2ede388e71e09104eac5a0088fe3207/deno/lib/types/boolean.ts
import { ZodTypes } from "../ZodTypes.ts";
import { ZodType, ZodTypeDef } from "./base.ts";
// import { ZodUndefined } from './undefined';
// import { ZodNull } from './null';
// import { ZodUnion } from './union';
export interface ZodBooleanDef extends ZodTypeDef {
t: ZodTypes.boolean;
}
export class ZodBoolean extends ZodType<boolean, ZodBooleanDef> {
// opt optional: () => ZodUnion<[this, ZodUndefined]> = () => ZodUnion.create([this, ZodUndefined.create()]);
// null nullable: () => ZodUnion<[this, ZodNull]> = () => ZodUnion.create([this, ZodNull.create()]);
toJSON = () => this._def;
static create = (): ZodBoolean => {
return new ZodBoolean({
t: ZodTypes.boolean,
});
};
}