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

intersections don't play well with exact #397

Closed
gcanti opened this issue Dec 15, 2019 · 0 comments
Closed

intersections don't play well with exact #397

gcanti opened this issue Dec 15, 2019 · 0 comments
Assignees
Labels

Comments

@gcanti
Copy link
Owner

gcanti commented Dec 15, 2019

🐛 Bug report

Reproducible example

const C = t.intersection([t.exact(t.type({})), t.exact(t.partial({ a: t.number }))])
assert.deepStrictEqual(C.decode({ a: 1 }), right({ a: 1 }))
assert.deepStrictEqual(C.decode({ a: 1, b: 1 }), right({ a: 1 }))

Additional context

RE: #390

Your environment

Software Version(s)
io-ts 2.0.1
fp-ts 2.0.0
TypeScript 3.7.2
@gcanti gcanti added the bug label Dec 15, 2019
@gcanti gcanti self-assigned this Dec 15, 2019
gcanti added a commit that referenced this issue Dec 15, 2019
gcanti added a commit that referenced this issue Dec 16, 2019
@gcanti gcanti closed this as completed in c90949b Dec 16, 2019
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