Typescript Generic Parameter Constraint