Issue
type ccc = (() => 22) extends Record<string|symbol,any> ? true : false // true
I don't understand why it was designed this way
Solution
Because a function is an object in JavaScript.
In JavaScript, functions are first-class objects, because they can have properties and methods just like any other object. What distinguishes them from other objects is that functions can be called. In brief, they are
Functionobjects.
Answered By - Connor Low
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.