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

expectType fails for two identical types that are differently implemented #218

Open
maximzavadskiy opened this issue Jul 11, 2024 · 1 comment

Comments

@maximzavadskiy
Copy link

maximzavadskiy commented Jul 11, 2024

type typeA = {a: number} & {b: number}
type typeB = {a: number; b: number}
declare const b:typeB
expectType<typeA>(b) // ERR!  but expected to pass

With this behaviour more complex types/types that are computed cannot be checked via tsd

@maximzavadskiy
Copy link
Author

import {Equals} from "tsafe" works as expected

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

No branches or pull requests

1 participant