@dbpath/utils
Advanced tools
Comparing version 0.2.8 to 0.2.9
export type ErrorFn<From, To> = (value: From) => ErrorsAnd<To>; | ||
export type ErrorsAnd<T> = T | string[]; | ||
export declare function mapArrayOfErrorsAnd<T, T1>(ts: ErrorsAnd<T>[], fn: (ts: T[]) => T1): ErrorsAnd<T1>; | ||
export declare function reportErrors(e: string[]): string[]; | ||
export declare function reportErrors<T>(e: ErrorsAnd<T>): ErrorsAnd<T>; | ||
export declare function hasErrors<T>(t: ErrorsAnd<T>): t is string[]; | ||
@@ -6,0 +6,0 @@ export declare function errors<T>(t: ErrorsAnd<T>): string[]; |
@@ -14,3 +14,4 @@ "use strict"; | ||
function reportErrors(e) { | ||
e.forEach(e => console.error(e)); | ||
if (hasErrors(e)) | ||
e.forEach(e => console.error(e)); | ||
return e; | ||
@@ -17,0 +18,0 @@ } |
{ | ||
"name": "@dbpath/utils", | ||
"description": "", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"main": "dist/index", | ||
@@ -6,0 +6,0 @@ "types": "dist/index", |
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
49437
998