2 ms·
There are a few minor, uncommon edge cases, probably only encountered by minimisers, where automatic semicolon insertion may cause unintentional behaviour, so s
by jeroenhd 2y ago
There are a few minor, uncommon edge cases, probably only encountered by minimisers, where automatic semicolon insertion may cause unintentional behaviour, so semicolons are required. One of the specs; https://262.ecma-international.org/7.0/#sec-rules-of-automatic-semicolon-insertion https://262.ecma-international.org/7.0/#sec-rules-of-automat... (link from an earlier comment of like) spells it out in detail.
- Timon3 2y agoWhile these edge cases are fairly rare in everyday JS codebases, Typescript adds some, e.g. inline type casts for function calls: const foo = someFn() (foo as Bar).doSomething()