deesse 0.0.7 → 0.0.8
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/maybe.d.ts +14 -0
- package/dist/types/maybe.js +11 -0
- package/dist/types/result.d.ts +15 -0
- package/dist/types/result.js +12 -0
- package/package.json +4 -11
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './types';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maybe type implementation
|
|
3
|
+
* Represents a value that might be present (Some) or absent (None)
|
|
4
|
+
*/
|
|
5
|
+
export type Maybe<T> = Some<T> | None;
|
|
6
|
+
export type Some<T> = {
|
|
7
|
+
readonly _tag: 'Some';
|
|
8
|
+
readonly value: T;
|
|
9
|
+
};
|
|
10
|
+
export type None = {
|
|
11
|
+
readonly _tag: 'None';
|
|
12
|
+
};
|
|
13
|
+
export declare const some: <T>(value: T) => Some<T>;
|
|
14
|
+
export declare const none: () => None;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result type implementation
|
|
3
|
+
* Represents a value that can be successful (Ok) or contain an error (Err)
|
|
4
|
+
*/
|
|
5
|
+
export type Result<T, E = Error> = Ok<T, E> | Err<T, E>;
|
|
6
|
+
export type Ok<T, E> = {
|
|
7
|
+
readonly _tag: 'Ok';
|
|
8
|
+
readonly value: T;
|
|
9
|
+
};
|
|
10
|
+
export type Err<T, E> = {
|
|
11
|
+
readonly _tag: 'Err';
|
|
12
|
+
readonly error: E;
|
|
13
|
+
};
|
|
14
|
+
export declare const ok: <T, E = Error>(value: T) => Ok<T, E>;
|
|
15
|
+
export declare const err: <T, E = Error>(error: E) => Err<T, E>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deesse",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -10,21 +10,14 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc"
|
|
12
12
|
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"resend": "^6.0.3"
|
|
15
|
-
},
|
|
16
13
|
"exports": {
|
|
17
14
|
".": {
|
|
18
15
|
"import": "./dist/index.js",
|
|
19
16
|
"types": "./dist/index.d.ts"
|
|
20
17
|
},
|
|
21
|
-
"./
|
|
22
|
-
"import": "./dist/
|
|
23
|
-
"types": "./dist/
|
|
24
|
-
},
|
|
25
|
-
"./emails/resend": {
|
|
26
|
-
"import": "./dist/emails/resend/index.js",
|
|
27
|
-
"types": "./dist/emails/resend/index.d.ts"
|
|
18
|
+
"./types": {
|
|
19
|
+
"import": "./dist/types/index.js",
|
|
20
|
+
"types": "./dist/types/index.d.ts"
|
|
28
21
|
}
|
|
29
22
|
},
|
|
30
23
|
"devDependencies": {
|