Closed
Description
TypeScript Version:
Typescript playground
Code
const compose = <In, Intermediate_Big, Intermediate_Small extends Intermediate_Big, Out>(f: (x: In)=> Intermediate_Small, g: (x: Intermediate_Big) => Out): (a1: In) => Out => (_ => g(f(_)))
const first = <T>(a: T[]): T => a[0]
const getText = (_: HTMLElement) => _.innerText
const c = compose(first, getText)
Expected behavior:
c is of type (x: HTMLElement[]) => string
Actual behavior:
c is of type (x: {}) => string