node-result
Advanced tools
Comparing version 9.2.0 to 10.0.0
@@ -9,4 +9,4 @@ export { ResultError } from 'node-result-error'; | ||
declare type Atom = typeof AtomOK.OK | typeof AtomFAIL.FAIL; | ||
declare type ErrorProcessing<D, E> = (error: E) => D; | ||
declare type ErrorProcessingAsync<D, E> = (error: E) => Promise<D>; | ||
export declare type ErrorProcessing<D, E> = (error: E) => D; | ||
export declare type ErrorProcessingAsync<D, E> = (error: E) => Promise<D>; | ||
export declare type ReturningResult<D, E> = ResultOK<D> | ResultFAIL<E>; | ||
@@ -28,3 +28,2 @@ export declare type ReturningResultAsync<D, E> = Promise<ResultOK<D> | ResultFAIL<E>>; | ||
unwrapAsync(): Promise<D>; | ||
isOkAndUnwrap(): [AtomOK, D]; | ||
} | ||
@@ -35,3 +34,2 @@ export declare class ResultFAIL<E> extends Result<undefined, E> { | ||
unwrapAsync(): Promise<E>; | ||
isOkAndUnwrap(): [AtomFAIL, E]; | ||
} | ||
@@ -38,0 +36,0 @@ export declare const ResultOk: <D>(data: D) => ResultOK<D>; |
@@ -50,5 +50,2 @@ "use strict"; | ||
} | ||
isOkAndUnwrap() { | ||
return [AtomOK.OK, this.data]; | ||
} | ||
} | ||
@@ -66,5 +63,2 @@ exports.ResultOK = ResultOK; | ||
} | ||
isOkAndUnwrap() { | ||
return [AtomFAIL.FAIL, this.error]; | ||
} | ||
} | ||
@@ -71,0 +65,0 @@ exports.ResultFAIL = ResultFAIL; |
{ | ||
"name": "node-result", | ||
"version": "9.2.0", | ||
"version": "10.0.0", | ||
"description": "result", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
"ts-jest": "^26.4.4", | ||
"typescript": "^4.1.3" | ||
"typescript": "^4.2.2" | ||
}, | ||
@@ -46,0 +46,0 @@ "jest": { |
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
8065
139