Determine if a value is Callable/Constructible

Axel Rauschmayer axel at rauschma.de
Mon Mar 30 16:07:01 UTC 2015


> If you made them non-callable by not implementing [[Call]], then typeof would no longer return "function", which would be ... O_o.

In some way, that would even be correct – depending on what you expect a function to be: something callable or something constructible. Alas, there is currently no simple way to distinguish “callable” and “constructible”.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150330/cd1e581d/attachment.html>


More information about the es-discuss mailing list