No, there are no guarantees. It's different for every static method.
For any given built-in static method, lookup its specification, and if it does not refer to this
, it's a function.
Object
: none of the static Object
methods rely on their receiver, they don't use the Object
constructor but just operate on their arguments or create a new plain object.
Function
, GeneratorFunction
, AsyncFunction
, Boolean
, Error
s, RegExp
, Map
, WeakMap
, Set
, WeakSet
, SharedArrayBuffer
, DataView
: none of these constructors contains any static methods
Symbol
: none of the static Symbol
methods rely on their receiver, they don't use the Symbol
constructor
Number
, Date
: none of their static methods rely on their receiver, they just operate on their arguments and return a primitive number.
String
: none of the static String
methods rely on their receiver, they don't use the String
constructor but just operate on their arguments and return a primitive string.
Array
:
isArray
just returns a boolean
from
, of
: these do rely on their receiver value, but when it's not a constructor function they fall back on the default Array
. This is probably for backwards compatibility to when Array
was not extensible.
- Typed arrays: they don't have static methods on their own, but inherit them from a common intrinsic object
from
, of
: these do rely on their receiver value to be a constructor that returns a typed array
ArrayBuffer
:
isView
just returns a boolean
Math
, Atomics
, JSON
, Reflect
: they're not constructors anyway, their "methods" are just namespaced functions that do not rely on their receiver
Promise
:
all
, race
, reject
, resolve
: these do rely on their receiver value to be a constructor that works like Promise
Proxy
is not really designed to be subclassable, it wouldn't even need to be a constructor.
revocable
: does not rely on its receiver
So in general most of the static "methods" are just namespaced functions, ignoring their receiver completely. There are however a few methods which return instances of the constructor they are invoked on, most notably promise and (typed) array methods, which do require the respective receiver. Object
and Array
are exceptions to this.