-
Notifications
You must be signed in to change notification settings - Fork 7
/
default.ts
37 lines (37 loc) · 1.28 KB
/
default.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Default value of registeredObjects option of the Arena class constructor.
*/
export const defaultRegisteredObjects: [any, string][] = [
// basic objects
[Symbol, "Symbol"],
[Symbol.prototype, "Symbol.prototype"],
[Object, "Object"],
[Object.prototype, "Object.prototype"],
[Function, "Function"],
[Function.prototype, "Function.prototype"],
[Boolean, "Boolean"],
[Boolean.prototype, "Boolean.prototype"],
[Array, "Array"],
[Array.prototype, "Array.prototype"],
// [BigInt, "BigInt"],
// [BigInt.prototype, "BigInt.prototype"],
// errors
[Error, "Error"],
[Error.prototype, "Error.prototype"],
[EvalError, "EvalError"],
[EvalError.prototype, "EvalError.prototype"],
[RangeError, "RangeError"],
[RangeError.prototype, "RangeError.prototype"],
[ReferenceError, "ReferenceError"],
[ReferenceError.prototype, "ReferenceError.prototype"],
[SyntaxError, "SyntaxError"],
[SyntaxError.prototype, "SyntaxError.prototype"],
[TypeError, "TypeError"],
[TypeError.prototype, "TypeError.prototype"],
[URIError, "URIError"],
[URIError.prototype, "URIError.prototype"],
// built-in symbols
...Object.getOwnPropertyNames(Symbol)
.filter(k => typeof (Symbol as any)[k] === "symbol")
.map<[any, string]>(k => [(Symbol as any)[k], `Symbol.${k}`]),
];