Comparing version 0.5.0 to 0.5.1
@@ -45,3 +45,3 @@ import { Validation, ValidationError, Validator } from "./validation"; | ||
*/ | ||
static fromValidator<T>(validator: Validator<FieldValue<unknown>, T>): Field<T>; | ||
static fromValidator<T>(validator: Validator<FieldValue<unknown>, T>, initialValue?: FieldValue<T>): Field<T>; | ||
/** | ||
@@ -48,0 +48,0 @@ * Updates the underlying value of the field. |
@@ -51,4 +51,4 @@ "use strict"; | ||
*/ | ||
static fromValidator(validator) { | ||
return new Field({ validators: [validator] }); | ||
static fromValidator(validator, initialValue) { | ||
return new Field({ validators: [validator], initialValue }); | ||
} | ||
@@ -55,0 +55,0 @@ /** |
@@ -5,3 +5,3 @@ { | ||
"repository": "gustavohenke/fielded", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "homepage": "https://gustavohenke.github.io/fielded/", |
Sorry, the diff of this file is not supported yet
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
44517