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
Record with unknown extending type works but interface doesnt
Playground link with relevant code
interface Api { request: Record<string, unknown> | void; response: Record<string, unknown> | void; } interface Generic<A extends Api> { test: A; } interface ITestRequest { a?: string; b?: number; } type TTestRequest = { a?: string; b?: number; }; interface TestInterface { request: ITestRequest; response: void; } interface TestType { request: TTestRequest; response: void; } // This doesnt work type Genered1 = Generic<TestInterface>; // But this does type Genered2 = Generic<TestType>;
ITestRequest fails to extend Record<string, unknown>
ITestRequest works as TTestRequest and can be passed under signature Record<string, unknown>
The text was updated successfully, but these errors were encountered:
Duplicate of #42825. Used search terms: interface extends record unknown
interface extends record unknown
Sorry, something went wrong.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
Bug Report
π Search Terms
Record with unknown extending type works but interface doesnt
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
ITestRequest fails to extend Record<string, unknown>
π Expected behavior
ITestRequest works as TTestRequest and can be passed under signature Record<string, unknown>
The text was updated successfully, but these errors were encountered: