mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 16:42:28 +03:00
27 lines
838 B
TypeScript
27 lines
838 B
TypeScript
// Loaded from https://raw.githubusercontent.com/colinhacks/zod/654680afc2ede388e71e09104eac5a0088fe3207/deno/lib/types/bigint.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 ZodBigIntDef extends ZodTypeDef {
|
|
t: ZodTypes.bigint;
|
|
}
|
|
|
|
export class ZodBigInt extends ZodType<bigint, ZodBigIntDef> {
|
|
// 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 = (): ZodBigInt => {
|
|
return new ZodBigInt({
|
|
t: ZodTypes.bigint,
|
|
});
|
|
};
|
|
}
|