Comparing version 1.1.0 to 1.1.1
@@ -30,7 +30,11 @@ declare type ErreurInfos = { | ||
}; | ||
declare type FromTypesFactory<ErrorsInfos extends { | ||
kind: string; | ||
message: string; | ||
}> = <Errors extends FromTypes<ErrorsInfos>>(errors: Errors) => ErreursMap<Errors>; | ||
declare class ErreursMap<Errors extends ErreursMapErrors> { | ||
static fromType<Errors extends { | ||
static fromTypes<ErrorsInfos extends { | ||
kind: string; | ||
message: string; | ||
}>(errors: FromTypes<Errors>): ErreursMap<FromTypes<Errors>>; | ||
}>(): FromTypesFactory<ErrorsInfos>; | ||
readonly errors: Errors; | ||
@@ -57,2 +61,2 @@ /** | ||
export { Erreur, ErreurInfos, ErreursMap, ErreursMapCreate, ErreursMapErrors, Expand, FromTypes }; | ||
export { Erreur, ErreurInfos, ErreursMap, ErreursMapCreate, ErreursMapErrors, Expand, FromTypes, FromTypesFactory }; |
@@ -60,4 +60,4 @@ var __defProp = Object.defineProperty; | ||
} | ||
static fromType(errors) { | ||
return new ErreursMap(errors); | ||
static fromTypes() { | ||
return (errors) => new ErreursMap(errors); | ||
} | ||
@@ -64,0 +64,0 @@ is(val) { |
{ | ||
"name": "erreur", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Type safe custom errors", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
12661
237