Message from JavaScript discussions

October 2020

— That is done by default in VSCode


And some insane static analysis to make sure that you don't accidentally reuse another variable from another switch case without a block

— Probably a default setting in its TS lintrr

— Unfortunately no, because it could be intended behavior

— It does that for me, maybe an extension?


case 'POST':
const foo = ...

Unless your static analyzer is very powerful this is not an editor at edit-time

Message permanent page

— I'm not sure if TS is this powerful

— It says something along "This case falls to the next one, either add a break or return statement or comment the line before the next case with // expect-error"

Message permanent page

— But why do all this setup work when you can just not use switches

— Anyone with a good place/location to explain better on local storage especially from forms?

— Why would you use localStorage with a form? 🤔

— That doesn't make sense