@synple.dev/core 0.2.0 → 0.3.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synple.dev/core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "private": false,
package/src/index.ts CHANGED
@@ -1,3 +1 @@
1
- export function hello(): string {
2
- return "Hello world!"
3
- }
1
+ export * from "./monads"
@@ -48,7 +48,7 @@ export interface Side<T, Err> {
48
48
  class Success<T, Err> implements Side<T, Err> {
49
49
  constructor(protected readonly item: T) { }
50
50
 
51
- public or(_: T) {
51
+ public or(_: T): T {
52
52
  return this.item
53
53
  }
54
54
 
@@ -73,7 +73,7 @@ class Success<T, Err> implements Side<T, Err> {
73
73
  class Failure<T, Err> implements Side<T, Err> {
74
74
  constructor(protected readonly error: Err) { }
75
75
 
76
- public or(defaultValue: T) {
76
+ public or(defaultValue: T): T {
77
77
  return defaultValue
78
78
  }
79
79
 
@@ -0,0 +1 @@
1
+ export * from "./either"
@@ -1,8 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { hello } from "../src";
3
-
4
- describe('hello', () => {
5
- it("Returns the correct message", () => {
6
- expect(hello()).toEqual("Hello world!")
7
- })
8
- })