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.
25 lines
818 B
TypeScript
25 lines
818 B
TypeScript
// Loaded from https://raw.githubusercontent.com/colinhacks/zod/654680afc2ede388e71e09104eac5a0088fe3207/deno/lib/types/void.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 ZodVoidDef extends ZodTypeDef {
|
|
t: ZodTypes.void;
|
|
}
|
|
|
|
export class ZodVoid extends ZodType<void, ZodVoidDef> {
|
|
// 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 = (): ZodVoid => {
|
|
return new ZodVoid({
|
|
t: ZodTypes.void,
|
|
});
|
|
};
|
|
}
|