3 ms·
TypeScript dependent types and function bivariance
- lights0123 6y ago> TypeScript now supports What does "now" mean here? The sample code works fine on 3.3 (the earliest version I could select on the playground, I'm sure it works on earlier versions too), released in January 2019.
- ameliaquining 6y agoConditional types were introduced in TypeScript 2.8, released March 2018. The sample code from the documentation dates back to 2014: https://web.archive.org/web/20140407071740/http://www.typescriptlang.org/Handbook#sn-int:~:text=Function%20Argument%20Bivariance https://web.archive.org/web/20140407071740/http://www.typesc...