-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
https://tc39.es/ecma262/#sec-ecmascript-standard-built-in-objects defines that:
Each built-in function defined in this specification is created by calling the CreateBuiltinFunction abstract operation (10.3.4). The values of the length and name parameters are the initial values of the "length" and "name" properties as discussed below. The values of the prefix parameter are similarly discussed below.
Every built-in function object, including constructors, has a "length" property whose value is a non-negative integral Number. Unless otherwise specified, this value is the number of required parameters shown in the subclause heading for the function description. Optional parameters and rest parameters are not included in the parameter count.
For getters and setters, the subclause heading does not show arguments:
We need to expand the prose in https://tc39.es/ecma262/#sec-ecmascript-standard-built-in-objects to say that getter built-in functions have length 0 and setter built-in functions have length 1, or we need to explicitly define it for the various getters and setters.