node-result
Advanced tools
Comparing version 5.2.0 to 5.3.0
@@ -0,6 +1,4 @@ | ||
export { ResultError } from 'node-result-error'; | ||
declare type ErrorProcessing<Error, Data> = (error: Error) => Data; | ||
declare type ErrorProcessingAsync<Error, Data> = (error: Error) => Promise<Data>; | ||
/** | ||
* Result | ||
*/ | ||
export declare class Result<Error, Data> { | ||
@@ -17,11 +15,5 @@ private readonly error; | ||
} | ||
/** | ||
* ResultOK | ||
*/ | ||
export declare class ResultOK<Data> extends Result<null, Data> { | ||
constructor(data: Data); | ||
} | ||
/** | ||
* ResultFAIL | ||
*/ | ||
export declare class ResultFAIL<Error> extends Result<Error, undefined> { | ||
@@ -32,2 +24,1 @@ constructor(error: Error); | ||
export declare const ResultFail: <Error_1>(error: Error_1) => ResultFAIL<Error_1>; | ||
export {}; |
@@ -13,5 +13,4 @@ "use strict"; | ||
exports.ResultFail = exports.ResultOk = exports.ResultFAIL = exports.ResultOK = exports.Result = void 0; | ||
/** | ||
* Result | ||
*/ | ||
var node_result_error_1 = require("node-result-error"); | ||
Object.defineProperty(exports, "ResultError", { enumerable: true, get: function () { return node_result_error_1.ResultError; } }); | ||
class Result { | ||
@@ -56,5 +55,2 @@ constructor(error = null, data) { | ||
exports.Result = Result; | ||
/** | ||
* ResultOK | ||
*/ | ||
class ResultOK extends Result { | ||
@@ -66,5 +62,2 @@ constructor(data) { | ||
exports.ResultOK = ResultOK; | ||
/** | ||
* ResultFAIL | ||
*/ | ||
class ResultFAIL extends Result { | ||
@@ -71,0 +64,0 @@ constructor(error) { |
{ | ||
"name": "node-result", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"description": "result", | ||
@@ -28,3 +28,5 @@ "keywords": [ | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"node-result-error": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -31,0 +33,0 @@ "tslint": "^6.1.2", |
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
5312
1
89
+ Addednode-result-error@^1.0.0
+ Addednode-result-error@1.3.0(transitive)