Typescript function type narrowing July 8, 2019 16 32 64 128 Javascript function type Typescript generic type