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

Question: Type intersection composition #637

Closed
pvarga-dni opened this issue Feb 10, 2021 · 2 comments
Closed

Question: Type intersection composition #637

pvarga-dni opened this issue Feb 10, 2021 · 2 comments
Labels

Comments

@pvarga-dni
Copy link

pvarga-dni commented Feb 10, 2021

Is there an "intersection" composition available, such that

const a = object({a: number})
const b = object({b: boolean})
const c = ???(a, b)

would result in c being a Decoder<{a: number, b: boolean}>? Can this be achieved with some of the existing combinators?

io-ts equivalent: https://gcanti.github.io/io-ts/modules/index.ts.html#intersection

@github-actions
Copy link

We have detected this issue has not had any activity during the last 60 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically.
If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better collaboration environment for all. Thank you for your continued involvement and contributions!

@pvarga-dni
Copy link
Author

#reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant