We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
U.Merge adds unexpected index signatures when applied to intersection types of the same content.
U.Merge
import { Union } from "ts-toolbelt"; type discriminatedUnion = { flag: true } | { flag: false }; type simpleMerge = Union.Merge<discriminatedUnion>; /* type simpleMerge = { flag: boolean; } */ type complexDiscriminatedUnion = ({ flag: true } | { flag: false }) & ({ flag: true } | { flag: false }); type complexMerge = Union.Merge<complexDiscriminatedUnion>; /* type complexMerge = { [x: string]: undefined; [x: number]: undefined; [x: symbol]: undefined; flag: boolean; } */
Playground link
No index signatures are observed in complexMerge.
complexMerge
ts-toolbelt v.9.6.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🐞 Bug Report
Describe the bug
U.Merge
adds unexpected index signatures when applied to intersection types of the same content.Reproduce the bug
Playground link
Expected behavior
No index signatures are observed in
complexMerge
.Possible Solution
Screenshots
Additional context
ts-toolbelt v.9.6.0
The text was updated successfully, but these errors were encountered: