This website collects cookies to deliver better user experience

How to make Generic Functions that change return value type according to the parameter values type in TypeScript?