menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

TypeScript

A place to talk about TypeScript.

Channels
Team

Hello ! Anyone knows what's happening here with the generic and ReturnType?

February 1, 2021 at 8:36am

Hello ! Anyone knows what's happening here with the generic and ReturnType?

February 1, 2021 at 8:36am (Edited 10 months ago)
Problem with ReturnType utility and generics it seems
Type 'Meths<S, P>' does not satisfy the constraint '(...args: any) => any'. Type 'Hello[S][keyof Hello[S]]' is not assignable to type '(...args: any) => any'. Type 'Hello[S][string] | Hello[S][number] | Hello[S][symbol]' is not assignable to type '(...args: any) => any'. Type 'Hello[S][string]' is not assignable to type '(...args: any) => any'.ts(2344)
No messages yet