Closed
Description
openedon Oct 12, 2017
//Type A ----> Type B
type A = (state: string, action: any) => string
type B = string
//SyntaxError
type GetB<K extends (state: S, action: any) => S, S ???? > = S
type xxx = GetB<A>
//right
const getB = <S>(f: (state: S, action: any) => S) => ({} as S)
let b = getB({} as A) //string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment