JavaScript/TypeScript How to write clean if-else statements if-else statements can easily be nested and make the code unreadable if we don't consider anything to write it. if-else ... 2023.10.23 JavaScript/TypeScript
JavaScript/TypeScript TypeScript Make the function parameter more maintainable by using interface Many programming languages support interface keyword. TypeScript also supports the feature. This is one of the important... 2022.08.05 JavaScript/TypeScript
JavaScript/TypeScript TypeScript Utility types defined with infer keyword infer keyword is one of the difficult features that TypeScript offers. Some utility types use infer keyword, so let's le... 2022.08.03 JavaScript/TypeScript
JavaScript/TypeScript Implement IoT State Machine Transition By State Pattern In TypeScript In my project, my team needed to implement State machine. One of the developers implemented it by using many if-else but... 2022.05.27 JavaScript/TypeScript
JavaScript/TypeScript Reduce the number of if-else and switch-case conditional clauses Have you found a function is not readable because of lots of conditional clauses such as if-else or switch-case? It's ti... 2022.04.27 JavaScript/TypeScript
JavaScript/TypeScript TypeScript Replace switch-case logic with Record object Switch-case is one of the basics for conditional statements and it is supported by many programming languages. It is use... 2022.01.26 JavaScript/TypeScript
JavaScript/TypeScript TypeScript How to refactor a function to use named parameters TypeScript and JavasScript don't offer named parameters. How can we do a similar thing? Is there are any to refactor the code to apply the technique? 2021.10.01 JavaScript/TypeScript
JavaScript/TypeScript 5 Refactoring techniques that you can immediately apply Many software developers want to know techniques that they can immediately apply to make their code readable. A function... 2021.06.08 JavaScript/TypeScript
JavaScript/TypeScript Advanced state machine pattern I recently implemented logic to provide state machine info. At first I didn't implement it by State pattern but I felt i... 2021.03.15 JavaScript/TypeScript
JavaScript/TypeScript Replacing a static function by using proxy class This is 4th post in Become a better and decent programmer series.In the first post, I explained how to extract logic in ... 2021.02.14 JavaScript/TypeScript