In javascript, if we use const it prevents that variable to be reassigned with a new value. However if we export that const and import it in a new file using ES Modules import it can be reassigned to a new value.
// file A.js
export const A = class {
one = 1
}
A = undefined // Error: Assignment to constant variable <-- As expected.
// file B.js
import { A } from "A.js"
A = undefined // No error. <-- I want to prevent this reassignment to happen.
Is it possible to prevent A to be reassigned when using import?