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

@conform-to/dom

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@conform-to/dom - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

16

index.d.ts

@@ -1,2 +0,2 @@

export declare type Constraint<Type> = (Type extends string | number | Date | undefined ? {
export declare type Constraint = {
required?: boolean;

@@ -10,11 +10,3 @@ minLength?: number;

pattern?: string;
} : {}) & (undefined extends Type ? {
required?: false;
} : {
required: true;
}) & (Type extends Array<any> ? {
multiple: true;
} : {
multiple?: false;
});
};
export interface FieldConfig<Type = any> {

@@ -25,7 +17,7 @@ name: string;

form?: string;
constraint?: Constraint<Type>;
constraint?: Constraint;
}
export declare type Schema<Type extends Record<string, any>> = {
fields: {
[Key in keyof Type]-?: Constraint<Type[Key]>;
[Key in keyof Type]-?: Constraint;
};

@@ -32,0 +24,0 @@ validate?: (element: FieldsetElement) => void;

@@ -66,3 +66,2 @@ 'use strict';

error: (_options$error = options.error) === null || _options$error === void 0 ? void 0 : _options$error[key],
// @ts-expect-error
constraint

@@ -69,0 +68,0 @@ };

@@ -62,3 +62,2 @@ /**

error: (_options$error = options.error) === null || _options$error === void 0 ? void 0 : _options$error[key],
// @ts-expect-error
constraint

@@ -65,0 +64,0 @@ };

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "0.1.0",
"version": "0.1.1",
"main": "index.js",

@@ -8,0 +8,0 @@ "module": "module/index.js",

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