-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Partial<T> assignability error where T extends a compatible type #19388
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Comments
This is a correct error. |
The same error occurs if I change the interface Vertex {
name: "A";
} In which case would the function fail with this definition? |
Found it: |
This was referenced Oct 25, 2017
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
TypeScript Version: 2.5.3 / playground
Code
Expected behavior:
The code should compile, since every T will have
name: string
in its definition.Actual behavior:
error TS2322: Type '{ name: "A"; }' is not assignable to type 'Partial<T>'.
The text was updated successfully, but these errors were encountered: