Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from WICG:main #7

Merged
merged 2 commits into from
Jun 14, 2024
Merged

[pull] main from WICG:main #7

merged 2 commits into from
Jun 14, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 14, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

apasel422 and others added 2 commits June 13, 2024 14:02
It was unsound because it could be called with a Maybe<T> but its type
parameter T instantiated with Maybe<T>, resulting in an apparent return
type of Maybe<Maybe<T>>, but the instanceof check would cause the
original Maybe<T> to be returned.

For example, the following code logs "number" despite y's type
indicating that its value should be another Maybe:

```ts
const x = Maybe.some(5)
const y: Maybe<Maybe<number>> = Maybe.flatten<Maybe<number>>(x)
console.log(typeof y.value)
```
@pull pull bot added the ⤵️ pull label Jun 14, 2024
@pull pull bot merged commit aa99a0c into gota0:main Jun 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants