happy-rusty 1.0.9 → 1.1.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.
@@ -0,0 +1,24 @@
1
+ [**happy-rusty**](../index.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [happy-rusty](../index.md) / AsyncOption
6
+
7
+ # Type alias: AsyncOption\<T\>
8
+
9
+ ```ts
10
+ type AsyncOption<T>: Promise<Option<T>>;
11
+ ```
12
+
13
+ Represents an asynchronous operation that yields an `Option<T>`.
14
+ This is a promise that resolves to either `Some(T)` if the value is present, or `None` if the value is absent.
15
+
16
+ ## Type parameters
17
+
18
+ | Type parameter | Description |
19
+ | :------ | :------ |
20
+ | `T` | The type of the value that may be contained within the `Option`. |
21
+
22
+ ## Source
23
+
24
+ [enum/prelude.ts:584](https://github.com/JiangJie/happy-rusty/blob/15ed105e08c6cc3943e22243c9386336a521d83e/src/enum/prelude.ts#L584)
@@ -0,0 +1,25 @@
1
+ [**happy-rusty**](../index.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [happy-rusty](../index.md) / AsyncResult
6
+
7
+ # Type alias: AsyncResult\<T, E\>
8
+
9
+ ```ts
10
+ type AsyncResult<T, E>: Promise<Result<T, E>>;
11
+ ```
12
+
13
+ Represents an asynchronous operation that yields a `Result<T, E>`.
14
+ This is a promise that resolves to `Ok(T)` if the operation was successful, or `Err(E)` if there was an error.
15
+
16
+ ## Type parameters
17
+
18
+ | Type parameter | Description |
19
+ | :------ | :------ |
20
+ | `T` | The type of the value that is produced by a successful operation. |
21
+ | `E` | The type of the error that may be produced by a failed operation. |
22
+
23
+ ## Source
24
+
25
+ [enum/prelude.ts:593](https://github.com/JiangJie/happy-rusty/blob/15ed105e08c6cc3943e22243c9386336a521d83e/src/enum/prelude.ts#L593)
@@ -0,0 +1,24 @@
1
+ [**happy-rusty**](../index.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [happy-rusty](../index.md) / IOResult
6
+
7
+ # Type alias: IOResult\<T\>
8
+
9
+ ```ts
10
+ type IOResult<T>: Result<T, Error>;
11
+ ```
12
+
13
+ Represents a synchronous operation that yields a `Result<T, Error>`.
14
+ This is a result that is either `Ok(T)` if the operation was successful, or `Err(Error)` if there was an error.
15
+
16
+ ## Type parameters
17
+
18
+ | Type parameter | Description |
19
+ | :------ | :------ |
20
+ | `T` | The type of the value that is produced by a successful operation. |
21
+
22
+ ## Source
23
+
24
+ [enum/prelude.ts:601](https://github.com/JiangJie/happy-rusty/blob/15ed105e08c6cc3943e22243c9386336a521d83e/src/enum/prelude.ts#L601)
@@ -0,0 +1,18 @@
1
+ [**happy-rusty**](../index.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [happy-rusty](../index.md) / None
6
+
7
+ # Variable: None
8
+
9
+ ```ts
10
+ None: None;
11
+ ```
12
+
13
+ A constant representing the `None` case of an `Option`, indicating the absence of a value.
14
+ This constant is frozen to ensure it is immutable and cannot be altered, preserving the integrity of `None` throughout the application.
15
+
16
+ ## Source
17
+
18
+ [enum/prelude.ts:288](https://github.com/JiangJie/happy-rusty/blob/15ed105e08c6cc3943e22243c9386336a521d83e/src/enum/prelude.ts#L288)
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Porting some excellent design implementations from Rust to JavaScript.",
4
4
  "author": "jiang115jie@gmail.com",
5
5
  "license": "GPL-3.0",
6
- "version": "1.0.9",
6
+ "version": "1.1.0",
7
7
  "type": "module",
8
8
  "source": "src/mod.ts",
9
9
  "main": "dist/main.cjs",
@@ -14,6 +14,7 @@
14
14
  "README.md",
15
15
  "README.cn.md",
16
16
  "package.json",
17
+ "docs",
17
18
  "src",
18
19
  "dist"
19
20
  ],
@@ -21,9 +22,14 @@
21
22
  "scripts": {
22
23
  "check": "pnpm exec tsc --noEmit",
23
24
  "lint": "pnpm exec eslint src/",
24
- "prebuild": "pnpm exec rimraf dist && pnpm run check && pnpm run lint",
25
+ "prebuild": "pnpm dlx rimraf dist && pnpm run check && pnpm run lint",
25
26
  "build": "pnpm exec rollup --config rollup.config.mjs",
26
- "test": "bun test --coverage",
27
+ "pretest": "pnpm dlx rimraf coverage",
28
+ "test": "deno test --coverage && deno coverage coverage && deno coverage coverage --lcov --output=coverage/cov_profile.lcov",
29
+ "pretest:html": "pnpm run pretest",
30
+ "test:html": "deno test --coverage && deno coverage coverage && deno coverage coverage --html",
31
+ "predocs": "pnpm dlx rimraf docs",
32
+ "docs": "pnpm exec typedoc",
27
33
  "prepublishOnly": "pnpm run build"
28
34
  },
29
35
  "repository": {
@@ -41,15 +47,15 @@
41
47
  "Err"
42
48
  ],
43
49
  "devDependencies": {
44
- "@jest/globals": "^29.7.0",
45
- "@typescript-eslint/eslint-plugin": "^7.8.0",
46
- "@typescript-eslint/parser": "^7.8.0",
50
+ "@typescript-eslint/eslint-plugin": "^7.12.0",
51
+ "@typescript-eslint/parser": "^7.12.0",
47
52
  "eslint": "^8.57.0",
48
- "rimraf": "^5.0.5",
49
- "rollup": "^4.17.2",
50
- "rollup-plugin-dts": "^6.1.0",
53
+ "rollup": "^4.18.0",
54
+ "rollup-plugin-dts": "^6.1.1",
51
55
  "rollup-plugin-esbuild": "^6.1.1",
56
+ "typedoc": "^0.25.13",
57
+ "typedoc-plugin-markdown": "^4.0.3",
52
58
  "typescript": "^5.4.5"
53
59
  },
54
- "packageManager": "pnpm@9.1.1+sha512.14e915759c11f77eac07faba4d019c193ec8637229e62ec99eefb7cf3c3b75c64447882b7c485142451ee3a6b408059cdfb7b7fa0341b975f12d0f7629c71195"
60
+ "packageManager": "pnpm@9.2.0"
55
61
  }