- 1y ·
-
Public·
-
social.mailpace.com
In Typescript, what's the best way to load a config across multiple modules? Should you do this in every module that needs the config:
`import config from ''./config.js"`
OR should you import the config once and pass the config as a variable to any functions that need it? e.g.
```
import config from ''./config.js"
startServiceA(config);
startServiceB(config);
...
```