TypeScript条件类型约束在v3.5.1之后不再工作

TypeScript条件类型约束在v3.5.1之后不再工作,typescript,Typescript,这是意料之中的事 type StringConstrain<T> = { [K in keyof T]: T[K] extends string ? T[K] : never } type WantString<T extends string> = number type Test<T extends StringConstrain<T>> = { [K in keyof T]: WantString<T[K]> } Type 'T

这是意料之中的事
type StringConstrain<T> = { [K in keyof T]: T[K] extends string ? T[K] : never }
type WantString<T extends string> = number
type Test<T extends StringConstrain<T>> = { [K in keyof T]: WantString<T[K]> }
Type 'T[K]' does not satisfy the constraint 'string'.
  Type 'T[keyof T]' is not assignable to type 'string'.
    Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'string'.
      Type 'T[string]' is not assignable to type 'string'.(2344)