# Module property accessors

**URL:** <https://es.discourse.group/t/module-property-accessors/785>\
**Category:** 💡 Ideas\
**Created:** [May 11, 2021, 12:45am UTC](https://es.discourse.group/t/module-property-accessors/785 "2021-05-11T00:45:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![aclaymore](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aclaymore/32/501_2.png) [@aclaymore](https://es.discourse.group/u/aclaymore)\
**Post date:** [May 11, 2021, 9:20am UTC](https://es.discourse.group/t/module-property-accessors/785/3 "2021-05-11T09:20:31Z")

</div>

I can’t find a link but I have a vague memory of someone saying that this would go against a key invariant of JS - that accessed or writing to a variable in strict mode will never run arbitrary code. Apologies if I have made this memory up.

```javascript
import { x } from 'path';

x++; // this could run arbitrary code

```

Property access on the other hand has had the possibility of getter/setter behavior since at least ES5.

```javascript
// config.js
export const config = {
  set theme(t) { ... }
};

```

```javascript
import { config } from 'config.js';

config.theme = "dark";

```

---

_[View the full topic](https://es.discourse.group/t/module-property-accessors/785)._
