ObjectConstructor (interface)
input: any,
hint: "string" | "number" | "default",
): string | number | bigint | boolean | undefined | symbol | null;
}
ObjectConstructor.toPrimitive (method)
Convert the specified value to a primitive value.
The provided hint indicates a preferred return type, which may or may not be respected by the engine.
See the abstract operation "ToPrimitive" in the ECMAScript standard for more info.
toPrimitive(input: any, hint: "string" | "number" | "default"): string | number | bigint | boolean | undefined | symbol | null;
ObjectConstructor.isPrimitive (method)
Returns a boolean indicating whether the specified value is a primitive value.
StringConstructor (interface)
interface StringConstructor {
strings: readonly string[] | ArrayLike<string>,
...substitutions: any[]
): string;
}
StringConstructor.cooked (method)
A no-op template literal tag.
https://github.com/tc39/proposal-string-cooked
BigIntConstructor (interface)
}
BigIntConstructor.tdiv (method)
Return trunc(a/b).
b = 0 raises a RangeError exception.
BigIntConstructor.fdiv (method)
Return \lfloor a/b \rfloor.
b = 0 raises a RangeError exception.
BigIntConstructor.cdiv (method)
Return \lceil a/b \rceil.
b = 0 raises a RangeError exception.
BigIntConstructor.ediv (method)
Return sgn(b) \lfloor a/{|b|} \rfloor (Euclidian division).
b = 0 raises a RangeError exception.
BigIntConstructor.tdivrem (method)
Perform trunc(a/b) and return an array of two elements. The first element is the quotient, the second is the remainder.
b = 0 raises a RangeError exception.
BigIntConstructor.fdivrem (method)
Perform \lfloor a/b \rfloor and return an array of two elements. The first element is the quotient, the second is the remainder.
b = 0 raises a RangeError exception.
BigIntConstructor.cdivrem (method)
Perform \lceil a/b \rceil and return an array of two elements. The first element is the quotient, the second is the remainder.
b = 0 raises a RangeError exception.
BigIntConstructor.edivrem (method)
Perform sgn(b) \lfloor a/{|b|} \rfloor (Euclidian division) and return an array of two elements. The first element is the quotient, the second is the remainder.
b = 0 raises a RangeError exception.
BigIntConstructor.sqrt (method)
Return \lfloor \sqrt(a) \rfloor.
A RangeError exception is raised if a < 0.
BigIntConstructor.sqrtrem (method)
Return an array of two elements. The first element is \lfloor \sqrt{a} \rfloor. The second element is a-\lfloor \sqrt{a} \rfloor^2.
A RangeError exception is raised if a < 0.
BigIntConstructor.floorLog2 (method)
Return -1 if a \leq 0 otherwise return \lfloor \log2(a) \rfloor.
BigIntConstructor.ctz (method)
Return the number of trailing zeros in the two’s complement binary representation of a.
Return -1 if a=0.