Socket
Socket
Sign inDemoInstall

validation.ts

Package Overview
Dependencies
1
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.20 to 0.0.21

10

commonjs/validation.d.ts

@@ -87,4 +87,12 @@ import { Result, Ok, Err, Option, None, Some } from 'space-lift';

export declare type Props = Record<string, Any>;
declare type OptionalKeys<P extends Props> = {
[K in keyof P]: undefined extends TypeOf<P[K]> ? K : never;
}[keyof P];
declare type MandatoryKeys<P extends Props> = {
[K in keyof P]: undefined extends TypeOf<P[K]> ? never : K;
}[keyof P];
export declare type ObjectOf<P extends Props> = {
[K in keyof P]: TypeOf<P[K]>;
[K in MandatoryKeys<P>]: TypeOf<P[K]>;
} & {
[K in OptionalKeys<P>]?: TypeOf<P[K]>;
};

@@ -91,0 +99,0 @@ export declare class ObjectValidator<P extends Props> extends Validator<ObjectOf<P>> {

@@ -87,4 +87,12 @@ import { Result, Ok, Err, Option, None, Some } from 'space-lift';

export declare type Props = Record<string, Any>;
declare type OptionalKeys<P extends Props> = {
[K in keyof P]: undefined extends TypeOf<P[K]> ? K : never;
}[keyof P];
declare type MandatoryKeys<P extends Props> = {
[K in keyof P]: undefined extends TypeOf<P[K]> ? never : K;
}[keyof P];
export declare type ObjectOf<P extends Props> = {
[K in keyof P]: TypeOf<P[K]>;
[K in MandatoryKeys<P>]: TypeOf<P[K]>;
} & {
[K in OptionalKeys<P>]?: TypeOf<P[K]>;
};

@@ -91,0 +99,0 @@ export declare class ObjectValidator<P extends Props> extends Validator<ObjectOf<P>> {

2

package.json
{
"name": "validation.ts",
"version": "0.0.20",
"version": "0.0.21",
"description": "Validation for TypeScript",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc