Recently I caught a nasty bug caused by assignment in If statement. I consider if-assignment as a bad pattern for me and I want to turn it off completely to get the compiler varnings instead of actual bugs.
How can I do this in Typescript?
Recently I caught a nasty bug caused by assignment in If statement. I consider if-assignment as a bad pattern for me and I want to turn it off completely to get the compiler varnings instead of actual bugs.
How can I do this in Typescript?
I have found this option in TSLinter: https://palantir.github.io/tslint/rules/no-conditional-assignment/
© 2022 - 2024 — McMap. All rights reserved.