-
Notifications
You must be signed in to change notification settings - Fork 1
Comparing changes
Open a pull request
base repository: erikjuhani/fp-utils
base: 0.12.0
head repository: erikjuhani/fp-utils
compare: 0.13.0
- 9 commits
- 25 files changed
- 1 contributor
Commits on Apr 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bb21167 - Browse repository at this point
Copy the full SHA bb21167View commit details
Commits on Apr 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 256e49e - Browse repository at this point
Copy the full SHA 256e49eView commit details
Commits on Apr 13, 2024
-
Improve type inference for result higher order functions
Add better type inference for Result methods by using a generic result type `TResult extends Result<unknown, unknown>` and infer keyword to get the inner value type of the result `TResult extends Result<infer U, infer _> ? U : never`. Fixes flatMap type inference when performing flatMap on Err type. Previously the Err type flatMap would be inferred from the given function return Result, which could be completely wrong as the result inner value types can be changed. Now properly takes the parent type into account if the Err inner type changes in the flatMap function. This will now be properly inferred into the returned result type `Result<U, TError | UError>`. If the Err type cannot be inferred from the parent type–unknown will be returned instead. This is better than having wrong error type returned. Make union result type tests more complicated to test more type inference cases. Also adds more type tests for Result type higher order functions.
Configuration menu - View commit details
-
Copy full SHA for eef0502 - Browse repository at this point
Copy the full SHA eef0502View commit details
Commits on Apr 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1ef1bb2 - Browse repository at this point
Copy the full SHA 1ef1bb2View commit details
Commits on Apr 16, 2024
-
Fix type inference for unwrap, unwrapErr, isOk and isErr HOFs
These functions were still missing the previous fixes that were introduced in eef0502. Add type inference tests for these higher-order functions.
Configuration menu - View commit details
-
Copy full SHA for eb3424a - Browse repository at this point
Copy the full SHA eb3424aView commit details
Commits on Apr 17, 2024
-
Improve type inference for Option higher order functions
Add better type inference for Option methods by using a generic option type `TOption extends Option<any>` and infer keyword to get the inner value type of the Option `TOption extends Option<infer U> ? U : never`. If the Option type cannot be inferred from the parent type unknown will be returned instead. This is better than having wrong Option type returned. Make union Option type tests more complicated to test more type inference cases. Also adds more type tests for Option type higher order functions. The method `isSome` returns false when called from a None value and the method `isNone` return false when called from a Some value.
Configuration menu - View commit details
-
Copy full SHA for 2f1e3c9 - Browse repository at this point
Copy the full SHA 2f1e3c9View commit details
Commits on Apr 19, 2024
-
Add
Option.zip
method and higher-order function variantSignature: `<U>(option: Option<U>): Option<[T, U]>` Option.zip combines two option values into a tuple and returns the tuple wrapped in Option. ```ts Some(42).zip(Some(84)); // Evaluates to Some<[42, 84]> Some(42).zip(None); // Evaluates to None None.zip(Some(84)); // Evaluates to None ```
Configuration menu - View commit details
-
Copy full SHA for 5e0f210 - Browse repository at this point
Copy the full SHA 5e0f210View commit details -
Change all dev dependencies to come from
jsr
Remove `dev_deps.ts` as obsolete.
Configuration menu - View commit details
-
Copy full SHA for 6f888db - Browse repository at this point
Copy the full SHA 6f888dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for d6ec177 - Browse repository at this point
Copy the full SHA d6ec177View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 0.12.0...0.13.0