slang-ts 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -180,13 +180,13 @@ export declare function option<T>(value: T | NonTruthy): Option<T> & OptionMetho
180
180
  * Returns the value returned by the selected handler. If all handlers return
181
181
  * `Result` or `Option`, TypeScript will infer that automatically.
182
182
  */
183
- export declare function match<T, E, R>(value: Result<T, E>, patterns: {
184
- Ok: (v: Ok<T>) => R;
185
- Err: (e: Err<E>) => R;
183
+ export declare function match<T, E, R>(value: Result<T, E> | (Result<any, any> & ResultMethods<any>), patterns: {
184
+ Ok: ((v: Ok<T>) => R) | (() => R);
185
+ Err: ((e: Err<E>) => R) | (() => R);
186
186
  }): R;
187
- export declare function match<T, R>(value: Option<T>, patterns: {
188
- Some: (v: Some<T>) => R;
189
- None: (v: None) => R;
187
+ export declare function match<T, R>(value: Some<T> | None, patterns: {
188
+ Some: ((v: Some<T>) => R) | (() => R);
189
+ None: ((v: None) => R) | (() => R);
190
190
  }): R;
191
191
  /**
192
192
  * Allowed keys in matchAll patterns.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slang-ts",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Functional programming library for TypeScript",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",