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
interface type Record condition
Playground link with relevant code
interface A { s: string; } type B = { s: string; }; type R1 = A extends Record<string, any> ? true : false; type R2 = B extends Record<string, any> ? true : false; type R3 = A extends Record<string, unknown> ? true : false; type R4 = B extends Record<string, unknown> ? true : false;
R1, R2, R4 is true, and R3 is false
R1, R2, R3, R4 is true
The text was updated successfully, but these errors were encountered:
This is working as intended. interface and type are not fully interchangeable.
interface
type
Duplicate of #42825. See also #15300 (comment).
Sorry, something went wrong.
Thank you for your help! It's my wrong understanding. I will close this bug issue.
Solved
No branches or pull requests
Bug Report
π Search Terms
interface type Record condition
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
R1, R2, R4 is true, and R3 is false
π Expected behavior
R1, R2, R3, R4 is true
The text was updated successfully, but these errors were encountered: