4 ms·
Can you show an example of such a bug? The only thing I can think of is return value which will get flagged by TS as unreachable code (you can try
by realharo 6y ago
Can you show an example of such a bug? The only thing I can think of is
return
value
which will get flagged by TS as unreachable code (you can try it in https://www.typescriptlang.org/play https://www.typescriptlang.org/play)
- searchableguy 6y agoI can't think of a good real world example atm but Say, you have let a = 1 let b = 2 (a + b) <--- b won't be accessible here. This will also get flagged by ts. But not everyone uses ts. /shrugs Feross is right, I guess.
- realharo 6y agoI think eslint would flag it as well for what it's worth (https://eslint.org/demo https://eslint.org/demo, you have to set it to newer ES version in the Rules configuration at the bottom of the page).
- deleted 6y ago[deleted]