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

Incorrect usage of Exclude in type declarations #2257

Closed
ethereon opened this issue Nov 29, 2024 · 1 comment · Fixed by #2266
Closed

Incorrect usage of Exclude in type declarations #2257

ethereon opened this issue Nov 29, 2024 · 1 comment · Fixed by #2266
Labels
bug Something isn’t working

Comments

@ethereon
Copy link

I believe these two should be using Omit<DotOptions, "symbol"> rather than Exclude<DotOptions, "symbol">:

export function circle(data?: Data, options?: Exclude<DotOptions, "symbol">): Dot;

export function hexagon(data?: Data, options?: Exclude<DotOptions, "symbol">): Dot;

(Exclude filters out members from unions, whereas Omit filters out properties)

@ethereon ethereon added the bug Something isn’t working label Nov 29, 2024
@mbostock
Copy link
Member

Thanks for the report. Agreed.

Fil added a commit that referenced this issue Jan 3, 2025
closes #2257
@Fil Fil mentioned this issue Jan 3, 2025
@Fil Fil closed this as completed in #2266 Jan 3, 2025
@Fil Fil closed this as completed in 14d6e43 Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants