|
@@ -2,8 +2,7 @@ interface ConfigInterface {
|
|
|
[id: string]: unknown;
|
|
|
}
|
|
|
|
|
|
-class ConfigObject implements ConfigInterface{
|
|
|
-
|
|
|
+class ConfigObject implements ConfigInterface {
|
|
|
public decimalPlaces: number;
|
|
|
public intConvertRoundMode: number;
|
|
|
public default_lang: string;
|
|
@@ -16,10 +15,10 @@ class ConfigObject implements ConfigInterface{
|
|
|
constructor () {
|
|
|
this.decimalPlaces = 8;
|
|
|
this.intConvertRoundMode = 2;
|
|
|
- this.default_lang = 'pt';
|
|
|
+ this.default_lang = "pt";
|
|
|
this.enable_type_casting = true;
|
|
|
this.idle_input_interval = 5000;
|
|
|
- this.suspend_threshold = 100;
|
|
|
+ this.suspend_threshold = 1000;
|
|
|
// this.max_instruction_count = 350250; - automated evaluation limit
|
|
|
this.max_instruction_count = Number.MAX_SAFE_INTEGER;
|
|
|
}
|
|
@@ -27,7 +26,7 @@ class ConfigObject implements ConfigInterface{
|
|
|
setConfig (opts: object): void {
|
|
|
const otherConfig = opts as ConfigInterface;
|
|
|
for (const key in otherConfig) {
|
|
|
- if(Object.prototype.hasOwnProperty.call(this, key)){
|
|
|
+ if (Object.prototype.hasOwnProperty.call(this, key)) {
|
|
|
this[key] = otherConfig[key];
|
|
|
}
|
|
|
}
|
|
@@ -35,4 +34,4 @@ class ConfigObject implements ConfigInterface{
|
|
|
}
|
|
|
|
|
|
const config = new ConfigObject();
|
|
|
-export const Config = config;
|
|
|
+export const Config = config;
|