8000 Comparing 0.12.0...0.13.0 · erikjuhani/fp-utils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: erikjuhani/fp-utils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.12.0
Choose a base ref
...
head repository: erikjuhani/fp-utils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.13.0
Choose a head ref
  • 9 commits
  • 25 files changed
  • 1 contributor

Commits on Apr 7, 2024

  1. Configuration menu
    Copy the full SHA
    bb21167 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. Configuration menu
    Copy the full SHA
    256e49e View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2024

  1. 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.
    erikjuhani committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    eef0502 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2024

  1. Configuration menu
    Copy the full SHA
    1ef1bb2 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. 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.
    erikjuhani committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    eb3424a View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. 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.
    erikjuhani committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    2f1e3c9 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Add Option.zip method and higher-order function variant

    Signature: `<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
    ```
    erikjuhani committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    5e0f210 View commit details
    Browse the repository at this point in the history
  2. Change all dev dependencies to come from jsr

    Remove `dev_deps.ts` as obsolete.
    erikjuhani committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    6f888db View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d6ec177 View commit details
    Browse the repository at this point in the history
Loading
0