1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.getRealmOptions = getRealmOptions;
|
7 | exports.getSerializerOptions = getSerializerOptions;
|
8 |
|
9 | var _realm = require("./realm.js");
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | function getRealmOptions({
|
22 | compatibility = "browser",
|
23 | debugNames = false,
|
24 | errorHandler,
|
25 | mathRandomSeed,
|
26 | invariantLevel = 0,
|
27 | invariantMode = "throw",
|
28 | emitConcreteModel = false,
|
29 | uniqueSuffix,
|
30 | instantRender,
|
31 | reactEnabled,
|
32 | reactOutput,
|
33 | reactVerbose,
|
34 | reactOptimizeNestedFunctions,
|
35 | residual,
|
36 | serialize = !residual,
|
37 | check,
|
38 | strictlyMonotonicDateNow,
|
39 | stripFlow,
|
40 | timeout,
|
41 | maxStackDepth,
|
42 | abstractValueImpliesMax,
|
43 | debuggerConfigArgs
|
44 | }) {
|
45 | return {
|
46 | compatibility,
|
47 | debugNames,
|
48 | errorHandler,
|
49 | mathRandomSeed,
|
50 | invariantLevel,
|
51 | invariantMode,
|
52 | emitConcreteModel,
|
53 | uniqueSuffix,
|
54 | instantRender,
|
55 | reactEnabled,
|
56 | reactOutput,
|
57 | reactVerbose,
|
58 | reactOptimizeNestedFunctions,
|
59 | residual,
|
60 | serialize,
|
61 | check,
|
62 | strictlyMonotonicDateNow,
|
63 | stripFlow,
|
64 | timeout,
|
65 | maxStackDepth,
|
66 | abstractValueImpliesMax,
|
67 | debuggerConfigArgs
|
68 | };
|
69 | }
|
70 |
|
71 | function getSerializerOptions({
|
72 | lazyObjectsRuntime,
|
73 | heapGraphFormat,
|
74 | delayInitializations = false,
|
75 | delayUnsupportedRequires = false,
|
76 | accelerateUnsupportedRequires = true,
|
77 | internalDebug = false,
|
78 | debugScopes = false,
|
79 | debugIdentifiers,
|
80 | logStatistics = false,
|
81 | logModules = false,
|
82 | profile = false,
|
83 | inlineExpressions = false,
|
84 | initializeMoreModules = false,
|
85 | trace = false
|
86 | }) {
|
87 | let result = {
|
88 | delayInitializations,
|
89 | delayUnsupportedRequires,
|
90 | accelerateUnsupportedRequires,
|
91 | initializeMoreModules,
|
92 | internalDebug,
|
93 | debugScopes,
|
94 | debugIdentifiers,
|
95 | logStatistics,
|
96 | logModules,
|
97 | profile,
|
98 | inlineExpressions,
|
99 | trace
|
100 | };
|
101 |
|
102 | if (lazyObjectsRuntime !== undefined) {
|
103 | result.lazyObjectsRuntime = lazyObjectsRuntime;
|
104 | }
|
105 |
|
106 | if (heapGraphFormat !== undefined) {
|
107 | result.heapGraphFormat = heapGraphFormat;
|
108 | }
|
109 |
|
110 | return result;
|
111 | }
|
112 |
|
\ | No newline at end of file |