Skip to content

Conversation

@andogq
Copy link
Contributor

@andogq andogq commented Feb 11, 2025

Good:

$.from<number, never>([])
    .otherwise($.ofError("some error"));
// Would result in `$<number, string>`

Bad:

$.from<number, boolean>([])
    .otherwise($.ofError("some error"));
// Would produce an error

Good:

```ts
$.from<number, never>([])
    .otherwise($.ofError("some error"));
// Would result in `$<number, string>`
```

Bad:

```ts
$.from<number, boolean>([])
    .otherwise($.ofError("some error"));
// Would produce an error
```
@andogq andogq requested a review from giraugh February 11, 2025 05:12
@andogq andogq self-assigned this Feb 11, 2025
@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2025

🦋 Changeset detected

Latest commit: 9ef31c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
windpipe Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@giraugh giraugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe 🙏

@andogq
Copy link
Contributor Author

andogq commented Feb 11, 2025

Thoughts and prayers with this PR

@andogq andogq merged commit 9aff0d5 into main Feb 11, 2025
4 checks passed
@andogq andogq deleted the feat/otherwise-errors branch February 11, 2025 07:33
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.

3 participants