functype 0.44.0 → 0.46.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/README.md +1 -2
- package/dist/Companion-VlxcFhzb.js +1 -0
- package/dist/{index-DKAUrDCz.d.ts → Functype-Dc440LS5.d.ts} +211 -1378
- package/dist/{Tuple-C4maYbiO.d.ts → Typeable-E4-aX9Gc.d.ts} +1 -74
- package/dist/Valuable-B8h0iKI_.js +13 -0
- package/dist/branded/index.d.ts +53 -1
- package/dist/branded/index.js +1 -1
- package/dist/cli/index.js +33 -28
- package/dist/do/index.d.ts +184 -2
- package/dist/do/index.js +1 -1
- package/dist/either/index.d.ts +187 -1
- package/dist/either/index.js +2 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.js +1 -1
- package/dist/list/index.d.ts +84 -1
- package/dist/list/index.js +2 -1
- package/dist/map/index.d.ts +71 -1
- package/dist/map/index.js +2 -1
- package/dist/option/index.d.ts +242 -1
- package/dist/option/index.js +2 -1
- package/dist/set/index.d.ts +53 -1
- package/dist/set/index.js +2 -1
- package/dist/try/index.d.ts +96 -1
- package/dist/try/index.js +2 -1
- package/dist/tuple/index.d.ts +75 -1
- package/dist/tuple/index.js +1 -1
- package/package.json +7 -12
- package/dist/Brand-BPeggBaO.d.ts +0 -54
- package/dist/Brand-Cfr5zy8F.js +0 -1
- package/dist/Tuple-CUljR3nx.js +0 -1
- package/dist/fpromise/index.d.ts +0 -2
- package/dist/fpromise/index.js +0 -1
- package/dist/src-BuPnddUO.js +0 -19
package/README.md
CHANGED
|
@@ -40,7 +40,6 @@ npx functype --json # JSON output for programmatic use
|
|
|
40
40
|
- **Tuple**: Type-safe fixed-length arrays
|
|
41
41
|
- **Typeable**: Runtime type identification with compile-time safety
|
|
42
42
|
- **Branded Types**: Nominal typing in TypeScript's structural type system
|
|
43
|
-
- **FPromise**: Enhanced Promise functionality with built-in error handling
|
|
44
43
|
- **Error Formatting**: Utilities for improved error visualization and logging
|
|
45
44
|
- **Unified Type Classes**: Consistent interfaces across all data structures
|
|
46
45
|
|
|
@@ -313,7 +312,7 @@ const chainedResult = await Task().Async(async () => {
|
|
|
313
312
|
const fetchUserAPI = (userId: string): Promise<User> => fetch(`/api/users/${userId}`).then((r) => r.json())
|
|
314
313
|
|
|
315
314
|
const fetchUser = Task.fromPromise(fetchUserAPI)
|
|
316
|
-
// Returns: (userId: string) =>
|
|
315
|
+
// Returns: (userId: string) => Promise<TaskOutcome<User>>
|
|
317
316
|
|
|
318
317
|
const userResult = await fetchUser("user123")
|
|
319
318
|
if (userResult.isSuccess()) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){return Object.assign(e,t)}function t(t,n){return e(t,n)}export{e as n,t};
|