Forbes Lindesay
1 min readAug 12, 2017

--

This is because the <T: ?string> already just says T is a sub-class of ?string. This is fine, because string is already a subclass of ?string (i.e. every string is a ?string. The problem that requires us to use this hack at all is that ?string is not a string.

--

--

Forbes Lindesay
Forbes Lindesay

Written by Forbes Lindesay

JavaScript enthusiast and maintainer of many open source projects.

No responses yet