Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-result

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-result - npm Package Compare versions

Comparing version 5.2.0 to 5.3.0

11

lib/index.d.ts

@@ -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) {

6

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc