The type function returns 'Object' for ES6 method shorthand when running in an environment where that ES6 isn't transpiled. It's technically correct, but 'Function' seems like it would be more appropriate. This also makes isType and isFunction return unexpected results.
The
type
function returns'Object'
for ES6 method shorthand when running in an environment where that ES6 isn't transpiled. It's technically correct, but'Function'
seems like it would be more appropriate. This also makesisType
andisFunction
return unexpected results.It may also be worth considering that it produces the same result for computed property shorthand: