57import NormallyClosedValveModificationsGap from "./app/library/geometricElements/normallyClosedValveGap";
58import { ValveType } from "./app/core/init";
59
60export var PRIMITIVES_SERVER = false; 61
62export function enablePrimitiveServer() {
63 PRIMITIVES_SERVER = true;
It is recommended not to mutate a name after exporting it. That is to avoid using mutable variable declarator kinds like let
and var
, which can be mutated even after exporting the name. This creates unexpected results when using the name in the module where it is being imported.
This can be unexpected errors like this.
// <!-- utils.js -->
export let magicNumber = 2
magicNumber = 3
And when using this
// <!-- index.js -->
import { magicNumber } from './utils.js;
console.log(magicNumber) // we might be expecting here the value 2, but it would be 3
// <!-- config.js -->
export let retryLimit = 2 // it is recommended to use `const` instead
// <!-- config.js -->
export const retryLimit = 2