Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zod

Package Overview
Dependencies
Maintainers
1
Versions
372
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zod - npm Package Compare versions

Comparing version 3.24.0-canary.20241107T043915 to 3.24.0-canary.20241210T025031

23

lib/types.d.ts
import { enumUtil } from "./helpers/enumUtil";
import { errorUtil } from "./helpers/errorUtil";
import { AsyncParseReturnType, ParseContext, ParseInput, ParseParams, ParseReturnType, ParseStatus, SyncParseReturnType } from "./helpers/parseUtil";
import { AsyncParseReturnType, INVALID, ParseContext, ParseInput, ParseParams, ParseReturnType, ParseStatus, SyncParseReturnType } from "./helpers/parseUtil";
import { partialUtil } from "./helpers/partialUtil";

@@ -183,4 +183,11 @@ import { Primitive } from "./helpers/typeAliases";

} | {
kind: "cidr";
version?: IpVersion;
message?: string;
} | {
kind: "base64";
message?: string;
} | {
kind: "base64url";
message?: string;
};

@@ -210,2 +217,3 @@ export interface ZodStringDef extends ZodTypeDef {

base64(message?: errorUtil.ErrMessage): ZodString;
base64url(message?: errorUtil.ErrMessage): ZodString;
ip(options?: string | {

@@ -215,2 +223,6 @@ version?: IpVersion;

}): ZodString;
cidr(options?: string | {
version?: IpVersion;
message?: string;
}): ZodString;
datetime(options?: string | {

@@ -259,3 +271,5 @@ message?: string | undefined;

get isIP(): boolean;
get isCIDR(): boolean;
get isBase64(): boolean;
get isBase64url(): boolean;
get minLength(): number | null;

@@ -354,2 +368,3 @@ get maxLength(): number | null;

_parse(input: ParseInput): ParseReturnType<bigint>;
_getInvalidInput(input: ParseInput): INVALID;
static create: (params?: ({

@@ -619,3 +634,3 @@ errorMap?: ZodErrorMap | undefined;

} & ZodRawShape, UnknownKeysParam, ZodTypeAny>;
export interface ZodDiscriminatedUnionDef<Discriminator extends string, Options extends ZodDiscriminatedUnionOption<string>[] = ZodDiscriminatedUnionOption<string>[]> extends ZodTypeDef {
export interface ZodDiscriminatedUnionDef<Discriminator extends string, Options extends readonly ZodDiscriminatedUnionOption<string>[] = ZodDiscriminatedUnionOption<string>[]> extends ZodTypeDef {
discriminator: Discriminator;

@@ -626,3 +641,3 @@ options: Options;

}
export declare class ZodDiscriminatedUnion<Discriminator extends string, Options extends ZodDiscriminatedUnionOption<Discriminator>[]> extends ZodType<output<Options[number]>, ZodDiscriminatedUnionDef<Discriminator, Options>, input<Options[number]>> {
export declare class ZodDiscriminatedUnion<Discriminator extends string, Options extends readonly ZodDiscriminatedUnionOption<Discriminator>[]> extends ZodType<output<Options[number]>, ZodDiscriminatedUnionDef<Discriminator, Options>, input<Options[number]>> {
_parse(input: ParseInput): ParseReturnType<this["_output"]>;

@@ -640,3 +655,3 @@ get discriminator(): Discriminator;

*/
static create<Discriminator extends string, Types extends [
static create<Discriminator extends string, Types extends readonly [
ZodDiscriminatedUnionOption<Discriminator>,

@@ -643,0 +658,0 @@ ...ZodDiscriminatedUnionOption<Discriminator>[]

2

lib/ZodError.d.ts

@@ -73,3 +73,3 @@ import type { TypeOf, ZodType } from ".";

}
export declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "base64" | {
export declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "base64url" | {
includes: string;

@@ -76,0 +76,0 @@ position?: number;

{
"name": "zod",
"version": "3.24.0-canary.20241107T043915",
"version": "3.24.0-canary.20241210T025031",
"author": "Colin McDonnell <colin@colinhacks.com>",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc