@coderbyheart on Twitter

A static archive of Markus Tacker's tweets. Follow me on Mastodon: @[email protected].

Home / Archive / 2020 / 2020-06 / 1275859254721855490

Yes, #TypeScript should solve these ambiguities of #JavaScript.

To prevent unintended behaviour like this I have the
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md
eslint rule enabled, which will detect this and one needs to explicitly test for
undefined or 0. https://twitter.com/boennemann/status/1275855456360153089

Wed, 24 Jun 2020 18:32:05 UTC♥ 2