From what I can tell, an import binding is immutable
import { foo } from './foo';
...
foo.bar = 23; // works
...
foo = { bar: 23 }; // syntax error
However, I've read elsewhere that JS imports are actually non-writable (not immutable)...in which case wouldn't the first assignment statement, foo.bar = 23;
also throw a syntax error?
UPDATE (how I understand it now)
...to paraphrase the excellent answer by @FelixKing...
JS imports are immutable bindings to the exported thing (variable, function, etc).
For non-primitive imports, this does not mean the properties on the imported object are necessarily immutable or non-writable.