You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type 'Target[K]' does not satisfy the constraint '(...args: any) => any'.
Type 'Target[keyof Target]' is not assignable to type '(...args: any) => any'.
Type 'Target[string] | Target[number] | Target[symbol]' is not assignable to type '(...args: any) => any'.
Type 'Target[string]' is not assignable to type '(...args: any) => any'
π Expected behavior
This code previously compiled without errors in the TS 4.3-beta
Activity
Update to daily TS and workaround TS 4.3 issue
Build with latest TS nightly (#120690)
DanielRosenwasser commentedon Apr 7, 2021
It's likely that #43439 changed something up if it's a difference since the beta. Anders Hejlsberg (@ahejlsberg) and Wesley Wigham (@weswigham) might want to take a look at this.
[-]Type constrain lost in conditional type[/-][+]Type constraint lost in conditional type[/+]weswigham commentedon Apr 7, 2021
That PR had a carve out for TypeParameters for compat - it can probably be relatively safely expanded to all TypeVariables to cover this case.