Skip to content

fix: no BS_NESTED_SOME_NONE when literal none passed to AsyncResult - #114

Open
JUSTIVE wants to merge 1 commit into
mobily:masterfrom
JUSTIVE:fix/AsyncResult/toOption
Open

fix: no BS_NESTED_SOME_NONE when literal none passed to AsyncResult#114
JUSTIVE wants to merge 1 commit into
mobily:masterfrom
JUSTIVE:fix/AsyncResult/toOption

Conversation

@JUSTIVE

@JUSTIVE JUSTIVE commented Mar 16, 2024

Copy link
Copy Markdown

resolves #96

image

passes following code.

const toOptionTest = async () => {
  const option = await pipe(AR.resolve(undefined), AR.toOption);

  console.log('option is:', option);

  O.match(
    option,
    () => {
      console.log('option is `Some`');
    },
    () => {
      console.log('option is `None`');
    },
  );

  return option;
};

void toOptionTest();

@radiosilence

Copy link
Copy Markdown

Where has the dev gone? No new commits in 3 years :S搂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AR.toOption for undefined promise resolutions resulting in { BS_PRIVATE_NESTED_SOME_NONE: 0 }

2 participants