The weirdest thing just occured to me. But caching issues are always scary...
- In 1) I'm assigning defaultConfig to the variable
config
- In 2) you can see, that
defaultConfig
is imported from a file. That is the file in 3)
- You see that the file in 3) contains a static object.
- However, in 4) you see what the debugger shows. The app is having all kinds of items in that object. Those items are from the previous run.
So, to explain. On the first run, all is fine. But once you merged fields into the config
what happens on the next run of that script is, that config holds all those fields initially.
What is causing that? And more importantly, how to end that mess?
question from:
https://stackoverflow.com/questions/65870740/typescript-caching-static-object-imported-from-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…