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

ts-results

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-results - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

2

package.json
{
"name": "ts-results",
"version": "3.2.0",
"version": "3.2.1",
"description": "A typescript implementation of Rust's Result and Option objects.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -34,3 +34,6 @@ interface BaseResult<T, E> extends Iterable<T extends Iterable<infer U> ? U : never> {

*/
andThen<T2>(mapper: (val: T) => Ok<T2>): Result<T2, E>;
andThen<E2>(mapper: (val: T) => Err<E2>): Result<T, E | E2>;
andThen<T2, E2>(mapper: (val: T) => Result<T2, E2>): Result<T2, E | E2>;
andThen<T2, E2>(mapper: (val: T) => Result<T2, E2>): Result<T2, E | E2>;
/**

@@ -71,7 +74,7 @@ * Maps a `Result<T, E>` to `Result<U, E>` by applying a function to a contained `Ok` value,

map(_mapper: unknown): Err<E>;
andThen<T2, E2>(op: unknown): Err<E>;
andThen(op: unknown): Err<E>;
mapErr<E2>(mapper: (err: E) => E2): Err<E2>;
toString(): string;
}
export declare const Err: typeof ErrImpl & (<E>(err: E) => ErrImpl<E>);
export declare const Err: typeof ErrImpl & (<E>(err: E) => Err<E>);
export declare type Err<E> = ErrImpl<E>;

@@ -100,2 +103,4 @@ /**

map<T2>(mapper: (val: T) => T2): Ok<T2>;
andThen<T2>(mapper: (val: T) => Ok<T2>): Ok<T2>;
andThen<E2>(mapper: (val: T) => Err<E2>): Result<T, E2>;
andThen<T2, E2>(mapper: (val: T) => Result<T2, E2>): Result<T2, E2>;

@@ -115,3 +120,3 @@ mapErr(_mapper: unknown): Ok<T>;

}
export declare const Ok: typeof OkImpl & (<T>(val: T) => OkImpl<T>);
export declare const Ok: typeof OkImpl & (<T>(val: T) => Ok<T>);
export declare type Ok<T> = OkImpl<T>;

@@ -118,0 +123,0 @@ export declare type Result<T, E> = Ok<T> | Err<E>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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