All articles

  • How to write unit test case for error validation of checkbox

    How to Write Unit Test Cases for Error Validation of Checkbox in TypeScript Unit testing is an essential part of the development process as it helps ensure the quality and reliability of your code. When it comes to error validation of checkboxes in TypeScript, writing unit test cases becomes crucial to catch any potential issues…

  • How to correctly type custom “Throttle” function in typescript?

    How to correctly type custom “Throttle” function in TypeScript? When working with TypeScript, it is important to properly type your code to ensure type safety and avoid potential bugs. One common scenario is when you need to implement a throttle function, which limits the rate at which a function can be called. In this blog…

  • How to extend default ALB controller policy using AWS CDK?

    How to extend default ALB controller policy using AWS CDK? When working with TypeScript and AWS CDK, you may come across a situation where you need to extend the default Application Load Balancer (ALB) controller policy. In this blog post, we will explore two solutions to achieve this using AWS CDK. Solution 1: Using the…

  • Typescript reduce an array of number literal type

    Typescript reduce an array of number literal type When working with TypeScript, you may come across a situation where you need to reduce an array of number literal types. In this blog post, we will explore how to achieve this and provide multiple solutions to the problem. Solution 1: Using a type assertion One way…

  • Change Typescript Function to retrieve JSON data from Session Storage instead of a JSON file

    Change TypeScript Function to retrieve JSON data from Session Storage instead of a JSON file When working with TypeScript, it is common to retrieve JSON data from a JSON file. However, there may be scenarios where you need to retrieve the JSON data from Session Storage instead. In this blog post, we will explore how…

  • FileReader onload works on browser but not in mobile ( ionic 6) capacitor

    FileReader onload works on browser but not in mobile (Ionic 6) Capacitor If you are developing a mobile application using Ionic 6 and Capacitor, you may have encountered an issue where the FileReader onload event works perfectly fine on a browser but fails to trigger on a mobile device. This can be frustrating, but don’t…

  • How to create and apply a prefix to a NestJS module and its child modules?

    How to create and apply a prefix to a NestJS module and its child modules? If you are working with NestJS, you may come across a situation where you need to create and apply a prefix to a module and its child modules. This can be useful when you want to organize your code and…

  • New Next js project on compilation gives error 404

    New Next.js Project on Compilation Gives Error 404 If you are encountering an error 404 when compiling your new Next.js project, don’t worry! This issue can be easily resolved by following a few steps. In this blog post, we will explore two possible solutions to fix this problem. Solution 1: Check Your File Structure One…

  • Get Data PhoneNumber from Google API using React OAuht

    Get Data PhoneNumber from Google API using React OAuth When working with React and OAuth, you may come across the need to retrieve a user’s phone number from the Google API. In this blog post, we will explore different solutions to achieve this goal. Solution 1: Using the Google People API The Google People API…

  • Return value depends on argument typescript

    Return value depends on argument typescript When working with TypeScript, you may come across a scenario where the return value of a function depends on the type of argument passed to it. In this blog post, we will explore different solutions to handle this situation. Solution 1: Using function overloading Function overloading allows you to…

Got any book recommendations?