@conform-to/dom
Advanced tools
Comparing version 0.4.0 to 0.4.1
export declare type Primitive = null | undefined | string | number | boolean | Date; | ||
export declare type FieldElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | HTMLButtonElement; | ||
export interface FieldConfig<Schema = unknown> extends FieldConstraint { | ||
export interface FieldConfig<Schema = unknown> extends FieldConstraint<Schema> { | ||
name: string; | ||
@@ -12,9 +12,9 @@ defaultValue?: FieldValue<Schema>; | ||
} : unknown; | ||
export declare type FieldConstraint = { | ||
export declare type FieldConstraint<Schema = any> = { | ||
required?: boolean; | ||
minLength?: number; | ||
maxLength?: number; | ||
min?: string | number; | ||
max?: string | number; | ||
step?: string; | ||
min?: Schema extends number ? number : string; | ||
max?: Schema extends number ? number : string; | ||
step?: Schema extends number ? number : string; | ||
multiple?: boolean; | ||
@@ -24,3 +24,3 @@ pattern?: string; | ||
export declare type FieldsetConstraint<Schema extends Record<string, any>> = { | ||
[Key in keyof Schema]?: FieldConstraint; | ||
[Key in keyof Schema]?: FieldConstraint<Schema[Key]>; | ||
}; | ||
@@ -27,0 +27,0 @@ export declare type Submission<Schema = unknown> = { |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "module": "module/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24072